我有這個問題:試圖使管理面板,那裏我有輸入的用戶和SMTP帳戶的傳遞,我需要儘可能安全之前發送到數據庫和我做這樣的:加密用戶SMTP之前發送到數據庫在codeigniter
$config = array(
'protocol' => 'smtp',
'smtp_host' => Settings_model::$db_config['smtp_host'],
'smtp_port' => Settings_model::$db_config['smtp_port'],
'smtp_user' => $this->encrypt->decode(Settings_model::$db_config['smtp_user']),
'smtp_pass' => $this->encrypt->decode(Settings_model::$db_config['smtp_pass']),
'smtp_timeout' => 30,
'charset' => "utf-8",
'newline' => "\r\n"
);
,我得到這個錯誤: Fatal error: Using $this when not in object context in /application/helpers/send_email_helper.php on line 29
此行:
'smtp_user' => $this->encrypt->decode(Settings_model::$db_config['smtp_user']),
'smtp_pass' => $this->encrypt->decode(Settings_model::$db_config['smtp_pass']),
任何想法?我不想在文件中公開通行證和用戶。 在此先感謝!