a blog by Ben Fallaize
Header image

Learning a new language? Learn the basics of the one you know first…

Posted by admin in Uncategorized

I’ve been developing in PHP now for 6-7 years. On the latest website I’ve been building are a few little ajax widgets for the shopping cart and such. To accomplish this, I was including a PHP file, the the ajax script was targeting a second script which includes my functions file, then includes the original file.

Today I learnt about the require_once() function in PHP. You can include your functions file wherever you like, but if it’s been called already, it gets ignored. I guess I’ve never had a need for it until now, but another one of those “d’oh” moments.

You can follow any responses to this entry through the RSS 2.0 You can leave a response, or trackback.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>