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


PHP Render::error_404方法代码示例

本文整理汇总了PHP中Render::error_404方法的典型用法代码示例。如果您正苦于以下问题:PHP Render::error_404方法的具体用法?PHP Render::error_404怎么用?PHP Render::error_404使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Render的用法示例。


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

示例1: order_request

 public function order_request($params = [])
 {
     $quote = Quote::read_by_params($params);
     if (!isset($quote['id'])) {
         Render::error_404();
     }
     $order = $params;
     $order += $quote;
     $order['country'] = Util::get_countries()[$order['country']];
     $order['payment'] = Util::get_payments()[$order['payment']];
     if (!isset($order['po'])) {
         $order['po'] = '';
     }
     $body = Template::render_doc_by_name('order-email', $order);
     // send order request to "WinWrap Web Primary/web.primary@winwrap.com"
     $linkc = 'https://www.winwrap.com/web/basic/support/admin/new_company.asp' . '?license=16' . '&company=' . urlencode($order['company']) . '&country=' . urlencode($order['country']) . '&billingaddress=' . urlencode(str_replace("\r\n", '|', $order['address'])) . '&billingname=' . urlencode($order['billing_name']) . '&billingaddr=' . urlencode($order['billing_email']) . '&billingphone=' . urlencode($order['billing_phone']) . '&name=' . urlencode($order['technical_name']) . '&addr=' . urlencode($order['technical_email']);
     $link = 'https://www.winwrap.com/web/basic/support/admin/new_fees.asp' . '?licenseid=' . '&company=' . urlencode($order['company']) . '&feecount=0' . '&payment=' . urlencode($order['payment']) . '&po=' . urlencode($order['po']);
     if (!is_null($quote['discount'])) {
         $link .= '&WWXX00=' . urlencode($quote['discount']) . '&WWXX00_DESC=' . urlencode($quote['discount_desc']);
     }
     $problem = false;
     $parts = [];
     foreach ($quote['items'] as $item) {
         $link .= '&' . $item['part'] . '=' . $item['quantity'];
         $part = substr($item['part'], 0, 6);
         if (array_search($part, $parts)) {
             $problem = true;
         } else {
             $parts[] = $part;
         }
         if (isset($item['override'])) {
             $link .= '&' . $part . '-override=' . $item['override'];
         }
     }
     $bodyc = '1) Click on this link to create the new company:' . "\r\n" . $linkc . "\r\n\r\n";
     if ($problem) {
         $bodyc .= '*** the following link will not create the correct fees ***' . "\r\n";
     }
     $bodyc .= '2) Click on this link to create the fees and invoice:' . "\r\n" . $link . "\r\n\r\n" . $body;
     $args = ['IP: ' . $_SERVER['REMOTE_ADDR'] . "\r\n\r\n" . 'toname' => 'WinWrap Web Primary', 'toemail' => 'web.primary@winwrap.com', 'fromname' => 'WinWrap Web Primary', 'fromemail' => 'web.primary@winwrap.com', 'subject' => 'WinWrap Basic Order Request', 'body' => $bodyc];
     if (GoogleMail::send($args) !== true) {
         header('Status: 500');
         return;
     }
     $status = '1/2: send to ' . $args['toemail'] . "\r\n";
     //echo '<pre>' . $body . '</pre>'; exit;
     // send order request to puchaser
     $args = ['toname' => $order['billing_name'], 'toemail' => $order['billing_email'], 'fromname' => 'WinWrap Support', 'fromemail' => 'support@mail.winwrap.com', 'subject' => 'WinWrap Basic Order Request', 'body' => $body];
     if (GoogleMail::send($args) !== true) {
         header('Status: 500');
         return;
     }
     $status .= '2/2: send to ' . $args['toemail'];
     Render::text($status);
 }
开发者ID:wileybenet,项目名称:mobile-docs,代码行数:55,代码来源:product_ctrl.php

示例2: permit_admin

 public static function permit_admin()
 {
     if (!self::is_admin()) {
         Render::error_404();
     }
 }
开发者ID:wileybenet,项目名称:mobile-docs,代码行数:6,代码来源:session.php

示例3:

<?php

// Route resolver
// Load configs
require_once '../../config/config.inc.php';
ContentProcessor::pre();
Session::start();
SiteStructure::initialize();
Router::initialize();
Render::initialize();
// Resolve the incoming request
$parsed_request = Router::resolve($_SERVER['REQUEST_METHOD'], SiteStructure::get_request_uri());
if ($parsed_request) {
    Ctrl::process($parsed_request);
} else {
    Render::error_404();
}
开发者ID:wileybenet,项目名称:mobile-docs,代码行数:17,代码来源:client.php


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