本文整理汇总了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;
}
示例2: ini_size
/**
* @deprecated Use Shopp::ini_size()
**/
function ini_size($name)
{
return Shopp::ini_size($name);
}