主要是$_SERVER()函数 $host = $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST']; $imgurl = $upload-rootPath.$info['bigimg'] ['savepath'].$info['bigimg'] ['savename']; $url = $host.'/'.$imgurl; echo $url;
$host = $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST']; $imgurl = $upload->rootPath.$info['bigimg'] ['savepath'].$info['bigimg'] ['savename']; $url = $host.'/'.$imgurl; echo $url;