Say you were going to do an include on a whole bunch of pages, and inside of that include you wanted to do some jQuery specific stuff. That page may or may not already have jQuery loaded. If it already does, you don’t want to load it again, but if not, you do. This works …
Tag Archives: include
Embed WordPress Outside WordPress
From time to time you need data from WordPress, but should not displayed in the system; they are necessary outside the installation. There are basically two options. Content can be quite easy provide via feed and processed or you gain access to the system. And that is basically very simple and is briefly described here.
php Include File in a Variable
Simply using include() or require() to output the contents of a ‘include’ file on another web page may work perfectly 90% of the time. However, there will be times where you may want to save it into a variable instead – especially if you are using PHP template classes to generate your web pages. Anyone …
php Cannot modify header information – headers already sent by FIX
Buffers output and eliminates problem with spaces/line breaks at the beginning/end of files. Make sure to place ob_start(); before header(); is called. <?php ob_start(); header(“Location: somepage.php”); //Redirect ob_end_flush(); exit; ?> [ad code=1 align=center]