Php 显示网站当前无法处理此请求的原因。尝试在linux服务器中上载映像时出现HTTP错误500
我有一个关于codeigniter的项目,它现在在localhost上运行得很好,当我在cpanel中上传一个文件到我的站点时,它显示example.com目前无法处理这个请求。HTTP错误500为什么?谁能告诉我该怎么办Php 显示网站当前无法处理此请求的原因。尝试在linux服务器中上载映像时出现HTTP错误500,php,codeigniter,cpanel,Php,Codeigniter,Cpanel,我有一个关于codeigniter的项目,它现在在localhost上运行得很好,当我在cpanel中上传一个文件到我的站点时,它显示example.com目前无法处理这个请求。HTTP错误500为什么?谁能告诉我该怎么办 public function doupload($id,$action) { $config['upload_path'] = 'SliderImages/'; $config['allowed_types'] = 'gif
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]
请有人引导我,我被困了很长时间!您的index.php位于以下路径:/home/mydomain/public\u html/index.php?或者您是否在application/config的配置文件中修改了base_url?到处看看是的!基本url类似于“mydomain.com/”基本url应该是绝对的,包括协议:
$config['base\u url']=”http://somesite.com/somedir/“
或https