knowram Posted October 23, 2007 Share Posted October 23, 2007 I don't seem to be able to use full url's in either require_onec() or include() statements. is there anyway to signify the root folder so I can use the full file path? Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted October 23, 2007 Share Posted October 23, 2007 include() / require/ require_once does its magic by internal urls/ not external so look into linking relative or the $_SERVER['doc_root'] var Quote Link to comment Share on other sites More sharing options...
corbin Posted October 23, 2007 Share Posted October 23, 2007 If you really, really want to include a url (you should really never need to include/require a URL...), I would make sure allow_url_include is on in php.ini. allow_url_include might not be the entry exactly.... I don't remember ;p. Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted October 23, 2007 Share Posted October 23, 2007 yes, someone surprised me on this board the other day by using a URL in an include(). it is actually supported, though with potential unexpected outcomes............. Quote Link to comment Share on other sites More sharing options...
Toshiba23 Posted October 24, 2007 Share Posted October 24, 2007 use cURL to retrieve outside information, cURL extension is actually fast and can do the job! OR! You can use fsockopen(); as well, but then you have to ignore headers that come from server responses. OR! fopen(); works too (on 4.3.0+ I think though) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.