CoderZone.org

Category: >> PHP Code >> Get Path Info Bookmark and Share

<< lastnext >>

Snippet Name: Get Path Info

Description: The example given (/www/psoug/index.html)
would produce:

/www/psoug
index.html
html

Comment: (none)

Author: CoderZone
Language: PHP
Highlight Mode: PHP
Last Modified: March 01st, 2009

<?php 
 
$path_parts = pathinfo("/www/psoug/index.html"); 
 
echo $path_parts["dirname"] . "\n"; 
echo $path_parts["basename"] . "\n"; 
echo $path_parts["extension"] . "\n"; 
 
?> 
 
 
There haven't been any comments added for this snippet yet. You may add one if you like.  Add a comment 
© coderzone.org | users online: 6