#24593 [Opn->Bgs]: class not instantiated problem with include/require
| From: | sniper@php.net | Date: | Thu, 10 Jul 2003 16:38:00 +0000 |
| Subject: | #24593 [Opn->Bgs]: class not instantiated problem with include/require | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-43662@lists.php.net to get a copy of this message | ||
ID: 24593
Updated by: sniper@php.net
Reported By: ssem at complexusgroup dot com
-Status: Open
+Status: Bogus
Bug Type: *Directory Services problems
Operating System: apache
PHP Version: 4CVS-2003-07-10 (stable)
New Comment:
Sorry, but your problem does not imply a bug in PHP itself. For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system
is not the
appropriate forum for asking support questions.
Thank you for your interest in PHP.
RTFM about include()..
Previous Comments:
------------------------------------------------------------------------
[2003-07-10 11:31:20] ssem at complexusgroup dot com
Description:
------------
when I use
include("http://".$_SERVER['HTTP_HOST']."/bread.php");
and
include("bread.php");
the include found both files. But when I try to instantiate an
instance of an class in bread.php, only include("bread.php");
works???????
the reason I am using $_server variable is to have an absolute path for
file at different subdirectories to call bread.php
Reproduce code:
---------------
//include("http://".$_SERVER['HTTP_HOST']."/bread.php");
include("bread.php");
$b =new bread();
echo $b->trace($ctid, $pctid);
//works fine but if I use
include("http://".$_SERVER['HTTP_HOST']."/bread.php");
//include("bread.php");
$b =new bread();
echo $b->trace($ctid, $pctid);\
//I got the error in the following section.
Expected result:
----------------
no error
Actual result:
--------------
Fatal error: Cannot instantiate non-existent class: bread in
/hsphere/local/home/developm/hsc.development.complexusgroup.com/common/header.php
on line 67
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24593&edit=1