rv20 Posted May 31, 2009 Share Posted May 31, 2009 I have downloaded some js library and one js lot of code has been saved as a *.php file and linked as, <script src="xxxxx.php" type="text/javascript"></script> of course the *.php file is all js code, no php code. never seen that before, does that mean that you can hide your js as you cannot view *.php files but it seems to have the effect for linking the js, surely i would have heard of this before as i have googled "hide js" etc... what is the catch? Link to comment https://forums.phpfreaks.com/topic/160373-solved-linking-js-as-a-php-file/ Share on other sites More sharing options...
daveoffy Posted May 31, 2009 Share Posted May 31, 2009 You can put anything in any type of file. This does not hide the JS though. .php files only hide the code in the <?php and ?> tags. Link to comment https://forums.phpfreaks.com/topic/160373-solved-linking-js-as-a-php-file/#findComment-846305 Share on other sites More sharing options...
rv20 Posted May 31, 2009 Author Share Posted May 31, 2009 ahhh right i see what you mean, thanks. Link to comment https://forums.phpfreaks.com/topic/160373-solved-linking-js-as-a-php-file/#findComment-846314 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.