plutomed Posted March 17, 2007 Share Posted March 17, 2007 when i use includes it works when i include a file like this: include "file.php"; but not when i do: include "/file.php"; why?? Link to comment https://forums.phpfreaks.com/topic/43126-solved-includes/ Share on other sites More sharing options...
flappy_warbucks Posted March 17, 2007 Share Posted March 17, 2007 becuse when you use the forward slash "/" you are refering to the root directory of the web folder... i.e. if your web directory is c:\www_folder\htdocs\mysite then you use include "/file.php"; then the server would look for the file in the "htdocs" folder and not the "mysite" folder. Link to comment https://forums.phpfreaks.com/topic/43126-solved-includes/#findComment-209441 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.