Jump to content

links and require files


Porkie

Recommended Posts

i have this at the start of my coding

require('core.inc.php');

 

i then have this to link my categories

 

	echo "<a href='/video.php?category={$video['category']}'><h1>{$video['category']}</h1></a><h1>{$video['name']}</h1>";

 

the problem is when i click the link i get this,

 

 

Warning: require(core.inc.php) [function.require]: failed to open stream: No such file or directory in /home/myuklive/public_html/video.php on line 3

 

Warning: require(core.inc.php) [function.require]: failed to open stream: No such file or directory in /home/myuklive/public_html/video.php on line 3

 

Fatal error: require() [function.require]: Failed opening required 'core.inc.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/myuklive/public_html/video.php on line 3

 

however the file is defiantly there as it loads it earlier in the page.

 

cheers

Link to comment
https://forums.phpfreaks.com/topic/164585-links-and-require-files/
Share on other sites

A couple things to try...

 

- Specify the full path to the required file

 

- Add the path the included file exists in to your include_path in your php.ini

 

Try adding this to the top of the page that has the require on it then call that page to see if any errors are generated off the bat.

 

ini_set('display_errors', 1);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.