當前位置: 首頁>>代碼示例>>PHP>>正文


PHP uri::full_path方法代碼示例

本文整理匯總了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!';
        }
    }
開發者ID:jmhobbs,項目名稱:MkLst,代碼行數:36,代碼來源:tools.php


注:本文中的uri::full_path方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。