我遇到了一个我无法解决的问题。
我查看了fuelphp文档,是这样做的,但是我得到了一个错误,传递了walue
代码
$email_data = array();
//echo Config::get('base_url'). "user/activate/". $user['hash'];
$email = Email::forge();
$email->from('my@email.me', Config::get('site_name'));
$email->to(Input::post('email'), Input::post('first_name') . " " . Input::post('last_name'));
$email->subject('Regisztráció');
$email_data['name'] = "Kedves " . Input::post('first_name'). " " .Input::post('last_name') ."<br><br>" ;
$email_data['title'] = "Üdvözöllek a ".Config::get('site_name')." oldalán" ."<br>";
$email_data['link'] = '<a href="'.Config::get('site_url'). "user/activate/". $user['hash'].'">Fiókod mherősítéséhez kérlek kattints ide</a>';
$email->html_body(\View::forge('email/activation', $email_data));
$email->send();
$response->body(json_encode(array(
'status' => 'ok',
)));
电子邮件模板文件
<?php
print_r($email_data);
?>
电子邮件把这个发给我
Notice!
ErrorException [ Notice ]: Undefined variable: email_data
APPPATH/views/email/activation.php @ line 3:
2:3:print_r($email_data);4:?>
请有人给我一个提示我做错了什么?