After following the tutorial, the corresponding page cannot be opened. After the hosts are modified, it is not saved by default. You need to select the save location and save it. When you open the hosts again through PHP, the modified results are not saved. In other words, when you save before, you save it as a file instead of saving it in the opened file.
Teacher, what should I do?
There is no permission for the hosts file, and the attribute read permission must be checked