These are some differences I discovered in the process of building a corporate website: (for reference only)
1. $_SERVER['SERVER_NAME'] Under Windows system, there is / at the end, but there is no / under Linux. The following methods can be used to deal with it
1. No matter what kind of system it is, just add / and then replace it. Remember, str_replace('\', '/', $fileUrl); should be replaced like this.
2. To determine what kind of operating system it is, use PHP_OS, and then intercept characters to determine.