标签: php glob
我只是想显示我的图片的名称,而没有路径(../uploadedImages/)
../uploadedImages/
<?php $images = glob("../uploadedImages/[kK]*.{jpg,png,gif,bmp}",GLOB_BRACE); foreach($images as $image) {echo "$image<br>"} ?>
答案 0 :(得分:17)
使用basename
basename
echo basename($image) . "<br>";