Loading php code in javascript tag
-
Hi.
When configuring the AWS CDN in the plugin it presents the following error: Uncaught SyntaxError: Unexpected token ‘<‘
The error is because the plugin is trying to load PHP code into the javascript tag.
File code start:
<? php// Check everything exists before using it
if (! isset ($ _ SERVER [‘HTTP_ACCEPT_ENCODING’]))
$ _SERVER [‘HTTP_ACCEPT_ENCODING’] = ”;
if (! isset ($ _ SERVER [‘HTTP_USER_AGENT’]))
$ _SERVER [‘HTTP_USER_AGENT’] = ”;// Determine supported compression method
How it is being loaded:
<script src = “https://d3n3c8rpwp6bs7.cloudfront.net/wp-content/cache/autoptimize/autoptimize_be34bfac9799a07b2b421b8184239fbd.php”> </script>This file should not be being imported through a scrypt tag.
- The topic ‘Loading php code in javascript tag’ is closed to new replies.