note 78132 rejected from function.require by ezyang

From: Date: Sat, 29 Sep 2007 02:37:51 +0000
Subject: note 78132 rejected from function.require by ezyang
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-130902@lists.php.net to get a copy of this message
Note Submitter: polandroide at hotmail dot com ---- Hey Scott, You'll have to forgive me for my ignorance, as I've only got into programming in the last year, or so; and I've been screening this kind of site for info on the 'require' attribute, but after reading your listing, I have a question to ask. In your first line 'if(file_exists($pageContentInc)' are you not just asking whether a variable exists? And, as this looks as though it's the first line of your program, it probably doesn't. Although, this is the first time that I've ever seen the function 'require_once', and this, for me, also raises the question of 'how many times do you actually need to require a file?'...but anyway, is the first part of your code just redundant, or is there something that I'm missing here? It would also help me if you, or anyone else out there, could answer me what the difference between 'require' and 'require_once' is. Many thanks

« previous php.notes (#130902) next »