|
 |
|
ข้อมูลในเว็บไซต์หายไป จากกันใช้งานเว็บไซต์มานาน 1-2 ปี ไม่เคยเกิดกรณีข้อมูลหาย เมื่อ 2-3 เดือนที่ผ่านมาข้อมูลในเว็บไซต์หาย |
|
 |
|
|
 |
 |
|
น่าจะมีรายละเอียดของโปรแกรมหรือคำสั่งที่ใช้เขียนด้วยน่ะครับ เผื่อจะมีสมาชิกสามารถแนะนำได้ 
|
 |
 |
 |
 |
Date :
2010-07-21 18:13:19 |
By :
webmaster |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เนื่องระบบเว็บไซต์ที่ดูแลค่อนข้างจะมีหลายส่วนการทำงานหนะคะ จึงขอยกตัวอย่างโค้ด เพิ่มข้อมูลข่าวนะคะ
<?php
include"../config.inc.php";
$ActDate=$_POST['ActDate'];
$PAct=$_POST['PAct'];
$ActTitle=$_POST['ActTitle'];
$ActDetail=$_POST['ActDetail'];
$b_id=$_POST['b_id'];
$images = $_FILES['ActPic']['tmp_name'];
$ActPic_name = $_FILES['ActPic']['name'];
//กำหนดคงามสูงของรูปใหม่ สำหรับความกว้างไม่ต้องกำหนดครับ
// เพราะโปรแกรมจะทำการคำรวณความกว้างให้พอดีกับขนาดของรูปที่ได้ทำการ Resize
$height=120;
$size=GetimageSize($images);
$width=round($height*$size[0]/$size[1]);
$images_orig = ImageCreateFromJPEG($images);
$photoX = ImagesX($images_orig);
$photoY = ImagesY($images_orig);
$images_fin = ImageCreateTrueColor($width, $height);
ImageCopyResampled($images_fin, $images_orig, 0, 0, 0, 0, $width+1, $height+1, $photoX, $photoY);
ImageJPEG($images_fin,"FilePicAct/".$ActPic_name); // ชื่อไฟล์ใหม่
ImageDestroy($images_orig);
ImageDestroy($images_fin);
$sql="insert into activity (ActDate ,PAct ,ActTitle ,ActDetail , b_id ,ActPic) values('$ActDate' ,'$PAct' ,'$ActTitle' ,'$ActDetail' ,'$b_id' , '$ActPic_name')";
mysql_query($sql)or die("Err Add projects".mysql_error());
echo "<meta http-equiv='refresh' content='0 ;url=listAct.php'>" ;
?>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
|
 |
 |
 |
 |
Date :
2010-07-21 20:37:01 |
By :
mamijung_jung |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 03
|