Posted by Rik Wasmus on 01/22/08 18:54
On Tue, 22 Jan 2008 19:41:01 +0100, <myzmlm@gmail.com> wrote:
> I want to include class in one php page. However I couldn't get it
> working? I didn't get any error message but I didn't get the html page=
> either. Any one could help me? Thanks.
>
> <?php
> function __autoload($class)
> {
> if (file_exists($file =3D "$class.php"))
> {
> include($file);
> }
> else
> {
> throw new Exception("Class $class not found");
> }
> }
>
> try
> {
> class_exists('pd');
What do you expect this does?
> $remo =3D new pd();
>
> ?>
> <html>
> <head>
> </head>
> <body>
> <div id=3D'div1'>test<br />
> <?php
> print $remo.test();
$remo->test();
Be sure to enable display_error and set error_reporting to E_ALL | =
E_STRICT during development (in php.ini, httpd.conf or .htaccess).
-- =
Rik Wasmus
Navigation:
[Reply to this message]
|