zenix Posted September 22, 2008 Share Posted September 22, 2008 Hi, I am very new to programming and have been following the instructions in a book to help familiarize myself with it. I have made 3 pages, a log in, the page after the log in which provides simply a link to click on and the main content page. All three pages work well. I have made it to the section describing includes. I made my simple include page (code below), added a line that reads <?php include "header.php"; ?> right after the <body> tag on the page. As long as that line exist anywhere in the code for the page I get nothing but an empty, white page. When I remove it everything works as it should. Pretty frustrating. if someone could steer me right I would really appreciate it! Quote Link to comment https://forums.phpfreaks.com/topic/125299-includes/ Share on other sites More sharing options...
JonnoTheDev Posted September 22, 2008 Share Posted September 22, 2008 I am guessing that you do not have error reporting turned on in your php.ini configuration file. The include is generating an error but you are not seeing it on screen. The script is terminating at this point. Look for display_errors in your php.ini and set to On. Restart your webserver. You can also add the following line to a php file that is included on all your pages: ini_set('display_errors', 'On'); ini_set('error_reporting', E_ALL & ~E_NOTICE); You should then see why your include is not working. Probably to do with a filepath. Quote Link to comment https://forums.phpfreaks.com/topic/125299-includes/#findComment-647686 Share on other sites More sharing options...
zenix Posted September 22, 2008 Author Share Posted September 22, 2008 Thanks Neil!! Maybe I can utilize that to get it to work on my laptop as well. I have it set up exactly the same on my desktop and laptop and I only get blank pages on the laptop. Anyway, would you believe the problem was an extra quote?? I can't believe I didn't see it!! Thanks again!! Quote Link to comment https://forums.phpfreaks.com/topic/125299-includes/#findComment-647754 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.