stlewis Posted December 10, 2008 Share Posted December 10, 2008 Hi all! I have a little bit of a problem including class files... I have a php page, (say index.php) wherein I am requiring two other files, (class1.php, class2.php). Each of these files contain a definition for one class. Although there doesn't seem to be any problem with actually including the files, I'm getting errors indicating that the classes themselves can't be found when I try to create an instance of them. This only happens if I require the files via an url, as compared to an absolute path. Any idea why the URL form wouldn't work? url_fopen and url_include are both on in my server configuration. Any help is appreciated! Thanks! Link to comment https://forums.phpfreaks.com/topic/136370-including-php-class-files/ Share on other sites More sharing options...
trq Posted December 10, 2008 Share Posted December 10, 2008 Including a file via a url simply includes the finished output of whatever the included file produces when requested via http. Class definitions alone will produce nothing. Link to comment https://forums.phpfreaks.com/topic/136370-including-php-class-files/#findComment-711458 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.