PHP 图片处理

xiaoxiao2021-02-28  36

1、返回去掉域名

$img_url = "https://xx.xx.xx.xx/upload/image/productImages/1526886370674.JPG"; $pos = strpos(str_replace('://', ':::', $img_url), '/'); $imgUrl = substr($img_url,$pos); //返回的子字符串将从 start 位置开始直到字符串结尾。 print_r($imgUrl); ///upload/image/productImages/1526886370674.JPG

2、返回域名

转载请注明原文地址: https://www.6miu.com/read-1650155.html

最新回复(0)