Forum Moderators: open
I need to execute a dynamically created external JavaScript file(via PHP) within the "BODY" section of a HTML document. When I try to execute the script with these lines of code, no JavaScript is fetched:
<script type="text/javascript" src="..../myfile.php"></script>
My PHP looks something like this...
header("Cache-Control: no-store, no-cache");
header("Content-type: text/javascript");
The JavaScript is sent back with the "echo" function.
[quote]
Content-Type: application/x-javascript
[/quote]