Posted by Steve on 09/24/07 02:23
"macca" <ptmcnally@googlemail.com> wrote in message
news:1190599112.853214.48850@r29g2000hsg.googlegroups.com...
> function filename_asuc(){
>
> $last_dot = strlen(strchr($_SERVER['PHP_SELF'], '.'));
>
> $dir = explode('/', substr($_SERVER['PHP_SELF'], 0, - $last_dot));
>
> $sep = count($dir) - 1;
>
> return ucfirst($dir[$sep]);
>
> }
>
>
> // call using this
> echo filename_asuc();
that's all great...until you have a file name without an extension.
[Back to original message]
|