valgris Posted January 10, 2012 Share Posted January 10, 2012 Hello. I am having some trouble with an include line. At the very top of my .php page I have the following <?php include ('/IUS/Login/form_process.php'); ?> When I open the page using - localhost/IUS the rest of the page seems to load fine but at the very top I have this error message Warning: include(/IUS/Login/form_process.php) [function.include]: failed to open stream: No such file or directory in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\IUS\Index.php on line 1 Warning: include() [function.include]: Failed opening '/IUS/Login/form_process.php' for inclusion (include_path='.;C:\php5\pear') in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\IUS\Index.php on line 1 My file structure is as follows Inside my apache2.2 there is the htdocs folder inside that there is a folder called IUS IUS has the index.php file in it as well as a css style sheet and two folders. 1. folder called 'images' 2.folder called Login Login has the file 'form_process.php' so the structure looks something like this - Apache2.2 htfocs IUS - Index.php, style.css Images - BackgroundRep.png etc... Login - form_process.php, Config.php (red = folder) Where am I going wrong? I can tell that its unable to find the form_process.php file in the path that I am specifying but I am unsure why? Thank you in advance for any help. Quote Link to comment https://forums.phpfreaks.com/topic/254747-include-error-message/ Share on other sites More sharing options...
Pikachu2000 Posted January 10, 2012 Share Posted January 10, 2012 The leading / slash tells include() to look for the file using the specified path as absolute, starting at the root of the drive. Quote Link to comment https://forums.phpfreaks.com/topic/254747-include-error-message/#findComment-1306258 Share on other sites More sharing options...
valgris Posted January 10, 2012 Author Share Posted January 10, 2012 Ah, got it, thank you very much. Quote Link to comment https://forums.phpfreaks.com/topic/254747-include-error-message/#findComment-1306262 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.