HELP! Need help with "include" function
Posted: Thu Apr 10, 2003 9:49 am
Hello all,
i am new to PHP and I am trying to use the "include" function in an HTML page and can't get it to work. Basically I have a file called "test.php" that I have uploaded to my ISP. test.php just reads some text from a text file ( I have verified that my ISP supports PHP4). I then created an HTML file in which I placed this line and also uploaded....
<? include("test.php"); ?>
when I go to the HTML page from my browser I get nothing. No error messages or anything. However, if I create a link to the PHP file from the HTML page, it works; I can see the text outputed from the textfile. It also works if I access the test.php file directly (ie. http://www.mydomain.com/test.php). I have tried changing permissions and using an actual path ("/path/to/file.php"). WHat am I doing wrong? Could it be something related to my ISP? Any help would be appreciated.
Thanks,
Sevi27
i am new to PHP and I am trying to use the "include" function in an HTML page and can't get it to work. Basically I have a file called "test.php" that I have uploaded to my ISP. test.php just reads some text from a text file ( I have verified that my ISP supports PHP4). I then created an HTML file in which I placed this line and also uploaded....
<? include("test.php"); ?>
when I go to the HTML page from my browser I get nothing. No error messages or anything. However, if I create a link to the PHP file from the HTML page, it works; I can see the text outputed from the textfile. It also works if I access the test.php file directly (ie. http://www.mydomain.com/test.php). I have tried changing permissions and using an actual path ("/path/to/file.php"). WHat am I doing wrong? Could it be something related to my ISP? Any help would be appreciated.
Thanks,
Sevi27