I get 'unexpected T_STRING' error

You may get this error because all .html files are parsed as PHP here. So, if your .html file contains "<?" or "?>" tags/text (which shows for file parser that PHP code started), you get this error. This can happen with XML files if they are not using correct content type. If order to fix this error you need to remove "<?" and "?>" symbols or entire lines with these symbols from your HTML page source.

  • unexpected, T_STRING, error, PHP, contains
  • 23 Users Found This Useful
Was this answer helpful?

Related Articles

Do you support GCC compiler?

GCC compilers are not supported on Costalo Shared Hosting. You can still install it on our VPS...

How can I change the php.ini file?

Access to the php.ini file is not allowed for Shared Hosting customers here. However, most PHP...

How can I modify the PHP timezone setting for my website?

Your server's Global time configuration cannot be changed, but you can use the PHP function...

How to parse PHP in HTML files?

If you want to make all of your website's .html pages to run as .php files instead (parsing PHP...

How to turn off PHP error reporting?

To turn off PHP error reporting you can use the following snippet in your PHP script:...