• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

My Monkey Do

A Log of Coding Solutions

  • Home
  • Web Hosts
  • Tools
  • About

Javascript Files with PHP

October 5, 2011 by Webhead

Below is a great article on getting your PHP to print out a javascript file and including it like any other javascript file.   You basically just have to name the file something like “something.js.php” so that PHP knows to interpret the file.  Then include it like a normal javascript file.  In the something.js.php you can add a Header() function to make it render like a javascript file (include carriage returns).

www.givegoodweb.com/post/71/javascript-php

 

 

Filed Under: Coding Tagged With: javascript, php

Primary Sidebar

Topics

apache apple block editor chrome cms css debug eCommerce embed firebug firefox git gmail goDaddy google hosting htaccess html html 5 IE crap image iPad iPhone javascript jquery linux localization mac os x ms sql mysql open source optimize php php 5.3 responsive rest api seo svg tinymce woocommerce wordpress wpengine xss yii youtube




Categories

  • Coding
  • Off the Shelf
  • Plugins
  • Random Thoughts
  • Server Stuff
  • Tools