Parse error: syntax error, unexpected T_STRING

T_String is the common parse error associated with the creation of PHP files,At times the site displays following error:

Parse error: syntax error, unexpected T_STRING in /home/username/public_html/index.html on line 1

This error is generally encountered because of the setting short_open_tag in php.ini.
short_open_tag  :: Allow the <? tag.  Otherwise, only <?php and <script> tags are recognized.

To remove the error:

Go to the document root of the domain.

cd /home/test/public_html

Check if .htaccess is available under the directory.

Insert following line in the .htaccess file

php_value short_open_tag off

Also you can set the php.ini in order to turn off the short_open_tag.

Open the file and locate the line ” short_open_tag = On”

Edit the line to read “short_open_tag = Off”. Save the file and reload the site.

The error will now be resolved.