Jump to content

Including PHP class files


stlewis

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.