How to use Filesystem pathinfo in PHP
In this article I am going to explain about pathinfo function in PHP.
PHP pathinfo() Function
The filesystem pathinfo function returns an array that contains information about a path.
Syntax of pathinfo function
Parameters in pathinfo function
It have two parameter:
Parameter |
Description |
path |
It specifies path to check. |
option |
It is optional parameter. |
Example of filesystem pathinfo function
<html>
<body>
<?php
$path_parts = pathinfo("C:\wamp\www\cookie.php");
echo $path_parts['dirname']."</br>";
echo $path_parts['basename']."</br>";
echo $path_parts['extension']."</br>";
echo $path_parts['filename'];
?>
</body>
</html>
|
Output:
You may also want to read these related articles :here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here