Re: require_once dying silently
| From: | Zoltán Németh | Date: | Wed, 09 Apr 2008 08:58:02 +0000 |
| Subject: | Re: require_once dying silently | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-272774@lists.php.net to get a copy of this message | ||
Aschwin Wesselius írta:
Richard S. Crawford wrote:if that property is not public but protected or private it would throw a fatal error.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.
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