|
|
|
upload file ไม่ได้ค่ะ มันไม่เข้าdatabase และ โฟลเดอร์ |
|
|
|
|
|
|
|
บอกแค่นี้ไม่มีใครรู้ครับ ต้องดูโค๊ดกัน
|
|
|
|
|
Date :
2011-01-23 12:02:52 |
By :
PlaKriM |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ต้องดู โค็ดครับ
|
|
|
|
|
Date :
2011-01-23 19:19:50 |
By :
smob00472 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?php
@session_start();
if($_POST["submit"])
{
///coding
if($_SESSION["name"])
{
/////variable
$name= $_FILES["file"]["name"];
$type= $_FILES["file"]["type"];
$size= $_FILES["file"]["size"];
$temp_name= $_FILES["file"]["temp_name"];/// the place store on server
$error= $_FILES["file"]["error"];
if($type == "image/jpeg" || $type == "image/gif")
{
if($size>11000 && $size<170000)
{
if($error>0)
{
echo "Error!!!!".$error;
}
else
{
if(file_exists("upload/".$name))
{
echo $name."already exits.";
}
else
{
$location ="upload/".$name;
move_upload_files($temp_name, $location);
$user = $_SESSION["name"];
$sqlcode = mysql_query("INSERT INTO imageupload(id, user, loaction)VALUES('', '$user', '$loaction') ");
echo"<a href ='$location'>click here to view your image.</a>";
}
}
}
else
{
echo "please check the size of your file";
}
}
}
}
?>
|
|
|
|
|
Date :
2011-01-23 19:25:34 |
By :
หนูไอซ์ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 05
|