Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

TUTORIAL: Save time using the PHP include Function <?php include


  • Please log in to reply
13 replies to this topic

#13 Orjan

Orjan

    CC Mentor

  • Moderator
  • 2918 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#

Posted 08 April 2012 - 01:46 PM

and just because that, you can call your inc files .inc.php instead...
  • 0

I'm a System developer at XLENT Consultant Group mainly working with SugarCRM.
Please DO NOT send mail or PM to me with programming questions, post them in the appropriate forum instead, where I and others can answer you.


#14 papabear

papabear

    CC Devotee

  • Senior Member
  • PipPipPipPipPipPip
  • 472 posts
  • Location:DarkSide

Posted 17 April 2012 - 05:34 AM

for some addition, you can also use

include_once("header.php");

or

require_once("header.php");

there is no difference between include_once() and require_once(), adding _once is a safe way if ever you included the same file or code in that same directory TWICE then it will not get two inclusion.. or add the second one. :)
  • 0
Life has no CTRL+Z
Never Forget To HIT "LIKE" If I Helped




Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download