Re: require_once dying silently

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Aschwin Wesselius írta:
Richard S. Crawford wrote:
Hi, everyone.

This one's been driving me bonkers for an hour now.  Anyone have any idea
why require_once would be dying silently in the script below?

------------------------------------

$CFG->dirroot   = "/home/rcrawford/public_html/tanktrunk/tanktrunk";
$CFG->dataroot  = $CFG->dirroot.'/moodledata';

require_once("$CFG->dirroot/lib/setup.php");

Hi,

It reads as if $CFG is an object and ->dirroot is not a public property of that object. So, I don't know what $CFG is, but I think the problem lays there.

if that property is not public but protected or private it would throw a fatal error.


Also, OOP is nice and all (not to start a thread about OOP again), but putting your config into an object seems a bit overdo to me.


I think you know I don't agree with that, but I too don't want to start this over ;)

greets,
Zoltán Németh

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux