<?php $array=array("index.php","indexssss.php","indexss.php"); $isin = in_array(substr($_SERVER['PHP_SELF'],6),$array); if($isin){echo "有权限!";}else{echo "没权限!!!";}