这是错误
警告:move_uploaded_file() [function.move-uploaded-file]:open_basedir 限制生效。文件(C:\Windows\Temp\php205.tmp) 不在允许的路径内: (E:\inetpub\vhosts\astradingcompany.org\httpdocs) 在 E:\inetpub\vhosts\atradingcompany.org\httpdocs \mycar\postaddata.php 第 26 行
警告:move_uploaded_file(mycar/uploads/car001.jpg) [function.move-uploaded-file]:无法打开流:E:\inetpub\vhosts\atradingcompany.org\httpdocs\mycar\postaddata 中没有这样的文件或目录。第 26 行的 php
警告:move_uploaded_file() [function.move-uploaded-file]:无法将“C:\Windows\Temp\php205.tmp”移动到 E:\inetpub\vhosts\atradingcompany 中的“mycar/uploads/car001.jpg”。 org\httpdocs\mycar\postaddata.php 第 26 行
这是代码sippet
if ($_FILES['file']['error'] === UPLOAD_ERR_OK)
{
if((($_FILES['file']['type'] == 'image/gif')
|| ($_FILES["file"]['type'] == 'image/jpg')
|| ($_FILES["file"]['type'] == 'image/png')
|| ($_FILES["file"]['type'] == 'image/jpeg'))
//&& ($_FILES["file"]['size'] < 20000)
&& (in_array($extensions, $allowedextensions)))
{
if (file_exists("mycar/uploads/". $_FILES['file']['name']))
{
$msg = $_FILES['file']['name']. "<b> <font face='Verdana, Geneva, sans-serif' color='red'>File Already Exists</font></b>";
header('Location:postad.php?msg='.$msg);
}
else
{
// $filename = "mycar/uploads/" .$_FILES['file']['name'];
move_uploaded_file($_FILES['file']['tmp_name'], "mycar/uploads/" . $_FILES['file']['name']);
// is_uploaded_file($_FILES['file']['tmp_name']), "uploads/" . $_FILES['file']['name'];
// is_uploaded_file($_FILES['file']['tmp_name'],"uploads/" . $_FILES['file']['name']);
// copy($_FILES['file']['tmp_name'], $uploaddatafile);
// copy($_FILES['file']['tmp_name'], $filename);