tony09uk
06-20-2011, 10:06 PM
I am trying to use the include function for my first attempt at a php website. I have split the header, navbar, mainbody and footer into different HTML files and added
include("includes/header.html");
include("includes/navBar.html");
include("includes/home.html");
include("includes/footer.html");
the files have been saved to my folder but when I check in live view I get the following message
Warning: include(includes/header.html) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\DHTML\index.php on line 3
Warning: include() [function.include]: Failed opening 'includes/header.html' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\DHTML\index.php on line 3
Warning: include(includes/navBar.html) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\DHTML\index.php on line 4
Warning: include() [function.include]: Failed opening 'includes/navBar.html' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\DHTML\index.php on line 4
Warning: include(includes/home.html) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\DHTML\index.php on line 5
Warning: include() [function.include]: Failed opening 'includes/home.html' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\DHTML\index.php on line 5
Warning: include(includes/footer.html) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\DHTML\index.php on line 6
Warning: include() [function.include]: Failed opening 'includes/footer.html' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\DHTML\index.php on line 6
What am I doing wrong. The files are in the folder.
PS
Ive also tried saving my files as .php and tried ../ (after reading the tutorial at http://www.dreamweaverclub.com/php-includes.php)
include("includes/header.html");
include("includes/navBar.html");
include("includes/home.html");
include("includes/footer.html");
the files have been saved to my folder but when I check in live view I get the following message
Warning: include(includes/header.html) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\DHTML\index.php on line 3
Warning: include() [function.include]: Failed opening 'includes/header.html' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\DHTML\index.php on line 3
Warning: include(includes/navBar.html) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\DHTML\index.php on line 4
Warning: include() [function.include]: Failed opening 'includes/navBar.html' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\DHTML\index.php on line 4
Warning: include(includes/home.html) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\DHTML\index.php on line 5
Warning: include() [function.include]: Failed opening 'includes/home.html' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\DHTML\index.php on line 5
Warning: include(includes/footer.html) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\DHTML\index.php on line 6
Warning: include() [function.include]: Failed opening 'includes/footer.html' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\DHTML\index.php on line 6
What am I doing wrong. The files are in the folder.
PS
Ive also tried saving my files as .php and tried ../ (after reading the tutorial at http://www.dreamweaverclub.com/php-includes.php)