|
 |
|
ถามเกี่ยวกับ การนำภาพที่สร้างจาก php ไปใช้ครับ คือว่าผมจะทำ ภาพยืนยันขึ้นใช้เองครับ |
|
 |
|
|
 |
 |
|
คือว่าผมจะทำ ภาพยืนยันขึ้นใช้เองครับ แต่ผมไม่รู้ว่าสร้างแล้วจะนำไปใช้ยังไง 
grapics.php
Code (PHP)
<?php
$img = imageCreate(70,20)or die("Error Images");
imagecolorallocate($img, 255, 238, 159);
$number = rand(1000,9999);
$color = imagecolorallocate($img, 233, 14, 91);
imagestring($img, 5,19,2, $number, $color);
imagepng($img);
imagedestroy($img);
?>
หน้า index ::
<img src="ใส่รูปตรงนี้ครับ" /></td>
ไม่ทราบว่าจะไปเรียกใช้ไฟล์มาใช้ในหน้า index อย่างไรครับ
Tag : - - - -

|
|
 |
 |
 |
 |
Date :
2009-10-18 23:55:09 |
By :
pollok |
View :
884 |
Reply :
4 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
image ที่ gen มาชื่ออะไร
แล้ว path ที่คุณเก็บอยู่ไหน
ผมสมมติว่าคุณเก็บไว้ใน images แล้วรูปชื่อ genImage.jpg
<img src="./images/genImage.jp" />
./ หมายถึง file index กับ folder images อยู่ใน folder เดียวกัน ครับ หรือเรียกว่า folder ปัจจุบัน ไม่ใส่ก็ได้ครับ
|
 |
 |
 |
 |
Date :
2009-10-19 00:05:08 |
By :
DownsTream |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Code (PHP)
<img src="grapics.php">
|
 |
 |
 |
 |
Date :
2009-10-19 00:11:17 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ใช้ตาม MR.WIN แล้วครับ แต่มันติดปัญหามันขึ้นเป็นภาษามั่วครับ
หรือผมต้องทำการ Gen รูปแล้วให้ save ลงก่อนแล้วเรียกใช้ครับ
|
 |
 |
 |
 |
Date :
2009-10-19 12:51:04 |
By :
pollok |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ทำได้แล้วครับ ดันเผลอลืมเอา require grapics.php ออก 
|
 |
 |
 |
 |
Date :
2009-10-19 14:10:36 |
By :
pollok |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 02
|