You are here: Re: Cannot instantiate non-existent class « All PHP « IT news, forums, messages
Re: Cannot instantiate non-existent class

Posted by sam on 11/10/05 19:20

What are you expecting to see but an error ?

Here:
include_once 'http://www.argonauts-it.be/foo.php';

you are including a html file: the result of parsing the foo.php by your
server
because you are calling it from a http request (I assume that
allow_url_fopen
is enabled in your php.ini file)

To get the result YOU EXPECT use:
include_once('foo.php');

If the foo.php file is in an other directory use:
include_once('/path/to/your/directory/foo.php');

Regards.


"Didier Willame" <didier.willame@ieee.org> a ιcrit dans le message de news:
ZtGdnQcXVuujTvDeRVnyiw@scarlet.biz...
> Hello,
>
> I would like to use the 'foo' class stored in
> http://www.argonauts-it.be/foo.php .
>
> This the code ( http://www.argonauts-it.be/test.php ) :
>
> <?php
> ignore_user_abort( true );
>
> ini_set('error_reporting', E_ALL);
> ini_set('display_errors', TRUE);
>
> ini_set( 'allow_url_fopen', true );
>
> include_once 'http://www.argonauts-it.be/foo.php';
>
> $c = new foo();
> ?>
>
> And this is the raised error:
>
> Fatal error: Cannot instantiate non-existent class: foo
> in /<blabla>/test.php on line 96
>
>
> I would like to use the include via the URL, to be able to share the same
> code within different domain names.
>
> All information allow me to continue is welcome.
>
> Thanks.
>
> Have a nice day,
> /didier

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация