|
 |
|
ช่วยด้วยครับ Warning ครับแก้ไม่หาย ได้โปรดเถอะ คือต้องรีบแก้ด้วยเพราะเดี๋ยวส่งไม่ทัน |
|
 |
|
|
 |
 |
|
ช่วยด้วยครับ แก้มานานยังไม่หายเลย ปวดหัวเลย ช่วยน่อยน่ะครับ คือจะส่งแข่งขันด้วยอ่ะครับ

img4.php
<?
session_start();
$sess_id=$_SESSION[sess_id];
$sess_img=$_SESSION[sess_img];
$stickerX=$_GET['stickerX'];
$stickerY=$_GET['stickerY'];
$stickernumber=$_GET['stickernumber'];
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sticker Asean</title>
<style type="text/css">
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
#apDiv2 { position: absolute;
left: 0px;
top: 0px;
width: 500px;
height: 465px;
z-index: 1;
}
</style>
</head>
<body>
<div id="apDiv2"></div>
<?
if ($sess_id<>session_id() or $sess_img=="") {
header( "Location: img.php"); exit();
} else {
if($_SESSION[sess_lastname]=="png"){
$myImage = @imagecreatefrompng('imgcrop/'.$sess_img);
}else if($_SESSION[sess_lastname]=="jpg" and $_SESSION['sess_lastname']=="jpeg") {
$myImage = @imagecreatefromjpeg('imgcrop/'.$sess_img);
}else if($_SESSION[sess_lastname]=="gif") {
$myImage = @imagecreatefromgif('imgcrop/'.$sess_img);
}
//$myImage = imagecreatefromjpeg('imgcrop/'.$sess_img);
$mysticker = @imagecreatefrompng('images/sticker/sticker'.$stickernumber.'.png');
//$srcWidth = imagesx($mysticker);
//$srcHeight = imagesy($mysticker);
imagecopy($myImage, $mysticker, $stickerX, $stickerY, 0, 0, 300, 300);
//$myImage2 = imagecopymerge($myImage, $mysticker, $stickerX, $stickerY, 0, 0, 300, 300, 100);
$imgname = date("d-m-y-h-i-s")."".rand(1,100);
$imgnamefull = "imgshare/".$imgname.".png";
imagejpeg($myImage,$imgnamefull);
//copy($myImage,$imgnamefull);
}
?>
<img src="<?="$imgnamefull";?>">
</body>
</html>
นี้ตัวโปรแกรมน่ะครับ http://www.stouaward.com/team1_15/stickerasean/
Tag : PHP, HTML/CSS, JavaScript, jQuery, CakePHP

|
|
 |
 |
 |
 |
Date :
2014-08-15 17:08:54 |
By :
nine9517 |
View :
760 |
Reply :
5 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
สามารถ อัพโหลด file เข้าไปได้มั้ยครับ
ถ้ารีบมาก บรรทัดแรกใส่ไปก่อนครับ
Code (PHP)
error_reporting(0);
|
 |
 |
 |
 |
Date :
2014-08-15 17:13:23 |
By :
Ex-[S]i[L]e[N]t |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ต้องเป็นไฟล์ Png น่ะครับ
|
 |
 |
 |
 |
Date :
2014-08-15 17:34:12 |
By :
nine9517 |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ถ้าดูโค๊ดคงต้องดูยาวตั้งแต่เริ่ม session เลยล่ะครับว่า session มีอยู่จริงหรือไม่ อีกอย่าง ดูจากhost ไม่ได้หลอกครับ ต้องดูจาก path ว่ารูปมีอยู่จริงรึเปล่า ?? ผมเลยถามไงครับว่า อยู่ใน path มั้ย
|
ประวัติการแก้ไข 2014-08-15 18:18:44
 |
 |
 |
 |
Date :
2014-08-15 18:16:32 |
By :
Ex-[S]i[L]e[N]t |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 04
|