本文整理匯總了PHP中uri::full_path方法的典型用法代碼示例。如果您正苦於以下問題:PHP uri::full_path方法的具體用法?PHP uri::full_path怎麽用?PHP uri::full_path使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類uri
的用法示例。
在下文中一共展示了uri::full_path方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: recover
function recover()
{
$this->view->content = new View('tools/recover');
if ($_POST) {
if (empty($_POST['email'])) {
return $this->view->flash = 'Your e-mail is required!';
}
$lists = new Alist_Collection();
$sql = 'SELECT * FROM alist WHERE email LIKE "' . $lists->getDb()->escape($_POST['email']) . '" ORDER BY name DESC';
$lists->loadBySql($sql);
if ($lists->isEmpty()) {
return $this->view->flash = 'No lists found for ' . $_POST['email'];
}
$body = <<<EOF
== List Recovery From MkLst.com ==
Someone (hopefully you) requested a list of all your MkLst.com lists be sent to
this address. If this was you, well, here you go. If it wasn't, sorry! Please
ignore this message or contact us at http://mklst.com/
== Your Lists ==
EOF;
foreach ($lists as $list) {
$body .= $list->getName() . "\r\n - " . uri::full_path('list/view/' . $list->getId()) . "\r\n\r\n";
}
$message = Swift_Message::newInstance();
$message->setSubject('MkLst.com List Recovery');
$message->setFrom(array('no-reply@mklst.com' => 'No Reply'));
$message->setTo(array($_POST['email']));
$message->setBody($body);
Swift_Mailer::newInstance(Swift_MailTransport::newInstance())->send($message);
$this->view->flash = 'Recovery list sent!';
}
}