我正在尝试在 Opencart 中自定义上传图片,
这是我的代码:->
$base_url = $this->config->get('config_url');
$upload_path = $base_url."image/customer/";
//echo $upload_path . $image1;die;
if (!empty($_FILES['image']['name'])) {
$image1 = $_FILES['image']['name'];
$file_tmp = $_FILES['image']['tmp_name'];
$img_res= move_uploaded_file($file_tmp, $upload_path . $image1);
}
我收到此错误消息:->
警告:
move_uploaded_file( http://localhost/wm/image/customer/download (1).jpg): 无法打开流: HTTP wrapper 不支持 C:\xampp\htdocs\wm\catalog\controller\feed 中的可写连接user_api.php 第 220 行警告:move_uploaded_file(): Unable to move 'C:\xampp\tmp\phpC5CC.tmp' to ' http://localhost/wm/image/customer/download (1).jpg' in C :\xampp\htdocs\wm\catalog\controller\feed\user_api.php 在第 220 行