Phalcon Framework 3.4.1

Error: Call to a member function insertBefore() on null

/srv/www/2tin.net/app/modules/highnews/controllers/ArticleController.php (110)
#0Cms\Modules\Highnews\Controllers\ArticleController->addMobifosAds(<p><img title="Nam th&#7847;n t&#432;&#7907;ng Kpop &#273;&#432;&#7907;c khen '&#273;&#7865;p nh&#432; ho&agrave;ng t&#7917;' h&igrave;nh &#7843;nh 1" src="http://img.2tin.net/uploads/images/2018/11/13/882c963c52a1cc670e52eb849e2d3d16_3934157127dc29c0438dc1a15ecca333/882c963c52a1cc670e52eb849e2d3d16.jpg" alt="Nam than tuong Kpop duoc khen 'dep nhu hoang tu' hinh anh 1" width="1200" height="800" class=" img-responsive">&#272;&#7847;u th&aacute;ng 11, gi&#7843;i th&#432;&#7903;ng &acirc;m nh&#7841;c MBC Plus x Genie Music Awards (MGAs) &#273;&#432;&#7907;c t&#7893; ch&#7913;c t&#7841;i trung t&acirc;m th&#7875; d&#7909;c th&#7875; thao Namdong- Incheon (H&agrave;n Qu&#7889;c), quy t&#7909; nh&#7919;ng ngh&#7879; s&#297; n&#7893;i ti&#7871;ng h&agrave;ng &#273;&#7847;u Kpop, trong &#273;&oacute; c&oacute; nh&oacute;m nh&#7841;c &#273;ang &#273;&#432;&#7907;c y&ecirc;u th&iacute;ch Wanna One.<img title="Nam th&#7847;n t&#432;&#7907;ng Kpop &#273;&#432;&#7907;c khen '&#273;&#7865;p nh&#432; ho&agrave;ng t&#7917;' h&igrave;nh &#7843;nh 2" src="http://img.2tin.net/uploads/images/2018/11/13/03a216313921cb29778cfb0ae6364b62_7677e44afcfc0d737e9ee751aa79852f/03a216313921cb29778cfb0ae6364b62.jpg" alt="Nam than tuong Kpop duoc khen 'dep nhu hoang tu' hinh anh 2" width="800" height="1200" class=" img-responsive">Nh&oacute;m nh&#7841;c nam 11 th&agrave;nh vi&ecirc;n thu h&uacute;t kh&aacute;n gi&#7843; ngay khi xu&#7845;t hi&#7879;n tr&ecirc;n th&#7843;m &#273;&#7887;. B&#432;&#7899;c xu&#7889;ng &#273;&#7847;u ti&ecirc;n, Ong Seong Woo khi&#7871;n kh&aacute;n gi&#7843; kh&ocirc;ng ng&#7915;ng reo h&ograve;.<br><img title="Nam th&#7847;n t&#432;&#7907;ng Kpop &#273;&#432;&#7907;c khen '&#273;&#7865;p nh&#432; ho&agrave;ng t&#7917;' h&igrave;nh &#7843;nh 3" src="http://img.2tin.net/uploads/images/2018/11/13/047a138071d02bd52b59f36610e844f2_c6203d8376f2cc700bc23b4fc24b9f82/047a138071d02bd52b59f36610e844f2.jpg" alt="Nam than tuong Kpop duoc khen 'dep nhu hoang tu' hinh anh 3" width="682" height="1024" class=" img-responsive">Tr&ecirc;n trang m&#7841;ng, ng&#432;&#7901;i h&acirc;m m&#7897; Kpop &#273;&atilde; nh&#7853;n x&eacute;t: "Ong Seong Woo &#273;&#7865;p trai &#273;&#7871;n n&#7895;i ngay c&#7843; non-fan (ng&#432;&#7901;i kh&ocirc;ng th&iacute;ch c&#361;ng kh&ocirc;ng gh&eacute;t) c&#361;ng r&#417;i v&agrave;o t&igrave;nh y&ecirc;u v&#7899;i th&agrave;nh vi&ecirc;n n&agrave;y".<img title="Nam th&#7847;n t&#432;&#7907;ng Kpop &#273;&#432;&#7907;c khen '&#273;&#7865;p nh&#432; ho&agrave;ng t&#7917;' h&igrave;nh &#7843;nh 4" src="http://img.2tin.net/uploads/images/2018/11/13/8e0b293d34899a2f9c79c711bf7f2917_68186541bcd63c3d8ba34ec65e6cbf14/8e0b293d34899a2f9c79c711bf7f2917.jpg" alt="Nam than tuong Kpop duoc khen 'dep nhu hoang tu' hinh anh 4" width="800" height="1200" class=" img-responsive">C&aacute;c Wannables (t&ecirc;n g&#7885;i fan c&#7911;a Wanna One) quen thu&#7897;c v&#7899;i h&igrave;nh &#7843;nh Ong Seong Woo vui v&#7867;, h&agrave;i h&#432;&#7899;c. Trong khi &#273;&oacute;, kh&aacute;n gi&#7843; trung l&#7853;p cho r&#7857;ng th&#7847;n t&#432;&#7907;ng nam s&#7903; h&#7919;u v&#7867; &#273;&#7865;p cu&#7889;n h&uacute;t, nam t&iacute;nh.<img title="Nam th&#7847;n t&#432;&#7907;ng Kpop &#273;&#432;&#7907;c khen '&#273;&#7865;p nh&#432; ho&agrave;ng t&#7917;' h&igrave;nh &#7843;nh 5" src="http://img.2tin.net/uploads/images/2018/11/13/c1bae3d4bbf575d6d71c88c44a3a5fb2_79c2b78bd069028001d457f00c1b334d/c1bae3d4bbf575d6d71c88c44a3a5fb2.jpg" alt="Nam than tuong Kpop duoc khen 'dep nhu hoang tu' hinh anh 5" width="1536" height="2048" class=" img-responsive">T&#7841;i s&#7921; ki&#7879;n MGAs 2018, Ong Seong woo xu&#7845;t hi&#7879;n v&#7899;i m&aacute;i t&oacute;c &#273;en nam t&iacute;nh v&agrave; phong c&aacute;ch th&#7901;i trang l&#7883;ch l&atilde;m. <img title="Nam th&#7847;n t&#432;&#7907;ng Kpop &#273;&#432;&#7907;c khen '&#273;&#7865;p nh&#432; ho&agrave;ng t&#7917;' h&igrave;nh &#7843;nh 6" src="http://img.2tin.net/uploads/images/2018/11/13/f26d0743d50acfcb3c67b72ff0befa02_8500018e1f768e6355e5ba3af2978bce/f26d0743d50acfcb3c67b72ff0befa02.jpg" alt="Nam than tuong Kpop duoc khen 'dep nhu hoang tu' hinh anh 6" width="800" height="1139" class=" img-responsive">Tr&ecirc;n trang Twitter, nh&#7919;ng kh&aacute;n gi&#7843; c&oacute; m&#7863;t t&#7841;i s&#7921; ki&#7879;n li&ecirc;n t&#7909;c &#273;&#432;a ra y&ecirc;u c&#7847;u &#273;&#432;&#7907;c bi&#7871;t danh t&iacute;nh c&#7911;a th&agrave;nh vi&ecirc;n n&agrave;y. <img title="Nam th&#7847;n t&#432;&#7907;ng Kpop &#273;&#432;&#7907;c khen '&#273;&#7865;p nh&#432; ho&agrave;ng t&#7917;' h&igrave;nh &#7843;nh 7" src="http://img.2tin.net/uploads/images/2018/11/13/22a0631e7b1386d2655071273fa5ff36_423bdf51ab008046101eae9209190f3b/22a0631e7b1386d2655071273fa5ff36.jpg" alt="Nam than tuong Kpop duoc khen 'dep nhu hoang tu' hinh anh 7" width="800" height="1200" class=" img-responsive">Kh&ocirc;ng &iacute;t trong s&#7889; h&#7885; kh&#7859;ng &#273;&#7883;nh nam th&#7847;n t&#432;&#7907;ng tr&ocirc;ng th&#7921;c s&#7921; gi&#7889;ng m&#7897;t ho&agrave;ng t&#7917; t&#7915; ki&#7875;u t&oacute;c t&#7899;i trang ph&#7909;c.<img title="Nam th&#7847;n t&#432;&#7907;ng Kpop &#273;&#432;&#7907;c khen '&#273;&#7865;p nh&#432; ho&agrave;ng t&#7917;' h&igrave;nh &#7843;nh 8" src="http://img.2tin.net/uploads/images/2018/11/13/bcc3c447e1138fbbfb4db30d874c8790_329ef0e9e6a2f9efc70bcc7c3820b835/bcc3c447e1138fbbfb4db30d874c8790.jpg" alt="Nam than tuong Kpop duoc khen 'dep nhu hoang tu' hinh anh 8" width="800" height="1152" class=" img-responsive">"Ai &#273;&oacute; cho t&ocirc;i bi&#7871;t t&ecirc;n c&#7911;a anh ch&agrave;ng &#273;&aacute;ng y&ecirc;u trong Wanna One &#273;i, ng&#432;&#7901;i m&agrave; c&oacute; m&aacute;i t&oacute;c &#273;en v&agrave; m&#7863;c &aacute;o c&#7893; l&#7885;. Anh &#7845;y th&#7853;t s&#7921; &#273;&#7865;p trai. T&ocirc;i c&#7847;n ph&#7843;i coi phim anh &#7845;y &#273;&oacute;ng"- t&agrave;i kho&#7843;n ongwoog &#273;&#259;ng t&#7843;i.<img title="Nam th&#7847;n t&#432;&#7907;ng Kpop &#273;&#432;&#7907;c khen '&#273;&#7865;p nh&#432; ho&agrave;ng t&#7917;' h&igrave;nh &#7843;nh 9" src="http://img.2tin.net/uploads/images/2018/11/13/d0eccf5bdfe545c0ce4acef20499655d_35e1e01d373d46049ec16eb465bfe5eb/d0eccf5bdfe545c0ce4acef20499655d.jpg" alt="Nam than tuong Kpop duoc khen 'dep nhu hoang tu' hinh anh 9" width="768" height="960" class=" img-responsive">C&#361;ng trong s&#7921; ki&#7879;n, nam th&#7847;n t&#432;&#7907;ng nh&#7853;n nhi&#7873;u l&#7901;i khen ng&#7907;i trong c&aacute;ch &#7913;ng x&#7917;. Khi th&#7845;y m&#7897;t kh&aacute;n gi&#7843; l&agrave;m r&#417;i &#273;&egrave;n c&#7893; v&#361;, anh &#273;&atilde; xu&#7889;ng t&#7853;n n&#417;i &#273;&#7875; nh&#7863;t gi&uacute;p v&agrave; tr&#7843; l&#7841;i ng&#432;&#7901;i h&acirc;m m&#7897; n&agrave;y.<img title="Nam th&#7847;n t&#432;&#7907;ng Kpop &#273;&#432;&#7907;c khen '&#273;&#7865;p nh&#432; ho&agrave;ng t&#7917;' h&igrave;nh &#7843;nh 10" src="http://img.2tin.net/uploads/images/2018/11/13/087fac1c66f6203ab34705aa9322fd47_3374b51fb8d61b23877b858f39a01569/087fac1c66f6203ab34705aa9322fd47.jpg" alt="Nam than tuong Kpop duoc khen 'dep nhu hoang tu' hinh anh 10" width="1230" height="2048" class=" img-responsive">Sau &#273;&oacute;, ng&#432;&#7901;i h&acirc;m m&#7897; n&agrave;y &#273;&atilde; chia s&#7867; ni&#7873;m vui: "L&uacute;c &#273;&#7847;u, t&ocirc;i c&#7893; v&#361; Woojin (1 th&agrave;nh vi&ecirc;n kh&aacute;c c&#7911;a Wanna One) nhi&#7873;u qu&aacute; n&ecirc;n &#273;&atilde; l&agrave;m r&#417;i d&#7909;ng c&#7909; c&#7893; v&#361;. Khi &#273;&oacute;, t&ocirc;i ngh&#297; Seongwu s&#7869; nh&#7901; ng&#432;&#7901;i nh&#7863;t l&ecirc;n gi&uacute;p, nh&#432;ng c&#7853;u &#7845;y &#273;&atilde; t&#7853;n tay &#273;&#432;a cho m&igrave;nh".<br><img title="Nam th&#7847;n t&#432;&#7907;ng Kpop &#273;&#432;&#7907;c khen '&#273;&#7865;p nh&#432; ho&agrave;ng t&#7917;' h&igrave;nh &#7843;nh 11" src="http://img.2tin.net/uploads/images/2018/11/13/5ae3883205268a4abe06f4ab2b9f5e7b_4f9d2ece5fe77b9b1d7cb217bfffb71e/5ae3883205268a4abe06f4ab2b9f5e7b.jpg" alt="Nam than tuong Kpop duoc khen 'dep nhu hoang tu' hinh anh 11" width="639" height="960" class=" img-responsive">Kh&aacute;n gi&#7843; n&agrave;y c&ograve;n n&oacute;i th&ecirc;m: "M&igrave;nh bi&#7871;t Seongwu r&#7845;t t&#7889;t nh&#432;ng kh&ocirc;ng th&#7875; ng&#7901; &#273;&#432;&#7907;c l&agrave; t&#7889;t &#273;&#7871;n m&#7913;c n&agrave;y. V&agrave; g&#432;&#417;ng m&#7863;t c&#7911;a c&#7853;u &#7845;y n&#7919;a. V&#7867; &#273;&#7865;p c&#7911;a c&#7853;u &#7845;y th&#7853;t s&#7921; kh&ocirc;ng th&#7875; t&igrave;m &#273;&#432;&#7907;c &#7903; H&agrave;n Qu&#7889;c &#273;&acirc;u".<img title="Nam th&#7847;n t&#432;&#7907;ng Kpop &#273;&#432;&#7907;c khen '&#273;&#7865;p nh&#432; ho&agrave;ng t&#7917;' h&igrave;nh &#7843;nh 12" src="http://img.2tin.net/uploads/images/2018/11/13/c61bacb1dc01fc255b2293c2ae35da97_855887bdf99cb1e881d31605c87a8180/c61bacb1dc01fc255b2293c2ae35da97.jpg" alt="Nam than tuong Kpop duoc khen 'dep nhu hoang tu' hinh anh 12" width="2048" height="1194" class=" img-responsive">T&#7841;i s&#7921; ki&#7879;n, Wanna One mang &#273;&#7871;n m&agrave;n tr&igrave;nh di&#7877;n &#273;&#7863;c bi&#7879;t tr&ecirc;n s&acirc;n kh&#7845;u d&agrave;n d&#7921;ng c&ocirc;ng phu d&agrave;nh t&#7863;ng cho ng&#432;&#7901;i h&acirc;m m&#7897;. V&agrave;o ng&agrave;y 19/11 t&#7899;i, nh&oacute;m s&#7869; c&oacute; l&#7847;n xu&#7845;t hi&#7879;n cu&#7889;i c&ugrave;ng.<img title="Nam th&#7847;n t&#432;&#7907;ng Kpop &#273;&#432;&#7907;c khen '&#273;&#7865;p nh&#432; ho&agrave;ng t&#7917;' h&igrave;nh &#7843;nh 13" src="http://img.2tin.net/uploads/images/2018/11/13/b8d6380738229c5e712509c7b1555374_ea27f92c2eab717ba00e8944a455ec92/b8d6380738229c5e712509c7b1555374.jpg" alt="Nam than tuong Kpop duoc khen 'dep nhu hoang tu' hinh anh 13" width="1000" height="1500" class=" img-responsive">B&#432;&#7899;c ra t&#7915; ch&#432;&#417;ng tr&igrave;nh Produce 101 m&ugrave;a 2, ch&agrave;ng trai sinh n&#259;m 95 v&#7899;i t&agrave;i n&#259;ng to&agrave;n di&#7879;n v&agrave; t&iacute;nh c&aacute;ch h&agrave;i h&#432;&#7899;c &#273;&#432;&#7907;c ch&#7885;n v&agrave;o &#273;&#7897;i h&igrave;nh ch&iacute;nh th&#7913;c c&#7911;a Wanna One v&#7899;i v&#7883; tr&iacute; th&#7913; 5. <img title="Nam th&#7847;n t&#432;&#7907;ng Kpop &#273;&#432;&#7907;c khen '&#273;&#7865;p nh&#432; ho&agrave;ng t&#7917;' h&igrave;nh &#7843;nh 14" src="http://img.2tin.net/uploads/images/2018/11/13/c2712ff38e2414179095d2fc5ea4e691_d3142e70e62484f5482f54577cf47330/c2712ff38e2414179095d2fc5ea4e691.jpg" alt="Nam than tuong Kpop duoc khen 'dep nhu hoang tu' hinh anh 14" width="639" height="960" class=" img-responsive">&#272;&#7843;m nh&#7853;n vai tr&ograve; main dancer (nh&#7843;y ch&iacute;nh) v&agrave; lead vocalist (h&aacute;t d&#7851;n), Ong Seong Woo ng&agrave;y c&agrave;ng nh&#7853;n &#273;&#432;&#7907;c nhi&#7873;u t&igrave;nh c&#7843;m t&#7915; c&ocirc;ng ch&uacute;ng v&agrave; s&#7921; y&ecirc;u m&#7871;n t&#7915; c&aacute;c th&agrave;nh vi&ecirc;n trong nh&oacute;m.</p>)
/srv/www/2tin.net/app/modules/highnews/controllers/ArticleController.php (46)
<?php
 
namespace Cms\Modules\Highnews\Controllers;
 
use Cms\Helper;
use Cms\IAHelper;
use Cms\Models\Admins;
use Cms\Models\Articles;
use Cms\Models\ArticlesTags;
use Cms\Models\Categories;
use Cms\Models\Tags;
use Cms\Tag;
use Facebook\InstantArticles\Parser\Parser;
use Phalcon\Mvc\View;
 
class ArticleController extends ControllerBase
{
 
    public function indexAction($article_slug = '', $id = null)
    {
        $page = $this->request->get('page', 'int', 1);
        $per_page = 5;
        $offset = (($page - 1) * $per_page) + 4;
 
        $article = $this->__is_bot() ? Articles::findById($id) : Articles::findByIdCache($id);
        if (empty($article) || ($this->admin === null && $article->status != 1)) {
            $this->dispatcher->forward(['controller' => 'error', 'action' => 'show404']);
            return;
        }
 
        // redirect right url
        $uri = $this->tag->article_url($article);
        if (strpos($this->router->getRewriteUri(), $uri) === false) {
            $this->response->redirect($uri);
            return;
        }
 
        if ($page === 1) {
            // add tạm view counter
            Articles::update_view($article->aid);
        }
 
 
        $article->content = $this->addClassToImg($article->content, 'img-responsive');// add class img-responsive to img tag
        $article->content = $this->transforYoutubeIframe($article->content);
        $article->content = $this->addMobifosAds($article->content); //Add fucking ads
        //$article->content = preg_replace('/(<[^>]+) style=".*?"/i', '$1', $article->content); // remove custom style
        $article->source_link = parse_url($article->source_link);
        $article->source_link = isset($article->source_link['host']) ? sprintf('http://%s/', $article->source_link['host']) : '';
 
 
        $category = Categories::getCategoryByArticleId($article->aid, false);
        $categories = Categories::getCategoryByArticleId($article->aid, true);
        $tags = Tags::findByArticleId($article->aid);
 
        $this->tag->setTitle(html_entity_decode($article->title));
 
        $this->view->setVar('admin', Admins::findByIdCache($article->create_by));
        $this->view->setVar('article', $article);
        $this->view->setVar('related_articles', $this->widget_related_top_news_block($article->aid, $category['cid'], 3, 0));
        $this->view->setVar('related_articles_2', $this->widget_most_related_news_block($article->aid, $category['cid'], 1, 3));
        $this->view->setVar('related_articles_3', $this->widget_related_news_block($article->aid, $category['cid'], $per_page, $offset));
        $this->view->setVar('day_transform', ['Chủ nhật', 'Thứ hai', 'Thứ ba', 'Thứ tư', 'Thứ năm', 'Thứ sáu', 'Thứ bảy']);
        $this->view->setVar('category', $category);
        $this->view->setVar('categories', $categories);
        $this->view->setVar('tags', $tags);
        $this->view->setVar('hot_block_1', $this->widget_hot(15, 'hot_block_1'));
 
        $this->view->setVar('publisher', 'https://www.facebook.com/blog2tin/');
        $this->view->setVar('published_time', $article->publish_time);
        $this->view->setVar('modified_time', $article->modify_time);
        $this->view->setVar('og_type', 'article');
        $this->view->setVar('og_image', $article->thumbnail);
        $this->view->setVar('description', $article->introduce);
        $this->view->setVar('rss', ['title' => $article->title, 'link' => $this->url->get('rss/article/' . $article->aid)]);
    }
 
    private function addClassToImg($content, $new_class = '')
    {
        $dom = new \DOMDocument();
        @$dom->loadHTML(mb_convert_encoding('<?xml encoding="utf-8" ?>' . $content, 'HTML-ENTITIES', 'UTF-8'));
        $dom->preserveWhiteSpace = false;
 
        $images = $dom->getElementsByTagName('img');
 
        foreach ($images as $image) {
 
            // the existing classes already on the images
            $existing_classes = $image->getAttribute('class');
 
            if (strpos($existing_classes, $new_class) === false) {
                $new_class = $existing_classes . ' ' . $new_class;
                $image->setAttribute('class', $new_class);
            }
        }
        $body = $dom->saveHTML();
        preg_match("/<body[^>]*>(.*?)<\/body>/is", $body, $match);
        return !empty($match) ? end($match) : '';
    }
 
    private function addMobifosAds($content)
    {
        $dom = new \DOMDocument();
        @$dom->loadHTML(mb_convert_encoding('<?xml encoding="utf-8" ?>' . $content, 'HTML-ENTITIES', 'UTF-8'));
        $dom->preserveWhiteSpace = false;
        $ptags = $dom->getElementsByTagName('p');
        $stop = (int)round($ptags->length/2);
        $p = $ptags->item($stop);
        $ads = $dom->createElement("div","FUCKINGADS");
        $p->parentNode->insertBefore($ads, $p);
        $html = $dom->saveHTML();
        $content = str_replace("FUCKINGADS",'<script src="https://player.cliphub.io/js/clh.js?v=1.3.0"></script><div id="clh_hot_news"></div><script>CLH.hotNews("clh_hot_news", {  cat : "phim,giai-tri",  mobile: true});</script>',$html);
       // return str_replace("ABC",'<script src="https://player.cliphub.io/js/clh.js?v=1.3.0"></script><div id="clh_hot_news"></div><script>CLH.hotNews("clh_hot_news", {  cat : "phim,giai-tri",  mobile: true});</script>',$html);
        return $content;
    }
 
    private function transforYoutubeIframe($content)
    {
        preg_match_all("/<iframe[^>]*src=\"[^\"]*youtu[.]?be.*<\\/iframe>/mi", $content, $matches);
        if (!empty($matches)) {
            foreach ($matches as $match) {
                if (!empty($match[0])) {
                    $new_iframe = $match[0];
                    $dom = new \DOMDocument();
                    @$dom->loadHTML(mb_convert_encoding($match[0], 'HTML-ENTITIES', 'UTF-8'));
                    $dom->preserveWhiteSpace = false;
                    $iframes = $dom->getElementsByTagName('iframe');
                    foreach ($iframes as $iframe) {
                        $existing_classes = $iframe->getAttribute('class');
                        if (!empty($existing_classes)) {
                            $new_class = $existing_classes . ' embed-responsive-item';
                            $iframe->setAttribute('class', $new_class);
                        } else {
                            $iframe->setAttribute('class', 'embed-responsive-item');
                        }
 
                        $body = $dom->saveHTML();
                        $new_iframe = $body;
                    }
                    $content = str_replace($match[0], '<div class="embed-responsive-16by9">' . $new_iframe . '</div>', $content);
                }
            }
        }
        return $content;
    }
 
}
#1Cms\Modules\Highnews\Controllers\ArticleController->indexAction(nam-than-tuong-kpop-duoc-khen-dep-nhu-hoang-tu-2tnhy95, 14795)
#2Phalcon\Dispatcher->callActionMethod(Object(Cms\Modules\Highnews\Controllers\ArticleController), indexAction, Array([article_slug] => nam-than-tuong-kpop-duoc-khen-dep-nhu-hoang-tu-2tnhy95, [id] => 14795))
#3Phalcon\Dispatcher->dispatch()
#4Phalcon\Mvc\Application->handle()
/srv/www/2tin.net/app/bootstrap_highnews.php (63)
<?php
 
use Phalcon\Di\FactoryDefault;
use Phalcon\Mvc\Application;
 
error_reporting(E_ALL);
 
define('BASE_PATH', dirname(__DIR__));
define('APP_PATH', BASE_PATH . '/app');
define('APP_MODULE', 'highnews');
 
/**
 * friendly error
 */
$debug = new \Phalcon\Debug();
$debug->listen();
 
/**
 * The FactoryDefault Dependency Injector automatically registers the services that
 * provide a full stack framework. These default services can be overidden with custom ones.
 */
$di = new FactoryDefault();
 
/**
 * Include general services
 */
require APP_PATH . '/config/services.php';
 
/**
 * Include web environment specific services
 */
require APP_PATH . '/config/services_highnews.php';
 
/**
 * Add debug
 */
if ($di->has('profiler')) {
    $di->getShared('profiler')->addAggregator(new \Fabfuel\Prophiler\Aggregator\Database\QueryAggregator());
    $di->getShared('profiler')->addAggregator(new \Fabfuel\Prophiler\Aggregator\Cache\CacheAggregator());
    $pluginManager = new \Fabfuel\Prophiler\Plugin\Manager\Phalcon($di->getShared('profiler'));
    $pluginManager->register();
}
 
/**
 * Include Autoloader
 */
include APP_PATH . '/config/loader.php';
/**
 * Handle the request
 */
$application = new Application($di);
 
/**
 * Register application modules
 */
$application->registerModules(['highnews' => ['className' => 'Cms\Modules\Highnews\Module']]);
 
/**
 * Include routes
 */
require APP_PATH . '/config/routes.php';
 
$html = $application->handle()->getContent();
 
/**
 * render debug html
 */
if ($di->has('profiler')) {
    $toolbar = new \Fabfuel\Prophiler\Toolbar($di->getShared('profiler'));
    $toolbar->addDataCollector(new \Fabfuel\Prophiler\DataCollector\Request());
    $html = str_replace('</head>', $toolbar->render() . '</head>', $html);
}
 
/**
 * compress html
 */
if (isset($config->compress) && $config->compress) {
    $html = str_replace(["\n", "\r", "\t"], null, $html);
}
 
echo $html;
#5require(/srv/www/2tin.net/app/bootstrap_highnews.php)
/srv/www/2tin.net/public/highnews/index.php (2)
<?php
require '../../app/bootstrap_highnews.php';
KeyValue
_url/nam-than-tuong-kpop-duoc-khen-dep-nhu-hoang-tu-2tnhy95-14795.html
KeyValue
USERnginx
HOME/var/lib/nginx
HTTP_CONNECTIONclose
HTTP_X_FORWARDED_FOR54.163.42.154
HTTP_ACCEPT_ENCODINGgzip
HTTP_HOST2tin.net
HTTP_ACCEPTtext/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENTCCBot/2.0 (https://commoncrawl.org/faq/)
REDIRECT_STATUS200
SERVER_NAME2tin.net
SERVER_PORT80
SERVER_ADDR172.31.16.150
REMOTE_PORT38906
REMOTE_ADDR172.31.16.103
SERVER_SOFTWAREnginx/1.10.2
GATEWAY_INTERFACECGI/1.1
REQUEST_SCHEMEhttp
SERVER_PROTOCOLHTTP/1.1
DOCUMENT_ROOT/srv/www/2tin.net/public/highnews
DOCUMENT_URI/index.php
REQUEST_URI/nam-than-tuong-kpop-duoc-khen-dep-nhu-hoang-tu-2tnhy95-14795.html
SCRIPT_NAME/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHODGET
QUERY_STRING_url=/nam-than-tuong-kpop-duoc-khen-dep-nhu-hoang-tu-2tnhy95-14795.html&
SCRIPT_FILENAME/srv/www/2tin.net/public/highnews/index.php
APP_ENVproduction
FCGI_ROLERESPONDER
PHP_SELF/index.php
REQUEST_TIME_FLOAT1544950505.744
REQUEST_TIME1544950505
#Path
0/srv/www/2tin.net/public/highnews/index.php
1/srv/www/2tin.net/app/bootstrap_highnews.php
2/srv/www/2tin.net/app/config/services.php
3/srv/www/2tin.net/vendor/autoload.php
4/srv/www/2tin.net/vendor/composer/autoload_real.php
5/srv/www/2tin.net/vendor/composer/ClassLoader.php
6/srv/www/2tin.net/vendor/composer/autoload_static.php
7/srv/www/2tin.net/vendor/guzzlehttp/psr7/src/functions_include.php
8/srv/www/2tin.net/vendor/guzzlehttp/psr7/src/functions.php
9/srv/www/2tin.net/vendor/guzzlehttp/promises/src/functions_include.php
10/srv/www/2tin.net/vendor/guzzlehttp/promises/src/functions.php
11/srv/www/2tin.net/vendor/guzzlehttp/guzzle/src/functions_include.php
12/srv/www/2tin.net/vendor/guzzlehttp/guzzle/src/functions.php
13/srv/www/2tin.net/vendor/react/promise/src/functions_include.php
14/srv/www/2tin.net/vendor/react/promise/src/functions.php
15/srv/www/2tin.net/vendor/swiftmailer/swiftmailer/lib/swift_required.php
16/srv/www/2tin.net/vendor/swiftmailer/swiftmailer/lib/classes/Swift.php
17/srv/www/2tin.net/vendor/facebook/graph-sdk/src/Facebook/polyfills.php
18/srv/www/2tin.net/vendor/ezyang/htmlpurifier/library/HTMLPurifier.composer.php
19/srv/www/2tin.net/app/config/config.php
20/srv/www/2tin.net/app/config/production/config.php
21/srv/www/2tin.net/app/config/production/config-highnews.php
22/srv/www/2tin.net/app/config/services_highnews.php
23/srv/www/2tin.net/app/config/services_web.php
24/srv/www/2tin.net/app/config/loader.php
25/srv/www/2tin.net/app/config/routes.php
26/srv/www/2tin.net/app/config/routes/highnews.php
27/srv/www/2tin.net/app/modules/highnews/Module.php
28/srv/www/2tin.net/app/modules/highnews/controllers/ArticleController.php
29/srv/www/2tin.net/app/modules/highnews/controllers/ControllerBase.php
30/srv/www/2tin.net/app/common/library/Browser.php
31/srv/www/2tin.net/app/common/library/Tag.php
32/srv/www/2tin.net/app/common/models/Articles.php
33/srv/www/2tin.net/app/common/models/base/Articles.php
34/srv/www/2tin.net/app/common/models/base/Model.php
35/srv/www/2tin.net/app/common/library/Blameable.php
36/srv/www/2tin.net/app/common/library/RedisDB.php
37/srv/www/2tin.net/app/common/library/ProfilerHelper.php
38/srv/www/2tin.net/vendor/predis/predis/src/Client.php
39/srv/www/2tin.net/vendor/predis/predis/src/ClientInterface.php
40/srv/www/2tin.net/vendor/predis/predis/src/Configuration/Options.php
41/srv/www/2tin.net/vendor/predis/predis/src/Configuration/OptionsInterface.php
42/srv/www/2tin.net/vendor/predis/predis/src/Configuration/ConnectionFactoryOption.php
43/srv/www/2tin.net/vendor/predis/predis/src/Configuration/OptionInterface.php
44/srv/www/2tin.net/vendor/predis/predis/src/Connection/Factory.php
45/srv/www/2tin.net/vendor/predis/predis/src/Connection/FactoryInterface.php
46/srv/www/2tin.net/vendor/predis/predis/src/Connection/Parameters.php
47/srv/www/2tin.net/vendor/predis/predis/src/Connection/ParametersInterface.php
48/srv/www/2tin.net/vendor/predis/predis/src/Connection/StreamConnection.php
49/srv/www/2tin.net/vendor/predis/predis/src/Connection/AbstractConnection.php
50/srv/www/2tin.net/vendor/predis/predis/src/Connection/NodeConnectionInterface.php
51/srv/www/2tin.net/vendor/predis/predis/src/Connection/ConnectionInterface.php
52/srv/www/2tin.net/vendor/predis/predis/src/Command/RawCommand.php
53/srv/www/2tin.net/vendor/predis/predis/src/Command/CommandInterface.php
54/srv/www/2tin.net/vendor/predis/predis/src/Configuration/ProfileOption.php
55/srv/www/2tin.net/vendor/predis/predis/src/Profile/Factory.php
56/srv/www/2tin.net/vendor/predis/predis/src/Profile/RedisVersion320.php
57/srv/www/2tin.net/vendor/predis/predis/src/Profile/RedisProfile.php
58/srv/www/2tin.net/vendor/predis/predis/src/Profile/ProfileInterface.php
59/srv/www/2tin.net/vendor/predis/predis/src/Command/StringGet.php
60/srv/www/2tin.net/vendor/predis/predis/src/Command/Command.php
61/srv/www/2tin.net/vendor/predis/predis/src/Response/Status.php
62/srv/www/2tin.net/vendor/predis/predis/src/Response/ResponseInterface.php
63/srv/www/2tin.net/cache/metadata/meta-cms_models_articles-articles.php
64/srv/www/2tin.net/cache/metadata/map-cms_models_articles.php
65/srv/www/2tin.net/vendor/predis/predis/src/Command/StringSet.php
66/srv/www/2tin.net/vendor/predis/predis/src/Command/KeyExpire.php
Memory
Usage2097152