I have a PHP class on a subdomain I want to use in another subdomain. I can include it on the second subdomain but when I call the class, I have a "class not found" error.
On subdomain A (http://a.mydomain.com), file: MyClass.php:
class MyClass {
public function getTest() {
return 'Hello World !';
}
}
On subdomain B (http://d.mydomain.com):
include 'http://a.mydomain.com/MyClass.php';
$class = new MyClass();
echo $class->getTest();
Error displayed: Fatal error: Class 'myClass' not found in /var/www/subdomainb/index.php on line 3
Anyone has an idee to do that ?