Vebers Posted February 28, 2006 Report Share Posted February 28, 2006 Nezinu kapēc, bet uz severa negrib darboties imagettftext(); f-ja. Bilde parādas, tikai teksts uz tās kas paradzēts netiek uzrakstīts. Piemērs no php.net <?php // Set the content-type header("Content-type: image/png"); // Create the image $im = imagecreatetruecolor(400, 30); // Create some colors $white = imagecolorallocate($im, 255, 255, 255); $grey = imagecolorallocate($im, 128, 128, 128); $black = imagecolorallocate($im, 0, 0, 0); // The text to draw $text = 'Testing...'; // Replace path by your own font path $font = $_SERVER['DOCUMENT_ROOT'].'/top/verdana.ttf'; // Add some shadow to the text imagettftext($im, 20, 0, 11, 21, $grey, $font, $text); // Add the text imagettftext($im, 20, 0, 10, 20, $black, $font, $text); // Using imagepng() results in clearer text compared with imagejpeg() imagepng($im); imagedestroy($im); ?> Safe mode = on Link to comment Share on other sites More sharing options...
bubu Posted February 28, 2006 Report Share Posted February 28, 2006 error_reporting == E_ALL ? display_errors == 1? Link to comment Share on other sites More sharing options...
Vebers Posted February 28, 2006 Author Report Share Posted February 28, 2006 error_reporting = 2047 ? display errors = off Link to comment Share on other sites More sharing options...
Delfins Posted February 28, 2006 Report Share Posted February 28, 2006 Manuprāt dēl šitā (ja ir open_base_dir) ----------------------- Safe mode = on Neliec priekšā fontam DOCUMENT_ROOT Link to comment Share on other sites More sharing options...
Vebers Posted February 28, 2006 Author Report Share Posted February 28, 2006 hmm.. uzliku './verdana.ttf' un 'verdana.ttf', bet nekādu izmaiņu. Open_basedir = on. verdana.ttf, ir iekopēts tajā pašā dirā, kur darbojas skripts. Link to comment Share on other sites More sharing options...
Klez Posted February 28, 2006 Report Share Posted February 28, 2006 (edited) ini_set('display_errors',1) mok kko izmet :) FreeType lib ira ? no man: Notice that the path to the TrueType font has to be included in open_basedir list if open_basedir restriction is activated in php.ini. http://lv.php.net/manual/en/function.imagettftext.php Edited February 28, 2006 by Klez Link to comment Share on other sites More sharing options...
bubu Posted February 28, 2006 Report Share Posted February 28, 2006 Vienk varbūt nav ttf atbalsta, tāpēc jau arī prasīju error reportingu un erroru rādīšanu. Link to comment Share on other sites More sharing options...
Vebers Posted February 28, 2006 Author Report Share Posted February 28, 2006 errorus nerāda vienalga. :( TrueType ir: Array( [GD Version]=> bundled (2.0.28 compatible) [FreeType Support] => 1 [FreeType Linkage] => with TTF library [T1Lib Support] => 1 [GIF Read Support] => 1 [GIF Create Support] => 1 [JPG Support] => 1 [PNG Support] => 1 [WBMP Support] => 1 [XPM Support] => [XBM Support] => 1 [JIS-mapped Japanese Font Support] => ) hmm.. tad sanāk, ka tam verdana.ttf ir jabūt manā open_basedir ? Ievietoju, bet nekā.. Link to comment Share on other sites More sharing options...
Grey_Wolf Posted February 28, 2006 Report Share Posted February 28, 2006 (edited) imagettftext(); ??? ----- This function requires both the GD library and the FreeType library. --------------- siikaak P.S. nesenaa pagaatnee (pats gan neko neprogrammeju tik paluudz helpu ) saskaros ar ko liidziigu ... edit : nu ieksx www.php.net taksh ir iespejams mekleet peec preciizas f-jas ... vai tad gruuti ???? it iipashi ja ir aizdomas par kadu no f-jam? Edited February 28, 2006 by Grey_Wolf Link to comment Share on other sites More sharing options...
Delfins Posted March 1, 2006 Report Share Posted March 1, 2006 a tev mājās viss šancē? Ja šancē, tad tiešām problēmas ar konfigu: nav perm uz fontu vai to neatrod nezkāpēc Un ieslēdz tu tos errorus... Ja nav iespējas konfigurēt serveri - tad uzraksti vai paņem gatavu Error handleri un bliez savā buferī, tad paskaties kas tur notiek... Link to comment Share on other sites More sharing options...
Recommended Posts