获取文件扩展名 源代码截图源代码运行结果截图 源代码截图 源代码 <?php function jiequ($str,$s){ return strstr($str,$s); } echo "ab.jpg文件的扩展名为: ".jiequ("ab.jpg","."); ?> 运行结果截图