I want to execute some php code inside a javascript file in codeigniter using
.htaccess
<Directory /path/>
<Files file.js>
AddHandler x-httpd-php5 .js
</Files>
and in my javascript file
<?php
header('Content-Type: application/x-javascript', true)
I have read from the codeigniter forums that executing php inside a .js file may make my web application insecure but i don't understand why this is.
How can a client exploit the changes i made of being able to execute php in the js file?.