How to open php file?
Actually, there is nothing special about php files. The only difference from text document .txt is that the suffix name is different. So of course you can also use Notepad to open a PHP file, but if you open a PHP file directly with Notepad-like software, you can only see the code of the file, but not the effect of the PHP file execution.
In addition, special attention should be paid to the fact that text files are saved in encoding formats, such as utf8, unicode, gbk and other encoding formats. Directly using software such as Notepad to open PHP files is prone to garbled characters. For example, using When you open a php file in utf8 format with Notepad, you will encounter garbled Chinese characters. Sometimes when you open a php file in utf8 format with Notepad and save it, it will become a file in gbk format, etc., which will cause some problems. Unusual problem.
Therefore, it is recommended to use software such as dreameweaver or notepad++ to open PHP files. You can also use the legendary editplus, but because editplus always appears a .bak backup file when saving (in fact, it is not very useful), it feels like it can be done in one fell swoop many times. , so it is more recommended to use Notepad++. This software is compact and supports code format highlighting. It can be said to be the best choice for ordinary users. For professionals, I recommend dreameweaver or eclipse, etc.
How to execute php files?
Executing PHP files requires a PHP operating environment in the machine. As for how to configure the PHP operating environment, I won’t read it. Readers can search for it on Baidu.