Tutorial Use PHP inside JavaScript
This has only really been tested on Media Temple (gs) servers. In the folder with the JavaScript, the .htaccess file should include: SetHand...
https://iskablogs.blogspot.com/2014/03/tutorial-use-php-inside-javascript.html
This has only really been tested on Media Temple (gs) servers.
In the folder with the JavaScript, the .htaccess file should include:
SetHandler php5-script
In that above example, any file that includes the string "api" will be processed as PHP. Feel free to alter that RegEx.
Then in the JavaScript file itself, set the ContentType back to JavaScript:
In the folder with the JavaScript, the .htaccess file should include:
SetHandler php5-script
In that above example, any file that includes the string "api" will be processed as PHP. Feel free to alter that RegEx.
Then in the JavaScript file itself, set the ContentType back to JavaScript: