Re: require_once() driving me MAD ! - please HELP



Bit Byte napisal(a):
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.

Why do you think it's a directory structure problem? You wrote that in
the ouput you get only "In script Got here Attempting to instantiate db
object ", so it stops in MySQLDatabase. Maybe there is an error.

.



Relevant Pages

  • Re: How do I change default permissions for shares?
    ... Doing a batch would mean ... Explorer so the only thing you need to is type in the share name the script ... If your share name is always the folder name or the folder name with ... @echo off ...
    (microsoft.public.windowsxp.security_admin)
  • Re: require_once() driving me MAD ! - please HELP
    ... Each folder contains one or more files. ... echo "In script\n"; ... 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. ... Did you mean to say that my include directive SHOULD be an absolute path to the file system ?. ...
    (comp.lang.php)
  • Re: Problems with require_once() and directory structure
    ... Each folder contains one or more files. ... echo "In script\n"; ... "In script Got here Attempting to instantiate db object " ... why I can't seem to use my directory structure. ...
    (alt.php)
  • Re: bat file help
    ... I need that script to be able to eject the ... current DVD and ask for a new one. ... :: Prime the counter used to accumulate folder sizes ... echo Please insert a new DVD! ...
    (microsoft.public.windowsxp.general)
  • Re: require_once() driving me MAD ! - please HELP
    ... Each folder contains one or more files. ... echo "In script\n"; ... "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. ...
    (comp.lang.php)