开发者

problem creating with object in php

I need some technical help.I have a program which is only class file and this file situated at my www.classexample.com server and my file name is myfirstclass.php. I making my other php file which will use create an object of this class file and i开发者_JAVA百科ts file name is mysecondtest.php but this file is on my other server www.objecttest.com.

How will i create and object of same class ? When i am including file like include 'http://www.classexample.com/myfirstclass.php'

and creating a object i am getting an error (class is not defined). How will i able to make an object which are situated on other server.

Any idea will be appreciate you. Thank you.


When you including like include 'http://www.classexample.com/myfirstclass.php', you do not include any files.
If you really want to use a PHP code from other domain, rename your class definition file to myfirstclass.txt
But the whole idea of cross-domain class definition seems very unusual, not to say more.
If both sites share the same server, do include files, not URLs

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜