PHP variables in external js file

September 21st, 2011 | Tags: , ,

Apache config: (you need to set AllowOverride all)

<Directory /var/www/>
                Options FollowSymLinks MultiViews
                <strong>AllowOverride all</strong>
                Order allow,deny
                Allow from all
</Directory>

Create .htaccess file in document root ( /var/www/.htaccess ) and set

AddHandler application/x-httpd-php js
No comments yet.