|
|
|
ภาพไม่ลง ไม่รู้ทำไมลง serve rแล้ว add ภาพแล้วไม่ลง |
|
|
|
|
|
|
|
ไม่ลงอ่าพี่ขนาดชื่อภาพยังไม่ลงฐานเลยอ่า
|
|
|
|
|
Date :
2009-12-23 14:31:36 |
By :
LuckyStar |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
<?
if($_POST['to'] == "" || $_POST['Topic'] == "" ||$_POST['Detail']== ""){
echo "กรุณากรอกข้อมูลให้ครบทุกช่อง<br>";
echo "<input type='button' value='กลับไปแก้ไข' onclick='history.back();' style='cursor:hand'>";
}else{
$to = $_POST['to'];
$Topic = $_POST['Topic'];
$Detail = $_POST['Detail'];
$Date_Post = $_POST['Date_Post'];
$date = date("U");
$id = $_SESSION[ID_Ad];
$ID_News = "N_".date("U");
if(!empty($_POST["Images_Con"])){
$Images_Con=$_POST["Images_Con"];
if($Images_Con != "") {
$type = getimagesize($Images_Con); //????????????????
if($type[2] == 1) { //??????????????????? gif
$image = $date."_img.gif";
} else if($type[2] == 2) { //??????????????????? jpg
$image = $date."_img.jpg";
}
copy($Images_Con, "images_news/$image"); //????????????????????????? images
chmod("images_news/$image", 0664);
}
$Images_Con=$image;
$sql = mysql_query("INSERT INTO News (ID_News,ID_Ad,Topic_News,Detail_News,Images_news,Date_News,To_News)
VALUES('$ID_News','$id','$Topic','$Detail','$Images_Con','$Date_Post','$to')");
}else{
$Images_Con= '1_img.jpg';
$sql = mysql_query("INSERT INTO News (ID_News,ID_Ad,Topic_News,Detail_News,Images_news,Date_News,To_News)
VALUES('$ID_News','$id','$Topic','$Detail','$Images_Con','$Date_Post','$to')");
}
?>
<Script language="javascript">
alert("บันทึกรายการข้อมูลตารางเสร็จสิ้น");
parent.location.href="Add_news_step1.php";
</Script>
<?
}
?>
code นี้อ่าพี่
|
|
|
|
|
Date :
2009-12-23 14:33:14 |
By :
LuckyStar |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|