Syntax error: unexpected end of file problem [two solutions]

The article directories
Modify the php.ini configuration file to use notepad++ conversion format


PHP upload files to the server can be said to have a bumpy journey, there is a problem… About syntax error: Unexpected end of File, this problem is usually not your code problem. If you are using Linux server, after editing the script in Windows environment, the file format will be wrong because of incorrect return characters.
Modify the php.ini configuration file
This method is used to solve the problem, generally speaking. ?php?> That’s the normal way of writing it, but < ??> This can also be used as a short label. If you have PHP in this format, go to php.ini, modify short_open_tag = Off, change “Off” to “On”, and restart Apache.
Use notepad++ to convert the format
The reason for this is that the format layout under Linux is different from that of Windows, so I need to convert the file into
in Linux/ Unix format. At present, I haven’t found a way to convert the file into
in Linux/ Unix format. If you know, please inform ~


Read More: