I am creating PHP pages on a Microsoft server. Up until now all of my files have been in the root folder and accessing include files from an includes folder. I have reached the point where I need to be a little more organized. I would like to move most (not all) of my php files into folders. I have setup a couple of test files and folders to try to use include files but they are not working. Here is what I have so far:
C:\inetpub\wwwroot\portal2\time_fix\time_fix.php (PHP file)
C:\inetpub\wwwroot\portal2\inc\header.php (Include file)
This line is in my php.ini file:
include_path = "C:\inetpub\wwwroot\portal2\inc"
This is the first line of my time_fix.php:
<?php include 'header.php';?>
This is what I get when I try to run the file:
Warning: include(header.php): failed to open stream: No such file or directory in C:\inetpub\wwwroot\portal2\time_fix\time_fix.php on line 1
Warning: include(): Failed opening 'header.php' for inclusion (include_path='C:\inetpub\wwwroot\portal2\inc') in C:\inetpub\wwwroot\portal2\time_fix\time_fix.php on line 1
What is going on?
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.