PHP + PNG
Fanis Dokianakis
madf at hellug.gr
Sun Oct 21 15:49:01 EEST 2001
On Sun, Oct 21, 2001 at 01:31:42PM +0300, Giorgos Pallas wrote:
> Geia se olous!
> Mathainw php teleutaia, kai exw to eksis provlima :
>
> exw se ena katalogo tou web server to arxeio test.html :
> <html>
> <body>
> <img SRC=xartis.php3>
> </body>
> </html>
>
> Sto xartis.php3 thelw na fortwnw mia png eikona, na kanw kati
> ypologismous, kai basei autwn na sxediazw grammes stin eikona. Ela omws
> pou an to xartis.php3 arxizei etsi :
> <?php
>
> $png = ImageCreateFromPNG("trafficmap.png");
> header("content-type: image/png");
> ImagePng($png);
> ImageDestroy($png);
>
> blah blah, ypologismoi (xwris omws tis entoles gia tis grammes)
>
> ?>
>
> otan kalw to test.html, kanonikotata emfanizetai i eikona png.
> Omws auto den ginetai na meinei etsi giati aploustata, prwta prepei na
> kanw tous ypologismous kai meta na emfanizw tin png. Omws an balw tis
> grammes
> $png = ImageCreateFromPNG("trafficmap.png");
> header("content-type: image/png");
> ImagePng($png);
> ImageDestroy($png);
>
> sto telos tou php kwdika, den paizei (bgazei sto browser to eikonidio me
> to X -> den brethike i eikona.
>
> Exei kaneis kamia idea giati ginetai auto;
>
Exo mia idea gia to ti simvainei. Prepei o kodikas ton ypologismon, na
trehei se infinite loop eite na kanei exit (me warning, pou den tha
emfanistei afou einai mesa sto <img>, hint: error_reporing(0);).
Dokimase na parageis statikes eikones (se arheio) kai na energopoiiseis,
tin anafora sfalmaton apo php.
Fanis
More information about the Linux-greek-users
mailing list