php question

i wrote a php script, has these two lines

$preFileType = pathinfo("$path/$newFile"); echo
$preFileType[“extension”]. "
";

when i have them activated, the script wont run, when i comment them out,
it runs fine, with the exception of not sorting out the files by the
extensions.

$path is assigned the dir of the files im working with, and $newFile is
the name of the file, so it should be looking like pathinfo(“path/file”);

but, it crashes it, any ideas?

Tony Ranieri

> i wrote a php script, has these two lines
>
> $preFileType = pathinfo("$path/$newFile"); echo
> $preFileType[“extension”]. "
";

What does this display if you replace those lines with it?

echo "path=$path<br>
"; flush(); echo “newFile=$newFile<br>
“; flush();
$preFileType = pathinfo(”$path/$newFile”); print_r($preFileType); flush();
echo $preFileType[“extension”]. "
";


Jon Caruana jcaruana@home.com

ehh, i decided to do stristr("$newFile",“extension”); replacing extension
by the one i want that time… it works fine now, thanks tho

Tony Ranieri

“Jon Caruana” <jcaruana@home.com> wrote in message
news:9rcfb1$rf7$1@www.t-shirtcountdown.com
> > i wrote a php script, has these two lines
> >
> > $preFileType = pathinfo("$path/$newFile"); echo
> > $preFileType[“extension”]. "
";

> …
>
> What does this display if you replace those lines with it?
>
> echo "path=$path<br>
"; flush(); echo "newFile=$newFile<br>
";

> flush(); $preFileType = pathinfo("$path/$newFile");
> print_r($preFileType); flush(); echo $preFileType[“extension”]. "
";

>
>
> –
> Jon Caruana jcaruana@home.com

> ehh, i decided to do stristr("$newFile",“extension”); replacing
> extension
by
> the one i want that time… it works fine now, thanks tho

Ok.


Jon Caruana jcaruana@home.com