javascript php coming out as wrong type
-
Hi,
I’m still trying to figure this one out. I know the problem but can’t solve it.
If you access this right now as I am trying to fix it (probably not after this day)
http://www.360philippines.com/wordpress/
You’ll see these two lines
<script type=”text/javascript” src=”http://www.360philippines.com/wordpress/wp-content/themes/360philippines/js/effects.js.php”></script>
<script type=”text/javascript” src=”http://www.360philippines.com/wordpress/wp-content/themes/360philippines/js/test.js”></script>
the 1st one is the dynamic version and the 2nd is the result of that file when you access it through the browser
When I try to access through the 1st one in the browser it is not interpreted as javascript. But the 2nd one is. I know it has something to do with headers. So I added this on top of effects.js.php
<?php
Header(“content-type: application/x-javascript”);
include(“../../../../wp-blog-header.php”);
?>But it still doesn’t seem to fix it. The strange thing is It’s working fine in my machine using wamp. Now I’m hosting on godaddy. I had trouble with case sensitivity a while ago but I’m not sure it is related to that. Has anybody encountered this?
Thanks,
Milo
The topic ‘javascript php coming out as wrong type’ is closed to new replies.