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


PHP Shopp::ini_size方法代碼示例

本文整理匯總了PHP中Shopp::ini_size方法的典型用法代碼示例。如果您正苦於以下問題:PHP Shopp::ini_size方法的具體用法?PHP Shopp::ini_size怎麽用?PHP Shopp::ini_size使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Shopp的用法示例。


在下文中一共展示了Shopp::ini_size方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: errors

 /**
  * Predefined error messages for common occurrences including common PHP-generated error codes
  *
  * @author Jonathan Davis
  * @since 1.2
  *
  * @param string $type Table reference type from the error array
  * @param mixed $code
  * @return string Error message
  **/
 public static function errors($type, $code)
 {
     $_ = array();
     $_['contact'] = array('shopp-support' => __('For help with this, contact the Shopp %ssupport team%s.', 'Shopp'), 'shopp-cs' => __('For help with this, contact Shopp %scustomer service%s.', 'Shopp'), 'server-manager' => __('For help with this, contact your web hosting provider or server administrator.', 'Shopp'), 'webmaster' => __('For help with this, contact your website developer.', 'Shopp'), 'admin' => __('For help with this, contact the website administrator.', 'Shopp'));
     /* PHP file upload errors */
     $_['uploads'] = array(UPLOAD_ERR_INI_SIZE => sprintf(__('The uploaded file is too big for the server.%s', 'Shopp'), sprintf(' ' . __('Files must be less than %s.', 'Shopp') . " {$_['contact']['server-manager']}", Shopp::ini_size('upload_max_filesize'))), UPLOAD_ERR_FORM_SIZE => sprintf(__('The uploaded file is too big.%s', 'Shopp'), isset($_POST['MAX_FILE_SIZE']) ? sprintf(' ' . __('Files must be less than %s. Please try again with a smaller file.', 'Shopp'), readableFileSize($_POST['MAX_FILE_SIZE'])) : ''), UPLOAD_ERR_PARTIAL => __('The file upload did not complete correctly.', 'Shopp'), UPLOAD_ERR_NO_FILE => __('No file was uploaded.', 'Shopp'), UPLOAD_ERR_NO_TMP_DIR => __('The server is missing the necessary temporary folder.', 'Shopp') . " {$_['contact']['server-manager']}", UPLOAD_ERR_CANT_WRITE => __('The file could not be saved to the server.%s', 'Shopp') . " {$_['contact']['server-manager']}", UPLOAD_ERR_EXTENSION => __('The file upload was stopped by a server extension.', 'Shopp') . " {$_['contact']['server-manager']}");
     /* File upload security verification errors */
     $_['uploadsecurity'] = array('is_uploaded_file' => __('The file specified is not a valid upload and is out of bounds. Nice try though!', 'Shopp'), 'is_readable' => __('The uploaded file cannot be read by the web server and is unusable.', 'Shopp') . " {$_['contact']['server-manager']}", 'is_empty' => __('The uploaded file is empty.', 'Shopp'), 'filesize_mismatch' => __('The size of the uploaded file does not match the size reported by the client. Something fishy going on?', 'Shopp'));
     $callhome_fail = __('Could not connect to the shopplugin.net server.', 'Shopp');
     $_['callhome'] = array('fail' => $callhome_fail, 'noresponse' => __('No response was sent back by the shopplugin.net server.', 'Shopp') . " {$_['contact']['admin']}", 'http-unknown' => __('The connection to the shopplugin.net server failed due to an unknown error.', 'Shopp') . " {$_['contact']['admin']}", 'http-400' => $callhome_fail . __("The server couldn't understand the request.", 'Shopp') . " {$_['contact']['admin']} (HTTP 400)", 'http-401' => $callhome_fail . __('The server requires login authentication and denied access.', 'Shopp') . " {$_['contact']['admin']} (HTTP 401)", 'http-403' => $callhome_fail . __('The server refused the connection.', 'Shopp') . " {$_['contact']['admin']} (HTTP 403)", 'http-404' => __('The requested resource does not exist on the shopplugin.net server.', 'Shopp') . " {$_['contact']['admin']} (HTTP 404)", 'http-500' => __('The shopplugin.net server experienced an error and could not handle the request.', 'Shopp') . " {$_['contact']['admin']} (HTTP 500)", 'http-501' => __('The shopplugin.net server does not support the method of the request.', 'Shopp') . " {$_['contact']['admin']} (HTTP 501)", 'http-502' => __('The shopplugin.net server is acting as a gateway and received an invalid response from the upstream server.', 'Shopp') . " {$_['contact']['admin']} (HTTP 502)", 'http-503' => __('The shopplugin.net server is temporarily unavailable due to a high volume of traffic.', 'Shopp') . " {$_['contact']['admin']} (HTTP 503)", 'http-504' => __('The connected shopplugin.net server is acting as a gateway and received a connection timeout from the upstream server.', 'Shopp') . " {$_['contact']['admin']} (HTTP 504)", 'http-505' => __("The shopplugin.net server doesn't support the connection protocol version used in the request.", 'Shopp') . " {$_['contact']['admin']} (HTTP 505)");
     $gateway_fail = __('Could not connect to the payment server.', 'Shopp');
     $_['gateway'] = array('nogateways' => __('No payment system has been setup for the storefront.', 'Shopp') . " {$_['contact']['admin']}", 'fail' => $gateway_fail, 'noresponse' => __('No response was sent back by the payment server.', 'Shopp') . " {$_['contact']['admin']}", 'http-unknown' => __('The connection to the payment server failed due to an unknown error.', 'Shopp') . " {$_['contact']['admin']}", 'http-400' => $gateway_fail . __("The server couldn't understand the request.", 'Shopp') . " {$_['contact']['admin']} (HTTP 400)", 'http-401' => $gateway_fail . __('The server requires login authentication and denied access.', 'Shopp') . " {$_['contact']['admin']} (HTTP 401)", 'http-403' => $gateway_fail . __('The server refused the connection.', 'Shopp') . " {$_['contact']['admin']} (HTTP 403)", 'http-404' => __('The requested resource does not exist on the payment server.', 'Shopp') . " {$_['contact']['admin']} (HTTP 404)", 'http-500' => __('The payment server experienced an error and could not handle the request.', 'Shopp') . " {$_['contact']['admin']} (HTTP 500)", 'http-501' => __('The payment server does not support the method of the request.', 'Shopp') . " {$_['contact']['admin']} (HTTP 501)", 'http-502' => __('The connected payment server is acting as a gateway and received an invalid response from the upstream server.', 'Shopp') . " {$_['contact']['admin']} (HTTP 502)", 'http-503' => __('The payment server is temporarily unavailable due to a high volume of traffic.', 'Shopp') . " {$_['contact']['admin']} (HTTP 503)", 'http-504' => __('The connected payment server is acting as a gateway and received a connection timeout from the upstream server.', 'Shopp') . " {$_['contact']['admin']} (HTTP 504)", 'http-505' => __("The payment server doesn't support the connection protocol version used in the request.", 'Shopp') . " {$_['contact']['admin']} (HTTP 505)");
     $shipping_fail = __('Could not connect to the shipping rates server.', 'Shopp');
     $_['shipping'] = array('fail' => $shipping_fail, 'noresponse' => __('No response was sent back by the shipping rates server.', 'Shopp') . " {$_['contact']['admin']}", 'http-unknown' => __('The connection to the shipping rates server failed due to an unknown error.', 'Shopp') . " {$_['contact']['admin']}", 'http-400' => $shipping_fail . __("The server couldn't understand the request.", 'Shopp') . " {$_['contact']['admin']} (HTTP 400)", 'http-401' => $shipping_fail . __('The server requires login authentication and denied access.', 'Shopp') . " {$_['contact']['admin']} (HTTP 401)", 'http-403' => $shipping_fail . __('The server refused the connection.', 'Shopp') . " {$_['contact']['admin']} (HTTP 403)", 'http-404' => __('The requested resource does not exist on the shipping rates server.', 'Shopp') . " {$_['contact']['admin']} (HTTP 404)", 'http-500' => __('The shipping rates server experienced an error and could not handle the request.', 'Shopp') . " {$_['contact']['admin']} (HTTP 500)", 'http-501' => __('The shipping rates server does not support the method of the request.', 'Shopp') . " {$_['contact']['admin']} (HTTP 501)", 'http-502' => __('The connected shipping rates server is acting as a gateway and received an invalid response from the upstream server.', 'Shopp') . " {$_['contact']['admin']} (HTTP 502)", 'http-503' => __('The shipping rates server is temporarily unavailable due to a high volume of traffic.', 'Shopp') . " {$_['contact']['admin']} (HTTP 503)", 'http-504' => __('The connected shipping rates server is acting as a gateway and received a connection timeout from the upstream server.', 'Shopp') . " {$_['contact']['admin']} (HTTP 504)", 'http-505' => __("The shipping rates server doesn't support the connection protocol version used in the request.", 'Shopp') . " {$_['contact']['admin']} (HTTP 505)");
     if (isset($_[$type]) && isset($_[$type][$code])) {
         return $_[$type][$code];
     }
     return false;
 }
開發者ID:BlessySoftwares,項目名稱:anvelocom,代碼行數:29,代碼來源:Lookup.php

示例2: ini_size

/**
 * @deprecated Use Shopp::ini_size()
 **/
function ini_size($name)
{
    return Shopp::ini_size($name);
}
開發者ID:BlessySoftwares,項目名稱:anvelocom,代碼行數:7,代碼來源:Core.php


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