FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » php includes and ajax
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: php includes and ajax [message #173129 is a reply to message #173116] Wed, 23 March 2011 12:15 Go to previous messageGo to previous message
Thomas 'PointedEars'  is currently offline  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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: PHP Developers needed
Next Topic: Cannot send emails
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 29 18:14:25 GMT 2024

Total time taken to generate the page: 0.05164 seconds