|
Posted by Php on 05/11/05 17:44
got it working...
$poo = file_get_contents("http://mysite.com/class.php");
eval($poo);
where class.php has no <? ?>
-----Original Message-----
From: PHP [mailto:php@sandvikcity.com]
Sent: Wednesday, May 11, 2005 8:12 AM
To: ceo@l-i-e.com
Cc: PHP LIST
Subject: RE: [PHP] include remote class
if i goto the url i see nothing(normal) as it is just parsing the class and
no output. my include seems to parse the PHP but is not delivering the class
functions to instantiate. the manual mentions that remote includes with
classes or functions wont work but i saw one workaround mentioned on the
manual page that i tried using .inc but server did not parse it. a setting
perhaps?
-----Original Message-----
From: Richard Lynch [mailto:ceo@l-i-e.com]
Sent: Tuesday, May 10, 2005 9:52 PM
To: Andy Sandvik
Cc: php-general@lists.php.net
Subject: Re: [PHP] include remote class
On Tue, May 10, 2005 10:10 am, Andy Sandvik said:
>
> im doing include('http://www.mysite.com/class.php');
> and then i create new instance but i get error - cannot instantiate
> non-existant class
> how can i get this remotely hosted class file to be defined?
If you surf to that URL, do you see PHP source, or do you see HTML/nothing?
You may want to use .phps to get source, or .inc if mysite.com is
configured to serve those up as PHP.
You also have to make sure class.php is actually valid code...
--
Like Music?
http://l-i-e.com/artists.htm
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Navigation:
[Reply to this message]
|