Jump to content

Better to use full path or relative path?


MrFish

Recommended Posts

Like the title asks: Is it better to use a full path or relative path when including files in php?

include('includes/login.php');include('http://www.mysite.com/includes/login.php');

Does it matter or is it quicker to use a relative path?

Link to comment
Share on other sites

Relative paths are better - or else what happens when your environment changes?Also, you can't include() files over HTTP, at all.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...