- substr: documentation ( source)
- basename: documentation ( source)
- print_r: documentation ( source)
- htmlentities: documentation ( source)
- parse_url: documentation ( source)
- strtolower: documentation ( source)
<?php
$url = "/work/csl_internet/brand/prs/";
$basename = substr( strtolower( basename( htmlentities($url) ) ), 0, strlen( basename( $url ) ) - 4 );
echo "Basename = " . basename( htmlentities($url) ) . "\n";
echo $basename . "\n";
echo "\n" . print_r(parse_url($url),true);
?>