当前位置: 首页>>代码示例>>PHP>>正文


PHP header类代码示例

本文整理汇总了PHP中header的典型用法代码示例。如果您正苦于以下问题:PHP header类的具体用法?PHP header怎么用?PHP header使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了header类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: index

 function index()
 {
     $header = new header();
     $header->index("Karaoke");
     $url = 'http://sannhac.com/';
     $trans = new web_transfer();
     $indexpage = '?film';
     $base = '/';
     $trans->initiate_news($url, $indexpage);
     $trans->converturl($url, $base);
     $content = '';
     $trans->start_transfer("sannhac.com");
     $trans->getcontent($content);
     var_dump($content);
     die;
     $content = str_replace("<a", "<span", $content);
     $content = str_replace("Phim3s.Home.init();", "", $content);
     preg_match_all('/<div id="content">(.*?)<div id="sidebar">/s', $content, $matches, PREG_SET_ORDER);
     foreach ($matches as $key) {
     }
     $data['content'] = $key[1];
     // form security
     $data['csrf_test_name'] = $this->security->get_csrf_hash();
     $this->load->view('karaoke/sannhac', $data);
 }
开发者ID:quantm,项目名称:mywebprovn,代码行数:25,代码来源:karaoke.php

示例2: web

 function web()
 {
     redirect('http://myweb.pro.vn/html');
     $header = new header();
     $header->programing("Học lập trình");
     $this->load->view('lap_trinh/web');
 }
开发者ID:quantm,项目名称:mywebprovn,代码行数:7,代码来源:lap_trinh.php

示例3: index

 function index()
 {
     redirect('/');
     if (!isset($_REQUEST['id'])) {
         $db_init = $this->load->database('admin_education', TRUE);
         $data['mbook'] = $db_init->select('*')->from('mbook')->get()->result_array();
         $this->load->view('/mbook/index', $data);
         $this->output->cache(3);
         $header = new header();
         $header->index("Mbook", "/mbook/index", "Tìm kiếm Mbook");
     } else {
         $book_data = $this->db->select('*')->from('ebook_index')->where('REFERER', 'mbook')->where('id', $_REQUEST['id'])->get()->result_array();
         foreach ($book_data as $key) {
         }
         $data['title'] = $key['NAME'];
         $data['share_id'] = $_REQUEST['id'];
         $data['description'] = $key['DESCRIPTION'];
         $data['path'] = $key['path'];
         $data['thumbs'] = $key['THUMBS'];
         //header
         $header = new header();
         $header->book($key['NAME']);
         //body
         $data['csrf_test_name'] = $this->security->get_csrf_hash();
         $this->load->view('mbook/pdf', $data);
     }
 }
开发者ID:quantm,项目名称:mywebprovn,代码行数:27,代码来源:mbook.php

示例4: index

 function index()
 {
     $header = new header();
     $data['csrf_test_name'] = $this->security->get_csrf_hash();
     if (!isset($_REQUEST['render'])) {
         if (!isset($_REQUEST['category'])) {
             $header->programing("Lập trình web với HTML,CSS và Javascript");
             $this->load->view('lap_trinh/html/html', $data);
         }
         if (isset($_REQUEST['category'])) {
             switch ($_REQUEST['category']) {
                 case 'editor':
                     $header->programing("Trình soạn thảo HTML");
                     $this->load->view('lap_trinh/html/editor', $data);
                     break;
                 case 'basic':
                     $header->programing("HTML căn bản");
                     $this->load->view('lap_trinh/html/basic', $data);
                     break;
                 case 'element':
                     $header->programing("Thành phần của trang HTML");
                     $this->load->view('lap_trinh/html/element', $data);
                     break;
             }
         }
     }
     if (isset($_REQUEST['render'])) {
         $content = $_REQUEST['render'];
         $data['render'] = $content;
         $data['return'] = $_REQUEST['return'];
         $this->load->view('runcode/html', $data);
     }
 }
开发者ID:quantm,项目名称:mywebprovn,代码行数:33,代码来源:html.php

示例5: detail

 function detail()
 {
     if (!isset($_REQUEST['link'])) {
         redirect('/lap_trinh/web/');
     }
     //hightlight selected item
     if (isset($_REQUEST['item_selected'])) {
         $data['item_selected'] = $_REQUEST['item_selected'];
     } else {
         $data['item_selected'] = '';
     }
     //end
     $header = new header();
     $header->index($_REQUEST['item_title'], "", "");
     $trans = new web_transfer();
     $post = $this->input->post();
     $url = 'http://www.w3schools.com/' . $_REQUEST['link'];
     $indexpage = '/';
     $base = '/';
     $trans->initiate_news($url, $indexpage);
     $trans->converturl($url, $base);
     $content = '';
     $trans->start_transfer("www.w3schools.com");
     $trans->getcontent($content);
     $content = str_replace("Try it Yourself", "Run", $content);
     $content = str_replace('href', 'data-href', $content);
     preg_match_all('/<div>(.*?)<div style="clear:both;">/s', $content, $matches, PREG_SET_ORDER);
     foreach ($matches as $key_left) {
     }
     $data['left_col'] = $key_left[0];
     $data['link'] = $url;
     $data['try_it_url'] = $post['link'];
     $data['csrf_test_name'] = $this->security->get_csrf_hash();
     $this->load->view('lap_trinh/web_detail', $data);
 }
开发者ID:quantm,项目名称:mywebprovn,代码行数:35,代码来源:lap_trinh.php

示例6: contact

 function contact()
 {
     $this->load->model('log_model');
     $user_id = '';
     //header
     $header = new header();
     $header->index("Liên hệ", '', '');
     //proccessing
     $is_logged_in = $this->session->userdata('is_logged_in');
     if (!isset($is_logged_in) || $is_logged_in != true) {
         $user_id = '0';
         $data['name'] = '';
         $data['email'] = '';
     } else {
         $user_id = $this->log_model->getId();
         $user_data = $this->db->select('NAME,EMAIL')->from('qtht_users')->where('ID_U', $user_id)->get()->result_array();
         foreach ($user_data as $key) {
         }
         $data['name'] = $key['NAME'];
         $data['email'] = $key['EMAIL'];
     }
     //end proccessing
     if (isset($_REQUEST['csrf_test_name'])) {
         $date = getdate();
         $date_send = $date['year'] . '-' . $date['mon'] . '-' . $date['mday'] . ' ' . $date['hours'] . ':' . $date['minutes'] . ':' . $date['seconds'];
         $data = array('DATE_SEND' => $date_send, 'ID_U' => $user_id, 'EMAIL' => $_REQUEST['email'], 'NAME' => $_REQUEST['name'], 'CONTENT' => $_REQUEST['content']);
         $this->db->insert('qtht_contact', $data);
     }
     //view
     $data['csrf_test_name'] = $this->security->get_csrf_hash();
     $this->load->view('home/contact', $data);
 }
开发者ID:quantm,项目名称:mywebprovn,代码行数:32,代码来源:home.php

示例7: xahoihoctapnetvn

 function xahoihoctapnetvn($id)
 {
     $db_init = $this->load->database('admin_education', TRUE);
     $r = $db_init->select('*')->from('ebook_index')->where('ID', $id)->get()->result_array();
     $header = new header();
     $header->luanvan($r[0]['NAME']);
     if ($id) {
         if ($id == 'undefined') {
             redirect('/');
         }
     } else {
         redirect('/');
     }
     //render view
     if (isset($_REQUEST['download_guide'])) {
         $data['download_guide'] = '1';
     }
     if (!isset($_REQUEST['download_guide'])) {
         $data['download_guide'] = '0';
     }
     if (isset($_REQUEST['register_login'])) {
         $data['register_login'] = '1';
     }
     if (!isset($_REQUEST['register_login'])) {
         $data['register_login'] = '0';
     }
     if (isset($_REQUEST['show_user_category_input'])) {
         $data['show_user_category_input'] = '1';
     }
     if (!isset($_REQUEST['show_user_category_input'])) {
         $data['show_user_category_input'] = '0';
     }
     //mousedown open ads
     if (isset($_REQUEST['happy_reading'])) {
         $data['happy_reading'] = '1';
         $data['id'] = $id . '?happy_reading=1';
     } else {
         $data['happy_reading'] = '0';
         $data['id'] = $id . '?happy_reading=0';
     }
     //end
     $data['id_doc'] = $id;
     if ($r[0]['REFERER'] == 'vinadoc.net') {
         $path = str_replace('http://vinadoc.net/', '', $r[0]['path']);
         $path = 'http://myweb.pro.vn/tai-lieu-hoc/' . $path . '/view/vinadocnet';
         redirect($path);
     }
     if ($r[0]['REFERER'] == 'rongmotamhonnet') {
         redirect('doc-sach?id=' . $id);
     }
     if ($r[0]['REFERER'] == 'tailieuhoctapvn') {
         redirect('http://myweb.pro.vn/doc-sach-tham-khao?id=' . $id);
     }
     if ($r[0]['REFERER'] == 'user_add_from_url' || $r[0]['REFERER'] == 'tailieuhoceduvn' || $r[0]['REFERER'] == 'tailieuvn' || $r[0]['REFERER'] == 'docs.4share.vn' || $r[0]['REFERER'] == 'tailieuhay.info') {
         redirect($r[0]['path']);
     }
     $this->load->view('luanvan/bridge', $data);
 }
开发者ID:quantm,项目名称:mywebprovn,代码行数:58,代码来源:mydoc.php

示例8: view

 function view($path_element_1, $path_element_2, $path_element_3)
 {
     $db = $this->load->database('default', TRUE);
     switch ($path_element_3) {
         case 'vndoccom':
             //begin proccess delete file on server one time per 3 minutes
             $date = getdate();
             $minutes = $date['minutes'];
             if ($minutes % 2) {
                 //do nothing
             } else {
                 //start delete file on server
                 for ($doc_index = 0; $doc_index < 1000000; $doc_index++) {
                     if (file_exists('./pdf/file_vndoccom_' . $doc_index . '.pdf')) {
                         unlink('./pdf/file_vndoccom_' . $doc_index . '.pdf');
                     }
                 }
                 //end delete file on server
             }
             //end proccess delete file on server one time per 3 minutes
             $path = 'http://vndoc.com/' . $path_element_1 . '/' . $path_element_2;
             $q = $db->select('*')->from('pdf')->where('fetch_link', $path)->get()->result_array();
             copy($q['0']['view_pdf_link'], './pdf/file_vndoccom_' . $q['0']['id'] . '.pdf');
             $pdf_path = 'http://myweb.pro.vn/pdf/file_vndoccom_' . $q['0']['id'] . '.pdf';
             break;
     }
     $header = new header();
     $header->book($q[0]['name']);
     echo '<div style="clear:both;height:75px"></div>';
     //render html view
     $data['book_thumbs'] = 'http://myweb.pro.vn/images/fb/logo.jpg';
     $data['book_title'] = $q['0']['name'];
     $data['book_description'] = 'Thư viện PDF';
     $data['share_id'] = $q['0']['id'];
     $data['embed_src'] = 'http://myweb.pro.vn/pdf/pdfviewer?path=' . $pdf_path;
     $this->load->view('book/view', $data);
     //begin proccess delete file on server one time per day
     $date = getdate();
     $hour = $date['hours'];
     if ($hour % 12) {
         //do nothing
     } else {
         //start delete file on server
         for ($doc_index = 0; $doc_index < 1000000; $doc_index++) {
             if (file_exists('./pdf/file_' . $doc_index . '.pdf')) {
                 unlink('./pdf/file_' . $doc_index . '.pdf');
             }
             if (file_exists('./pdf/file_vndoccom_' . $doc_index . '.pdf')) {
                 unlink('./pdf/file_vndoccom_' . $doc_index . '.pdf');
             }
             if (file_exists('./images/tailieuvn/thumb_' . $doc_index . '.jpg')) {
                 unlink('./images/tailieuvn/thumb_' . $doc_index . '.jpg');
             }
         }
         //end delete file on server
     }
     //end proccess delete file on server one time per 15 minutes
 }
开发者ID:quantm,项目名称:mywebprovn,代码行数:58,代码来源:pdf.php

示例9: football

 function football()
 {
     $header = new header();
     $header->index("LINK TRỰC TIẾP TRẬN CHELSEA VS CRYSTAL PALACE ...", "", "");
     //$data['lich_phat_song'] = $this->transfer('mybongda.com');
     $data['title'] = '';
     $this->load->view('webcast/football');
     //$this->output->cache(3);
 }
开发者ID:quantm,项目名称:mywebprovn,代码行数:9,代码来源:webcast.php

示例10: football

 function football()
 {
     $header = new header();
     $header->index("Trực tiếp bóng đá K+", "", "");
     //$data['lich_phat_song'] = $this->transfer('mybongda.com');
     $data['title'] = '';
     $this->load->view('webcast/football');
     $this->output->cache(3);
 }
开发者ID:quantm,项目名称:mywebprovn,代码行数:9,代码来源:webcast.php

示例11: index

 function index()
 {
     $header = new header();
     $header->download("Download");
     $content = file_get_contents("https://down.vn/");
     preg_match_all('/<div id="content" class="clearfix">(.*?)<div class="clear">/s', $content, $matches, PREG_SET_ORDER);
     foreach ($matches as $key) {
     }
     $data['content'] = $key['1'];
     $this->load->view('file/index', $data);
 }
开发者ID:quantm,项目名称:mywebprovn,代码行数:11,代码来源:download.php

示例12: sell_traffic_lazada_vn

 function sell_traffic_lazada_vn($path)
 {
     $mydb = $this->load->database('lazada', TRUE);
     $r = $mydb->select('*')->from('lazada_vn')->like('URL', $path)->get()->result_array();
     $header = new header();
     $header->affiliate('lazada', 'vn');
     //render view
     $data['id_product'] = $r[0]['id'];
     $data['lazada'] = $r;
     $data['total_rows'] = '1';
     $this->load->view('affiliate/lazada_detail_page', $data);
 }
开发者ID:quantm,项目名称:mywebprovn,代码行数:12,代码来源:affiliate.php

示例13: xahoihoctapnetvn

 function xahoihoctapnetvn($id)
 {
     $header = new header();
     $header->luanvan('Tham khảo luận văn & tài liệu');
     //render view
     $data['id'] = $id;
     if (isset($_REQUEST['download_guide'])) {
         $data['download_guide'] = '1';
     }
     if (!isset($_REQUEST['download_guide'])) {
         $data['download_guide'] = '0';
     }
     $this->load->view('luanvan/bridge', $data);
 }
开发者ID:quantm,项目名称:mywebprovn,代码行数:14,代码来源:bridge.php

示例14: __construct

 public function __construct()
 {
     $endpoint = $this;
     if ($page = page('webmention') and kirby()->path() == $page->uri()) {
         if (r::is('post')) {
             try {
                 $endpoint->start();
                 header::status(202);
                 tpl::set('status', 'success');
                 tpl::set('alert', null);
             } catch (Exception $e) {
                 header::status(400);
                 tpl::set('status', 'error');
                 tpl::set('alert', $e->getMessage());
             }
         } else {
             tpl::set('status', 'idle');
         }
     } else {
         kirby()->routes(array(array('pattern' => 'webmention', 'method' => 'GET|POST', 'action' => function () use($endpoint) {
             try {
                 $endpoint->start();
                 echo response::success('Yay', 202);
             } catch (Exception $e) {
                 echo response::error($e->getMessage());
             }
         })));
     }
 }
开发者ID:aizlewood,项目名称:2016,代码行数:29,代码来源:endpoint.php

示例15: blog

 function blog($path)
 {
     redirect('http://myweb.pro.vn/blog/dulich/' . $path);
     $path = str_replace('--', '/', $path);
     $data_tourism = $this->db->select('*')->from('tourism')->like('link', $path)->get()->result_array();
     $header = new header();
     $header->dulich($data_tourism[0]['name']);
     $content = file_get_contents($data_tourism[0]['link']);
     $content = str_replace('<script', '<script async', $content);
     $content = str_replace('dulich.vnexpress.net', 'dulich.myweb.pro.vn/dulich/blog', $content);
     $content = str_replace('tuc/', 'tuc--', $content);
     $content = str_replace('dong/', 'dong--', $content);
     $content = str_replace('van/', 'van--', $content);
     $content = str_replace('photo/', 'photo--', $content);
     $content = str_replace('video/', 'video--', $content);
     $data['content'] = $content;
     $this->load->view('tourism/fetch_tourism_data', $data);
 }
开发者ID:quantm,项目名称:mywebprovn,代码行数:18,代码来源:dulich.php


注:本文中的header类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。