gpt4 book ai didi

PHP文件上传在本地工作但不在服务器上工作

转载 作者:行者123 更新时间:2023-11-29 03:34:06 29 4
gpt4 key购买 nike

当我在本地主机中上传一个 csv 文件时,它可以正常工作。所有验证都已完成,但在线上传文件时无法正常工作。文件正在刷新。这是我的示例代码

$data['error'] = '';    //initialize image upload error array to empty                                                                                                     
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'csv';
$config['max_size'] = '10000';

$this->load->library('upload', $config);

if (!$this->upload->do_upload())
{
$data['error'] = $this->upload->display_errors();
$data['mainpage']='category';
$data['mode']='addcsv';
$this->load->view('includes/mainpage',$data);
}
else
{
$file_data = $this->upload->data();
$file_path = './uploads/'.$file_data['file_name'];

最佳答案

请检查您对要上传的目录的写权限。

关于PHP文件上传在本地工作但不在服务器上工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25906324/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com