Author |
Message |
17/07/2002 22:37:41
|
Anonymous
|
I am running a site with the advanced poll on it. I have a rando pol running. When you vote on the index.php page the poll works fine, but when you vote on any other page you get the following error:
Warning: Unable to access .html in /home/virtual/site21/fst/var/www/html/pages/dfw.php on line 510
Warning: Failed opening '.html' for inclusion (include_path='.:/php/includes:/usr/share/php') in /home/virtual/site21/fst/var/www/html/pages/dfw.php on line 510
Line 510 on the page in question contains the following include tag:
<?php include ($page . ".html"); ?>
What should I do to fix this error. I have tried to change the include tag to the following:
<?php include ($page . "whatever.html"); ?>
This did not work....
Please help me
|
|
19/07/2002 12:35:51
|
Anonymous
|
Don't use .Html files for including.
When you include a file it must be a .PHP file
|
|
19/07/2002 16:15:49
|
Anonymous
|
Actually you can use an .html extention in an include. The center section of the pages on this site are all html. The php file contains the navigation poll and all the include files for the other sections of the page. For example the footer at the bottom is an html file. Notice: <?php include 'dfwsfooter.html'; ?>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=769>
<TBODY>
<TR>
<TD bgColor=#000000 height=29 width=754>
<div align="right">
<table border="0" cellpadding="2" cellspacing="0" width="104%">
<tr>
<td width="100%" class=footer align="center">
<center>
----> <?php include 'dfwsfooter.html'; ?> </center>
</td>
</tr>
</table>
</div>
</TD>
</TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
Thanks for the suggestion.
|
|
22/07/2002 16:15:11
|
Anonymous
|
So the problem lies in the the $page variable not being set, so the script is trying to include a file called ".html" which is obviously just the extension without the rest of the file name being specified. The question is how do I get the script to include the entire group of html files that file in the middle of the site. The site consists of two php files index.php and dfw.php and then a whole bunch of html files that fill up the middle section. All the content is written in html. Anybody have any clues or ideas on what I can do to solve this problem?
|
|
|