note 78132 added to function.require

From: Date: Sat, 29 Sep 2007 00:43:00 +0000
Subject: note 78132 added to function.require
Groups: php.notes 
Request: Send a blank email to php-notes+get-130901@lists.php.net to get a copy of this message
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 ---- Server IP: 194.145.210.4 Probable Submitter: 86.134.114.142 ---- Manual Page -- http://www.php.net/manual/en/function.require.php Edit -- https://master.php.net/note/edit/78132 Del: integrated -- https://master.php.net/note/delete/78132/integrated Del: useless -- https://master.php.net/note/delete/78132/useless Del: bad code -- https://master.php.net/note/delete/78132/bad+code Del: spam -- https://master.php.net/note/delete/78132/spam Del: non-english -- https://master.php.net/note/delete/78132/non-english Del: in docs -- https://master.php.net/note/delete/78132/in+docs Del: other reasons-- https://master.php.net/note/delete/78132 Reject -- https://master.php.net/note/reject/78132 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#130901) next »