Well my question is if you can add a code
If not, how can I do it to be possible.
Thank you
Well my question is if you can add a code
If not, how can I do it to be possible.
Thank you
Rename the .js file to .php, after that at the beginning of the file, add the following.
<?php
header("Content-type: text/javascript");
?>
Now you can include PHP codes both within these tags that we create, as in any other part of the file, remembering to follow the basic PHP rules.
This file will go through the PHP interpreter before it is sent to the client (as with an .php file with HTML, for example), and when it arrives on the client, it will be a common .js file.