Description of the difference between php $_SERVER windows and linux
- 2021-01-03 20:51:36
- OfStack
These are some of the differences I've found in doing enterprise sites :(fyi)
1. $_SERVER['SERVER_NAME'] has/at the end, not/under windows. You can do this in the following ways
1, whether the system is directly added/then replaced, remember to replace str_replace('\\', '/', $fileUrl); Can.
2, judgment is the operating system, using PHP_OS, and then character interception for judgment.