|
Posted by Bob Bedford on 08/10/06 16:08
"moxmormor" <moxmormor@gmail.com> a ιcrit dans le message de news:
1155225702.244479.229140@i42g2000cwa.googlegroups.com...
>> Are you sure about the file path ? try to add the complete path of the
>> file,
>> maybe with a if file_exists() to be sure...and print an error message if
>> it
>> doesn't exists.
>
>
> Now I'm confused. When it executed the following script, the output was
> 'nonexistant'.
>
> <?php
> function billede()
> {
> if (!file_exists('hindenburg.gif'))
> {
> $bill = imageCreateFromGIF ('hindenburg.gif');
> return $bill;
> }
> else
> echo "nonexistant";
> }
> billede();
> ?>
>
> However, when I changed 'hindenburg.gif' to
> 'moxmormor_org/htdocs/hindenburg.gif' it went blank again.
You shouldn't user a path like this, instead use server variables in order
to be sure:
change moxmormor_org/htdocs/hindenburg.gif
to $_SERVER['DOCUMENT_ROOT'].'/hindenburg.gif';
also be very carefull, on Linux the filesystem is case sensitive, so
hindenburg.gif <> hindenburg.GIF
Bob
[Back to original message]
|