我有一个关于codeigniter的项目,当我上传到cpanel并将文件上传到我的网站时,它现在在localhost上运行良好,它显示example.com目前无法处理此请求。 HTTP ERROR 500为什么?谁能告诉我该怎么做?
public function doupload($id,$action)
{
$config['upload_path'] = 'SliderImages/';
$config['allowed_types'] = 'gif|jpg|png|jpeg|psd|pdf|tiff';
$config['overwrite'] = TRUE;
$config['encrypt_name'] = false;
$config['max_size'] = 10000000;
$config['max_width'] = 999999;
$config['max_height'] =99999;
$this->upload->initialize($config);
$files = $_FILES;
if($action == "insert")
{
if($_FILES['slide_image']['name'] !== '')
{
$_FILES['userfile']['name']= $files['slide_image']['name'];
$file_name = $_FILES['userfile']['name'];
$name =explode('.',$file_name);
$_FILES['userfile']['name'] = $id. '.' .$name[1];
$_FILES['userfile']['type']= $files['slide_image']['type'];
$_FILES['userfile']['tmp_name']= $files['slide_image']['tmp_name'];
$_FILES['userfile']['error']= $files['slide_image']['error'];
$_FILES['userfile']['size']= $files['slide_image']['size'];
//$this->upload->do_upload();
if (!$this->upload->do_upload())
{
$error = array('error' => $this->upload->display_errors());
return $error;
//print_r($error);die();
}
else
{
$msg = array('upload_data' => $this->upload->data());
return $this->upload->data('file_name');
}
}
}
}
当我检查服务器错误日志时显示
[Sat Dec 17 03:52:20.696998 2016] [:error]
[pid 32759:tid 140615796852480] [client 66.249.69.202:48854]
File does not exist: /home/mydomain/public_html/index.php
无法理解为什么会出现这个错误?
看到这张图片清楚地了解
[enter image description here][1]