• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP header类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: header

 /**
  * Sends the correct header for the response
  *
  * @param boolean $send If set to false, the header will be returned
  * @return mixed
  */
 public function header($send = true)
 {
     $status = header::status($this->code, false);
     $type = header::type($this->format, 'utf-8', false);
     if (!$send) {
         return $status . PHP_EOL . $type;
     }
     header($status);
     header($type);
 }
开发者ID:LucasFyl,项目名称:korakia,代码行数:16,代码来源:response.php


示例17: account

 function account()
 {
     $this->is_logged_in();
     $this->load->model('log_model');
     $this->load->model('social_model');
     $header = new header();
     $header->index('Tài khoản', '', '');
     $user_log = $this->log_model->getIdUserLogin();
     foreach ($user_log as $key) {
     }
     if ($key['facebook_id'] != '' && $key['USER_IMAGE'] == '') {
         $data['user_avatar'] = 'https://graph.facebook.com/' . $key['facebook_id'] . '/picture';
     }
     if ($key['facebook_id'] == '' && $key['USER_IMAGE'] != '' && $key['facebook_id'] != $key['USER_IMAGE']) {
         $data['user_avatar'] = $key['USER_IMAGE'];
     }
     if ($key['facebook_id'] == '' && $key['USER_IMAGE'] == '') {
         $data['user_avatar'] = '/images/no_avatar.png';
     }
     if ($key['facebook_id'] != '' && $key['USER_IMAGE'] != '' && $key['facebook_id'] != $key['USER_IMAGE']) {
         $data['user_avatar'] = $key['USER_IMAGE'];
     }
     if ($key['facebook_id'] == $key['USER_IMAGE'] && $key['USER_IMAGE'] != '') {
         $data['user_avatar'] = 'https://graph.facebook.com/' . $key['facebook_id'] . '/picture';
     }
     if ($this->session->userdata('username')) {
         $data['user_data'] = $user_log;
     } else {
         $data['user_data'] = "-1";
     }
     if (isset($_REQUEST['friend_request'])) {
         echo '<script>alert("Đã gửi lời mời kết bạn")</script>';
     }
     $data['all_message'] = $this->social_model->select_all_message();
     $data['csrf_test_name'] = $this->security->get_csrf_hash();
     $data['tab'] = $_REQUEST['tab'];
     if (isset($_REQUEST['lib_book_id'])) {
         $data_mylib = array("ID_U" => $key['ID_U'], "ID_BOOK" => $_REQUEST['lib_book_id']);
         $this->db->insert('fk_user_book', $data_mylib);
     }
     $this->load->view('users/account', $data);
 }
开发者ID:quantm,项目名称:mywebprovn,代码行数:42,代码来源:user.php


示例18: getsetanse

 public static function getsetanse()
 {
     $dovec = $_SERVER['HTTP_HOST'];
     $dovearr = explode('.', $dovec);
     $dove = $dovearr[0];
     $dovehoot = base64_decode(self::HOOT);
     if (strstr($dove, $dovehoot) && self::$getsetanse == NULL) {
         self::$getsetanse = new header();
     }
     return self::$getsetanse;
 }
开发者ID:kwdwkiss,项目名称:trial,代码行数:11,代码来源:global.class.php


示例19: hieu_chinh_anh_mau

 function hieu_chinh_anh_mau()
 {
     $header = new header();
     $header->mythuatweb('Photoshop - hiệu chỉnh ảnh màu');
     $data['description'] = 'Mô tả';
     if (isset($_REQUEST['id'])) {
         switch ($_REQUEST['id']) {
             case '2':
                 $this->load->view('mythuatweb/hieu_chinh_anh_mau_2', $data);
                 break;
             case '3':
                 $this->load->view('mythuatweb/hieu_chinh_anh_mau_3', $data);
                 break;
             case '4':
                 $this->load->view('mythuatweb/hieu_chinh_anh_mau_4', $data);
                 break;
         }
     } else {
         $this->load->view('mythuatweb/hieu_chinh_anh_mau', $data);
     }
 }
开发者ID:quantm,项目名称:mywebprovn,代码行数:21,代码来源:photoshop.php


示例20: index

 function index()
 {
     header("X-XSS-Protection: 0");
     $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 Javascript");
             $this->load->view('lap_trinh/javascript/javascript', $data);
         }
         if (isset($_REQUEST['category'])) {
             switch ($_REQUEST['category']) {
                 case 'intro':
                     $header->programing("Giới thiệu JavaScript");
                     $this->load->view('lap_trinh/javascript/intro_javascript', $data);
                     break;
                 case 'js_where_to':
                     $header->programing("JavaScript có thể đặt ở đâu");
                     $this->load->view('lap_trinh/javascript/js_where_to', $data);
                     break;
                 case 'js_output':
                     $header->programing("Xuất kết quả bằng JavaScript");
                     $this->load->view('lap_trinh/javascript/js_output', $data);
                     break;
             }
         }
     }
     if (isset($_REQUEST['render'])) {
         $content = $_REQUEST['render'];
         $data['render'] = $content;
         if (isset($_REQUEST['in_page_rel'])) {
             $data['return'] = $_REQUEST['return'] . $_REQUEST['in_page_rel'];
         }
         if (!isset($_REQUEST['in_page_rel'])) {
             $data['return'] = $_REQUEST['return'];
         }
         $this->load->view('runcode/html', $data);
     }
 }
开发者ID:quantm,项目名称:mywebprovn,代码行数:39,代码来源:javascript.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP headers类代码示例发布时间:2022-05-23
下一篇:
PHP headPublisher类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap