Title: javascript php coming out as wrong type
Last modified: August 19, 2016

---

# javascript php coming out as wrong type

 *  [milotimbol](https://wordpress.org/support/users/milotimbol/)
 * (@milotimbol)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/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/](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&gt](http://www.360philippines.com/wordpress/wp-content/themes/360philippines/js/effects.js.php”></script&gt);
 * <script type=”text/javascript” src=”[http://www.360philippines.com/wordpress/wp-content/themes/360philippines/js/test.js”></script&gt](http://www.360philippines.com/wordpress/wp-content/themes/360philippines/js/test.js”></script&gt);
 * 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

Viewing 1 replies (of 1 total)

 *  Thread Starter [milotimbol](https://wordpress.org/support/users/milotimbol/)
 * (@milotimbol)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/javascript-php-coming-out-as-wrong-type/#post-1234471)
 * Temporarily Instead of reading a .js.php file. I outputted the javascript into
   the page.
 * <script type=”text/javascript”>
    <?php include_once(“/wp-content/themes/360philippines/
   js/effects.js.php”); ?> </script>
 * This works but I don’t like how it looks. Any ideas how I can make the .js.php
   approach work?
 * I will come back and check on this post every once in a while.

Viewing 1 replies (of 1 total)

The topic ‘javascript php coming out as wrong type’ is closed to new replies.

## Tags

 * [headers](https://wordpress.org/support/topic-tag/headers/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [php](https://wordpress.org/support/topic-tag/php/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [milotimbol](https://wordpress.org/support/users/milotimbol/)
 * Last activity: [16 years, 7 months ago](https://wordpress.org/support/topic/javascript-php-coming-out-as-wrong-type/#post-1234471)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
