Hi, I am making an api this api has on class , member function of this class check the result of each object.I am giving a small php code for this integration of api to all my client.In this code an object will be created with the api class.But the class file is on my server and each client objects will access this api class. But when i am including class file path by include 'http://www.myserver.com/class.php' and creating object to client api code i am getting an error that class is not defined.i am guessing we can't access class file remotely tha's why error is coming. What i should to do to access this class file remotely ? a brief more info will be appreciate thanks all.
Try to include it by relative path, not by absolute path. eg. include 'class.php'; PHP: One thing you should keep in mind that you cannot include an external php file, you can only include whatever it can access in the server.