[email protected] Posted November 18, 2009 Share Posted November 18, 2009 I am getting a warning and error... [function.require]: failed to open stream: no suitable wrapper could be found in require("http://www.mysite.com/include/categories.php"); Link to comment https://forums.phpfreaks.com/topic/181971-can-i-call-a-class-like-this/ Share on other sites More sharing options...
trq Posted November 18, 2009 Share Posted November 18, 2009 Calling a class is different to including a file. Lets assume you meant "Can I include a file like this?" The answer, yes you can but you must have allow_url_include set to on in your php.ini. Without that, you need to use a path, not a url. Link to comment https://forums.phpfreaks.com/topic/181971-can-i-call-a-class-like-this/#findComment-959822 Share on other sites More sharing options...
[email protected] Posted November 18, 2009 Author Share Posted November 18, 2009 I dont know where is php.ini file on my godaddy server ?? Anyone ?? Also I am calling this url from www.mysite.com in a file http://subdomain.mysite.com so if I give the path it will be point to subdomain root folder, but how do I point to mysite root folder? Link to comment https://forums.phpfreaks.com/topic/181971-can-i-call-a-class-like-this/#findComment-959836 Share on other sites More sharing options...
Mchl Posted November 18, 2009 Share Posted November 18, 2009 require('./fileInRoot.php'); Link to comment https://forums.phpfreaks.com/topic/181971-can-i-call-a-class-like-this/#findComment-959847 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.