Mọi người giúp mình với. Tình hình là mình up code lên host mới mua thì bị báo các lỗi sau: +) A PHP Error was encountered Severity: Notice Message: Only variable references should be returned by reference Filename: core/Common.php Line Number: 257 Đoạn code ( dòng 257 là dòng return........config; ) : // Are any values being dynamically replaced? if (count($replace) > 0) { foreach ($replace as $key => $val) { if (isset($config[$key])) { $config[$key] = $val; } } } return $_config[0] =& $config; +) Và A PHP Error was encountered Severity: Warning Message: Cannot modify header information - headers already sent by (output started at /home/cameee23/public_html/system/core/Exceptions.php:185) Filename: core/Common.php Line Number: 438 Đoạn code ( dòng 438 là dòng header........TRUE); ) if (isset($stati[$code]) AND $text == '') { $text = $stati[$code]; } if ($text == '') { show_error('No status text available. Please check your status code number or supply your own message text.', 500); } $server_protocol = (isset($_SERVER['SERVER_PROTOCOL'])) ? $_SERVER['SERVER_PROTOCOL'] : FALSE; if (substr(php_sapi_name(), 0, 3) == 'cgi') { header("Status: {$code} {$text}", TRUE); } elseif ($server_protocol == 'HTTP/1.1' OR $server_protocol == 'HTTP/1.0') Mong các cao nhân giúp
Bạn thử sửaMã:return $_config[0] =& $config; thành Mã:$_config[0] =& $config; return $_config[0]; mình cũng không chắc nhưng hi vọng là đúng.
Tiện đây bạn cho mình hỏi thêm lỗi này nhé A Database Error Occurred Unable to connect to your database server using the provided settings. Filename: /home/cameee23/public_html/third_party/MX/Loader.php Line Number: 102 Đoạn code: public function database($params = '', $return = FALSE, $active_record = NULL) { if (class_exists('CI_DB', FALSE) AND $return == FALSE AND $active_record == NULL AND isset(CI::$APP->db) AND is_object(CI::$APP->db)) return; require_once BASEPATH.'database/DB'.EXT; if ($return === TRUE) return DB($params, $active_record); CI::$APP->db = DB($params, $active_record); return CI::$APP->db; } Dòng 102 : CI::$APP->db = DB($params, $active_record); tks bác.
Bạn kiểm tra thông tin trong file /application/config/database.php xem đúng chưa nhé. Cái này là thông báo không kết nối được csdl thôi.