View Single Post
ישן 29-08-06, 10:34   # 1
Elad-A
הוסטסניון
 
מיני פרופיל
תאריך הצטרפות: May 2006
הודעות: 1,987

Elad-A לא מחובר  

[PHP] עזרה בקשר ל GD

שלום,

רציתי לדעת למה אי אפשר להדפיס כלום אחרי הפלט של התמונה?

זה הקוד:

ככה אני שולף:
PHP קוד:
require('gd.php');
session_start();
$x $image->gd();
echo 
"<img src=gd.php?$x>" ;
echo 
"{$_SESSION['icode']}"
וזה הדף gd.php :

PHP קוד:

session_start
();
$image = new SecurityImage;
class 
SecurityImage 
{

function 
gd()
{
global 
$image;
header ("Content-type: image/png");
$this->iName $filename 're.png';
$this->iCreate $im imagecreatefrompng($filename);
$this->iCreateCode $RandSec strtoupper(substr(md5(rand(1,999999)),0,6)); //Making the 6 Characters Security Code , using MD5 And Rand()
$_SESSION['icode'] = $RandSec;
$this->iColor $textcolor imagecolorallocate($im,0,0,0); //White
$this->iImgString imagestring($im6,10,4$RandSec,$textcolor);
$this->iGetCode imagepng($im);
}

תודה.
  Reply With Quote