Quote:
Originally Posted by Catalin
I've solved the problem. In the Javascript code was a short .php code inserted. I've deleted the .php and now everything work fine
|
If you want to include some PHP code in an external JavaScript then give the file a PHP extension and use PHP to add a header to the file:
Use the following if you need to support IE8 and earlier
header('Content-type: text/javascript');
or the following to set the correct JavaScript MIME type if you only need to support browsers that understand JavaScript
header('Content-type: application/javascript');