Run PHP code inside JavaScript

Insert this code into your site .htaccess file.

AddType application/x-httpd-php .js
AddHandler x-httpd-php5 .js

<FilesMatch ".(js|php)$">
SetHandler application/x-httpd-php


Share this snippet


Leave a Reply

Your email address will not be published. Required fields are marked *

Please respect the following rules: No advertising, no spam, no keyword in name field. Thank you!