clonetrooper9494 Posted January 21, 2008 Share Posted January 21, 2008 I have a PHP function, and I want it to be included on every page... and but I don't want every page to be .php ... would this work? <script src="mypage.php"></script> Link to comment Share on other sites More sharing options...
Ingolme Posted January 21, 2008 Share Posted January 21, 2008 If you want PHP to run, you'll have to give it a PHP extension. You can call a script with a .php extension, as you wrote there, but it won't be included into the page, it will be interpretted as script. So if it's not script it won't run because it will have errors. Link to comment Share on other sites More sharing options...
clonetrooper9494 Posted January 21, 2008 Author Share Posted January 21, 2008 I guess I could have a document.write() ... Link to comment Share on other sites More sharing options...
jhecht Posted January 21, 2008 Share Posted January 21, 2008 Ajax. Go look it up. It'll save you time. Link to comment Share on other sites More sharing options...
clonetrooper9494 Posted January 21, 2008 Author Share Posted January 21, 2008 Oh! I forgot about ajax! your right, I can use that! thanks!Now all I need is to get a JS error fixed... bye Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.