|
|
|
ช่วยผมดูหน่อยคร๊าบบบบ ทำไม file ที่ browไป มันไม่ copyไปอยู๋ใน folder ที่ผมเอาไว้เก็บไฟล์ในฝั่ง server อ่ะครับผมทำไรผิดหรือป่าวคร๊าบบบ |
|
|
|
|
|
|
|
Code (PHP)
<?
$news_name=$_POST['news_name'];
$news_id=$_POST['news_id'];
$file_name=$_FILES['file_name']['name'];
$by_adm=$_POST['by_adm'];
$name=$_POST['name'];
$today_date=$_POST['dateT'];
$news_id=$_POST['news_id'];
$objConnect = mysql_connect("localhost","xxxxx","xxxx") or die("Error Connect to Database");
$objDB = mysql_select_db("xxxxx");
mysql_query("SET NAMES UTF8");
$strSQL = "INSERT INTO fnews ";
$strSQL .="(news_name,file_name,by_adm,name,dateT) VALUES ('".$_FILES["file_name"]["name"]."','$news_name','$by_adm','$name',NOW())";
$objQuery = mysql_query($strSQL);
if(copy($_FILES['file_name']['tmp_name'],"myfile/".$_FILES['file_name']['name']))
{
echo "Copy/Upload Complete<br>";
}
?>
</p>
<p><a href="news_view_apply.php">View files</a>
Tag : PHP, MySQL
|
|
|
|
|
|
Date :
2013-01-20 18:34:20 |
By :
dddd |
View :
806 |
Reply :
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ขอดู Form
|
|
|
|
|
Date :
2013-01-20 18:45:56 |
By :
Ex-[S]i[L]e[N]t |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 04
|