note 52168 deleted from function.header by tularis

From: Date: Fri, 20 Apr 2007 14:55:43 +0000
Subject: note 52168 deleted from function.header by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-125668@lists.php.net to get a copy of this message
Note Submitter: mjs15451 at hotmail dot com ---- I was looking at this section and I noticed that it didn't mention anything about javascript includes using php files. I tested this code on Gecko browsers (Firefox, Mozilla, Netscape), MSIE and Opera and they all can include the php file with this header: header("Content-type: application/x-javascript"); This would be the code you would use to include it: <script type="text/javascript" src="javascript.php"></script> MSIE doesn't understand the file only if it is called directly in the location bar; it still executes the file when called through html. I believe this header is necessary for legacy browsers, i.e. Netscape 4.x or less.

« previous php.notes (#125668) next »