I use the free FTP software FileZilla. In most cases, whenever I open any PHP file from FTP using FileZilla, I get this error after editing then saving the file:
Parse error: syntax error, unexpected T_VARIABLE in
File path here
on line 1
How do I solve this error and get rid of this problem forever?
Should I switch to another FTP program?
2 Answers
It could be a problem with your file encoding. Make sure that your files are encoded in the same way as your wordpress install. In most cases your site use files encoded in UTF-8.
Go to FileZilla options: Open Site Manager > Charset tab – Custom Encoding > and see if it’s UTF-8.
When it’s set properly try to open and edit a file and see if it works!