2022年7月01日
-
<?php
$full_name = 'c:wampphpphp.ini';
$base = basename($full_name); // $base is "php.ini"
$dir = dirname($full_name); // $dir is "c:wampphp"
?>
<?php
$path_parts = pathinfo('/www/htdocs/inc/lib.inc.php');
echo $path_parts['dirname'], "
";
echo $path_parts['basename'], "
";
echo $path_parts['extension'], "
";
echo $path_parts['filename'], "
"; // since PHP 5.2.0
?>
array explode ( string $delimiter , string $string [, int $limit ] )