Re: php includes and ajax [message #173129 is a reply to message #173116] |
Wed, 23 March 2011 12:15 |
Thomas 'PointedEars'
Messages: 701 Registered: October 2010
Karma:
|
Senior Member |
|
|
Denis McMahon wrote:
> Lwangaman wrote:
>> Getting back to the point: my question is about how server-side php
>> includes are to be handled semantically in a php file (<deleted
>> irrelevancy>).
>
> You have four choices:
>
> include ("filemname.php");
> include_once ("filemname.php");
> require ("filemname.php");
> require_once ("filemname.php");
The parentheses are not required; those statements are not function calls
and should not misguidingly be written as such. See also the PEAR Coding
Standards.
The double quotes should be single quotes since there is no variable
expansion required, but that is just my preference.
These are, however, not the only choices and they are not always the best
ones; indeed, the PEAR2 Coding Standards Rules require those statements to
be omitted from PEAR modules. (They have, however, expired by on
2008-03-01.)
<http://pear.php.net/manual/en/standards.including.php>
<http://pear.php.net/manual/en/pear2cs.rules.php>
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
|
|
|