doubledee Posted April 23, 2011 Share Posted April 23, 2011 In the file "secure/checkout.php" I have... <?php require_once "../config.inc.php"; ?> which is Relative. Can I use an Absolute Path instead?? Debbie Link to comment https://forums.phpfreaks.com/topic/234489-can-an-include-use-an-absolute-path/ Share on other sites More sharing options...
Skewled Posted April 23, 2011 Share Posted April 23, 2011 If you give include() or require() an absolute path, that file will be included. An absolute path starts with a "/" on unix, and with a drive letter and colon on Windows. Link to comment https://forums.phpfreaks.com/topic/234489-can-an-include-use-an-absolute-path/#findComment-1205121 Share on other sites More sharing options...
doubledee Posted April 23, 2011 Author Share Posted April 23, 2011 Quote If you give include() or require() an absolute path, that file will be included. An absolute path starts with a "/" on unix, and with a drive letter and colon on Windows. So that was a "Yes" I take it? In other words, PHP accepts Relative and Absolute Path Includes, right? Debbie Link to comment https://forums.phpfreaks.com/topic/234489-can-an-include-use-an-absolute-path/#findComment-1205124 Share on other sites More sharing options...
Skewled Posted April 23, 2011 Share Posted April 23, 2011 Yep Link to comment https://forums.phpfreaks.com/topic/234489-can-an-include-use-an-absolute-path/#findComment-1205125 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.