Reply to Re: imagecreatefromgif not working

Your name:

Reply:


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]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация