PHP include
Posted: Tue May 05, 2009 7:47 am
Okay, so I've not searched the forum for this, so I am sorry if I am repeating other people. However I find most people asking for help in the situation are doing more complicated projects than myself.
Anyway I am using a PHP include, to include a menu on each page. Although this is not the only way to do the job, I have been informed that I must use PHP includes to do so. So using another fuction isn't a solution.
Anyway in my includes I have used complete paths and I am receiving the following error. Note: I have removed the company name here as Im sure they wouldn't want me posting online about them.
Warning: include(http://www.[company.name].ac.uk/intranet/menu/menu.php) [function.include]: failed to open stream: HTTP request failed! HTTP/1.1 401 Authorization Required in /web3/vhosts-faculties/business/intranet/committees/facultyboard/FacultyBoard.php on line 20
Warning: include() [function.include]: Failed opening 'http://www.[company.name].ac.uk/intranet/menu/menu.php' for inclusion (include_path='/web/service/php:/web/service/php/include:.') in /web3/vhosts-faculties/business/intranet/committees/facultyboard/FacultyBoard.php on line 20
I have heard a rumour that complete paths do not work with includes. Is this true??
Anyway I am using a PHP include, to include a menu on each page. Although this is not the only way to do the job, I have been informed that I must use PHP includes to do so. So using another fuction isn't a solution.
Anyway in my includes I have used complete paths and I am receiving the following error. Note: I have removed the company name here as Im sure they wouldn't want me posting online about them.
Warning: include(http://www.[company.name].ac.uk/intranet/menu/menu.php) [function.include]: failed to open stream: HTTP request failed! HTTP/1.1 401 Authorization Required in /web3/vhosts-faculties/business/intranet/committees/facultyboard/FacultyBoard.php on line 20
Warning: include() [function.include]: Failed opening 'http://www.[company.name].ac.uk/intranet/menu/menu.php' for inclusion (include_path='/web/service/php:/web/service/php/include:.') in /web3/vhosts-faculties/business/intranet/committees/facultyboard/FacultyBoard.php on line 20
I have heard a rumour that complete paths do not work with includes. Is this true??