php 截取某个字符串
$test = '/home/test/test.txt'; $result = substr($test,0,strrpos($test,"/")); echo $result;
$number = '/home/test/test.txt'; $result = substr($number,strripos($number,"/")+1); echo $result;
$test = '/home/test/test.txt'; $result = substr($test,0,strrpos($test,"/")); echo $result;
$number = '/home/test/test.txt'; $result = substr($number,strripos($number,"/")+1); echo $result;