|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Php include files
Hello all, Its been a while since I have posted. I am currently working on the build of a site that uses simple PHP include files within html coding. I found that the server will not parse the include files. So I then put over an .htaccess file and went back on the site to see if that helped and it did seem to- being that the server did parse the include files. I then logged back on the site, and I got a message asking me if I wanted to download a file.... ?????? so I took the .htaccess file back out, and then the site pages worked, but the include files did not. I talked to the hosting company that has the server, and they said They are running PHP 4.3.11, and the feature I am trying to use was offered in version PHP 4.3.2 -- any Ideas -- as to what I am doing wrong or what I can do different,
Thanks so much -- I hope I posted this in the right category. Last edited by spartan396 : December 27th, 2006 at 10:03 PM. |
|
#2
|
||||
|
||||
|
Quote:
what is the extension of the file that your using to call the include? standard htm files or html files won't do it (to my knowledge). you have to either have to go with .shtml or with the php extension to accomplish this. If you're already calling from a .php extension then you may want to either question your need for php or your host. should just be able to do: Code:
<?php include 'path to file.html'; ?> Otherwise with a .shtml extension you can: Code:
<!--#include virtual="includes/main_top_nav.html"--> Make sense? ~5yb |
|
#3
|
|||
|
|||
|
To make sure PHP is working on your server make a file called test.php and put this code in it:
<html> <head> <title> PHP Test Script </title> </head> <body> <?php phpinfo( ); ?> </body> </html> |
![]() |
| Viewing: SEO Chat Forums > Other > HTML Coding > Php include files |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|