ci editor image error showing

0
240

$host_name=$_SERVER[‘HTTP_HOST’];
if(preg_match(‘/(localhost|weblink4you.com)/’,$host_name)){
preg_match(“~^”.$host_name.”/([^/]+)(.*?)$~”,$host_name.$_SERVER[‘PHP_SELF’],$matches);
$baseUrl=’http://’.$host_name.”/”.$matches[1];
}else{
if(strpos($host_name,’ttp’)===false)
$baseUrl=’http://’.$host_name;
else
$baseUrl=$host_name;

}

https site add in define file

if($_SERVER[‘HTTPS’] == ‘on’){
define(‘SITE_WS_PATH’, ‘https://’.$_SERVER[‘HTTP_HOST’].SITE_SUB_PATH);
}
else{
define(‘SITE_WS_PATH’, ‘http://’.$_SERVER[‘HTTP_HOST’].SITE_SUB_PATH);
}

ci
query print      put this query last echo $this->db->last_query();