mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
example starts at row 0
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@166575 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
7088521493
commit
67e076a26f
1 changed files with 11 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.21 $ -->
|
||||
<!-- $Revision: 1.22 $ -->
|
||||
<reference id="ref.image">
|
||||
<title>Image Functions</title>
|
||||
<titleabbrev>Image</titleabbrev>
|
||||
|
@ -168,14 +168,16 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
header("Content-type: image/png");
|
||||
$string = $_GET['text'];
|
||||
$im = imagecreatefrompng("images/button1.png");
|
||||
$orange = imagecolorallocate($im, 220, 210, 60);
|
||||
$px = (imagesx($im) - 7.5 * strlen($string)) / 2;
|
||||
imagestring($im, 3, $px, 9, $string, $orange);
|
||||
imagepng($im);
|
||||
imagedestroy($im);
|
||||
|
||||
header("Content-type: image/png");
|
||||
$string = $_GET['text'];
|
||||
$im = imagecreatefrompng("images/button1.png");
|
||||
$orange = imagecolorallocate($im, 220, 210, 60);
|
||||
$px = (imagesx($im) - 7.5 * strlen($string)) / 2;
|
||||
imagestring($im, 3, $px, 9, $string, $orange);
|
||||
imagepng($im);
|
||||
imagedestroy($im);
|
||||
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
|
Loading…
Reference in a new issue