Re: require_once() driving me MAD ! - please HELP
- From: Jerry Stuckle <jstucklex@xxxxxxxxxxxxx>
- Date: Thu, 28 Sep 2006 09:19:26 -0400
Bit Byte wrote:
I have written a number of PHP include files. I have carefully partitioned them into logical folders - based on functionality. My directory structure looks something like this:
$(rootdir)/includes/
$(rootdir)/includes/patterns
$(rootdir)/includes/core/db
$(rootdir)/includes/core/utils
$(rootdir)/includes/core/logger
...
etc.
Each folder contains one or more files. I wrote the following script to test my db classes:
<?php
echo "In script\n" ;
include ("/db/mysql_database.inc.php");
echo "Got here\n" ;
try
{
echo "Attempting to instantiate db object\n" ;
$m_dbconnection = new MySQLDatabase();
echo "Object created succesfully\n" ;
}
catch (Exception $e)
{
echo "Exception caught : " . $e->getMessage() . "\n" ;
}
?>
Output: "In script Got here Attempting to instantiate db object "
I cannot, for the life of me, work out wtf is wrong iwth the script, and why I can't seem to use my directory structure. The above script is being run from $(rootdir). $(rootdir) is in folder htdocs under Apache.
Additional Info:
----------------------
PHP Version: PHP5
Web Server: Apache 2.0
OS: Windows 2K
include ("/db/mysql_database.inc.php");
This would be an absolute path to the file system, not a relative path in your web server. If you were displaying errors you would have one indicating the file was not found.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.
- Follow-Ups:
- Re: require_once() driving me MAD ! - please HELP
- From: Bit Byte
- Re: require_once() driving me MAD ! - please HELP
- References:
- require_once() driving me MAD ! - please HELP
- From: Bit Byte
- require_once() driving me MAD ! - please HELP
- Prev by Date: Re: XP Development Environment
- Next by Date: Re: Where does php session cookies stored
- Previous by thread: require_once() driving me MAD ! - please HELP
- Next by thread: Re: require_once() driving me MAD ! - please HELP
- Index(es):
Relevant Pages
|