$dir = dirname($path); // /home/httpd/html 注意沒有尾端的'/'. 法二 $path = "/home/httpd/html/index.php"; $fs= pathinfo($path); print_r($fs);
確定! 回上一頁