Re: include_once() and require_once() in function



Andrew G. Koptyaev wrote:
Is I can use include_once() or require_once() in function or only include()?



I tend to use require_once for most things.

The 'require' part causes your script to stop executing with a fatal
error if it can't include your file, which is generally what you would want.

The 'once' part means if a script has already been included further back
in time it won't be included again (as this could cause all manner of
problems).


Roger Heathcote.
.



Relevant Pages

  • Jumpstart: syntax error and trying to load from /cdrom media, which disk to use for Solaris 8 image
    ... I'm not sure if I need to use that disk or the Solaris 8 Installation ... Using RPC Bootparams for network configuration information. ... Using finish script: diag_drv.fin ... Executing JumpStart preinstall phase... ...
    (SunManagers)
  • Re: understanding lambda
    ... All functions in the script are created when the script is parsed. ... A lambda function is created when the script is executing - and is not created unless that statement is executed. ... a new solid -- say, a cylinder, I would take two steps: ...
    (alt.php)
  • QUESTION: shared libraries
    ... how would I create a package easy-to-install for a new user? ... we could use a script to install the package. ... I have seen some scripts executing from a ... Gouvernement du Canada / Government of Canada ...
    (comp.os.linux.development.apps)
  • QUESTION: shared libraries
    ... how would I create a package easy-to-install for a new user? ... we could use a script to install the package. ... takes root privileges to do so. ... I have seen some scripts executing from a ...
    (comp.os.linux.development.system)
  • Re: What does this script do?
    ... This is the Machine Startup script: ... dim installMediaPath, installMediaFileName ... local drive and executing it. ...
    (microsoft.public.scripting.wsh)