Jump to content
php.lv forumi

neticami, bet fakts - png gd


anonīms

Recommended Posts

phpinfo izmet, ka ir ieslēgts.

PNG Support enabled

Mēģinot kodu

$src = imagecreatefromjpeg(".../stats_background.png");
header('Content-Type: image/png');
imagepng($src);
imagedestroy($src);

kods nestrādā, bet visu png attiecīgi nomainot pret jpeg kods strādā.

Kas vēl varētu būt par vainu, ka hostings neatļauj vai viņam nepatīk png?

Link to comment
Share on other sites

uz localhosta precīzi tas pats kods iet. (Tā bilde arī eksistē, es vnk esmu pilno ceļu izdzēsis forumā).

Uz hostinga PHP versija ir pat jaunāka.

Vienīgā atšķirība ir tāda, ka localhostā nav šāda lieta, bet hostingā pie gd gan uzrādas

libPNG Version 1.4.1
Link to comment
Share on other sites

wtf, ko tas nozīmē

 

ejot caur browseri šī bilde ir, bet file_exsists neko neuzrāda.. :/

var_dump(file_exists("stats_background.png"));

 

true, bet tāpat kods neiet. bildes svars nav liels.

Edited by anonīms
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...