|
|
|
มึนครับทำบนเครื่อง อัพไฟล์ได้ พอขึ้น เชิฟ จริง Warning: copy(myfile/demo6.sql) [function.copy]: fail |
|
|
|
|
|
|
|
Warning: copy(myfile/demo6.sql) [function.copy]: failed to open stream: Permission denied in D:\Internet\cem\upload\up.php on line 23
upload : error
**CODE**
<?php
$destination_path =getcwd().DIRECTORY_SEPARATOR;
$result = 0;
$target_path = $destination_path . basename( $_FILES['myfile']['name']);
if(@move_uploaded_file($_FILES['myfile']['tmp_name'], $target_path)) {
$result = 1;
$uploadDir ="myfile/";
$fileName = $_FILES['myfile']['name'];
$tmpName = $_FILES['myfile']['tmp_name'];
$fileSize = $_FILES['myfile']['size'];
$fileType = $_FILES['myfile']['type'];
$filePath = $uploadDir . $fileName;
$link=mysql_connect("localhost","","");
if (!$link)
{
echo "Error MySQL";
}
else
{
mysql_select_db("cemdata",$link) or die ("error");
$query = "INSERT INTO uploadfile (email,fileName, size, type, path ) "."VALUES ('$email','$fileName', '$fileSize', '$fileType', '$filePath')";
mysql_query( $query ,$link );
mysql_close($link);
print("upload complete");
}
}
sleep(1);
?>
Tag : - - - -
|
|
|
|
|
|
Date :
2009-06-26 16:00:35 |
By :
pjax |
View :
1166 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chmod myfile to 0777 now!!!
|
|
|
|
|
Date :
2009-06-26 19:23:19 |
By :
plakrim |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 04
|