PHP include file not working
I'm trying to use PHP to create my website. The home page is index.php, and it has several include statements. There are only a few include statements:
include("pages/header.htm");
include("pages/nav.htm");
include("pages/body.htm");
include("pages/footer.htm");
The folder pages is a folder I created within the public_html folder; all of the files listed here exist. But they are not being found when the script is run. I've tried modifying the .htaccess file in the public_html directory with the line php_value include_path ".:/home/neronebr/public_html/pages"
but that gives a 500 Internal Server Error. I also tried adding the line
ini_set("include_path", "pages");
in the php file, which caused no change in the output. The line
set_include_path("pages");
was equally unsuccessful. What should I do to allow the php script to include the .htm pages properly?
-
Hello :) This forum is primarily intended for matters related to the cPanel/WHM software itself. You will likely receive more feedback for this question on a forum that specializes in PHP coding or web design. Thank you. 0
Please sign in to leave a comment.
Comments
1 comment