HOME > PHP > PHP Forum > อยากถามว่าทำไม Warning: copy(/www/telephone/images/joomla_logo_black.jpg) [function.copy]: failed to open stream: No such file or directory in
อยากถามว่าทำไม Warning: copy(/www/telephone/images/joomla_logo_black.jpg) [function.copy]: failed to open stream: No such file or directory in
Warning: copy(/www/telephone/images/joomla_logo_black.jpg) [function.copy]: failed to open stream: No such file or directory in C:\AppServ\www\telephone\upload.php on line 40
failed to copy C:\Windows\Temp\phpD6FF.tmp Code (PHP)
นี้โค๊ดคะ
<?
include "config.inc.php";
include "$language.php";
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE><?echo ""._NAMEAPP." v.$version" ?></TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="Phuttarak M. [email protected]">
<META NAME="Keywords" CONTENT="telephone, phuttarak, email, contact, search, mobile, customer, web, <?echo ""._NAMEAPP."";?>">
<META NAME="Description" CONTENT=<?echo ""._NAMEAPP."";?>>
<meta http-equiv="Content-Type" content="text/html; charset=tis-620">
<style type="text/css">
<!--
body {margin: 0px 0px; padding: 0px 0px ; font-family: MS Sans Serif ; font-size: 10pt}
a:link {text-decoration: none; color: blue }
a:visited {text-decoration: none; color: blue }
a:hover {text-decoration: none; color: red }
a:active {text-decoration: none; color: blue }
p, div, td, ul li, ol li { font-family: MS Sans Serif, Microsoft Sans Serif; font-size: 10pt }
-->
</style>
</HEAD>
<body>
<center>
<?php
//echo "ตัวแปร user file =$userfile <br> \n";
echo "<h2><font face=\"Verdana\">"._UPLOADSUCCESSFULLY."</font></h2>";
echo ""._FILENAME." = $userfile_name <br> \n";
echo ""._FILESIZE." = $userfile_size byte<br> \n";
echo ""._FILETYPE." = $userfile_type <br> \n";
if (!copy($userfile, $directory.$userfile_name)) {
print("failed to copy $userfile <br>\n");
}
//กรณีเป็นไฟล์ข้อความ
if ($userfile_type == 'text/plain'){
}
//กรณีเป็นไฟล์รูปภาพ
else if ( ($userfile_type == 'image/pjpeg') ||
($userfile_type == 'image/bmp') ||
($userfile_type == 'image/gif') )
{
//กำหนด forder ที่ไฟล์อยู่ออกมาโชว์
echo "<br><a href=\"images/$userfile_name\"><img src=images/$userfile_name boder=\"1\"></a> <br>\n";
echo "<FONT COLOR=\"red\"><br> "._URLIMAGE." </FONT> = images/$userfile_name <br>\n";
}
//กรณีไม่เป็นไฟล์ข้อความและรูปภาพ
//else
//{
//echo "Other file type<br>\n";
//}
echo " <p><a href=\"fileupload.php\" > "._BACK." </a> | <a href=\"add.php\"> "._ADDNUMBER." </a> \n";
?>
</center>
<br>
<hr color=1E90FF>
</center>
<? include "footer.php"; ?>
</body>
</html>