Copy the code The code is as follows:
define('BASE_PATH',str_replace('\','/',realpath(dirname(__FILE__).'/../')));
The above introduces what is the SD card root directory and the common methods of defining the website root directory in PHP, including what is the SD card root directory. I hope it will be helpful to friends who are interested in PHP tutorials.