1

私はコードイグナイターとイオン認証を使用しています。ユーザーにメールを送信しようとすると問題が発生します。

これは機能しています:

$message = 'hello';
$this->email->from($this->config->item('admin_email', 'ion_auth'), $this->config->item('site_title', 'ion_auth'));
$this->email->to($user->email);
$this->email->subject($this->config->item('site_title', 'ion_auth') . ' - ' . $this->lang->line('email_forgotten_password_subject'));
$this->email->message($message);

tpl を使用するように変更すると、機能しません:
/views/forgot_password.tpl.php

$message = $this->load->view('forgot_password.tpl.php', $data, TRUE);
$this->email->from($this->config->item('admin_email', 'ion_auth'), $this->config->item('site_title', 'ion_auth'));
$this->email->to($user->email);
$this->email->subject($this->config->item('site_title', 'ion_auth') . ' - ' . $this->lang->line('email_forgotten_password_subject'));
$this->email->message($message);

pls はアドバイス、ありがとう。

4

1 に答える 1

0

コードで「forgot_password.tpl.php」を「forgot_password.tpl」に変更します。

$message = $this->load->view('forgot_password.tpl.php', $data, TRUE);

$this->load->view() に .php は必要ありません。

于 2013-07-27T04:16:17.240 に答える