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

PHP is_posnumericint函数代码示例

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

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



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

示例1: gettext

 if ($_POST['max'] != "" && !is_posnumericint($_POST['max'])) {
     $input_errors[] = gettext("Maximum state entries (advanced option) must be a positive integer");
 }
 if ($_POST['max-src-nodes'] != "" && !is_posnumericint($_POST['max-src-nodes'])) {
     $input_errors[] = gettext("Maximum number of unique source hosts (advanced option) must be a positive integer");
 }
 if ($_POST['max-src-conn'] != "" && !is_posnumericint($_POST['max-src-conn'])) {
     $input_errors[] = gettext("Maximum number of established connections per host (advanced option) must be a positive integer");
 }
 if ($_POST['max-src-states'] != "" && !is_posnumericint($_POST['max-src-states'])) {
     $input_errors[] = gettext("Maximum state entries per host (advanced option) must be a positive integer");
 }
 if ($_POST['max-src-conn-rate'] != "" && !is_posnumericint($_POST['max-src-conn-rate'])) {
     $input_errors[] = gettext("Maximum new connections per host / per second(s) (advanced option) must be a positive integer");
 }
 if ($_POST['statetimeout'] != "" && !is_posnumericint($_POST['statetimeout'])) {
     $input_errors[] = gettext("State timeout (advanced option) must be a positive integer");
 }
 if (($_POST['max-src-conn-rate'] != "" and $_POST['max-src-conn-rates'] == "") || ($_POST['max-src-conn-rate'] == "" and $_POST['max-src-conn-rates'] != "")) {
     $input_errors[] = gettext("Both maximum new connections per host and the interval (per second(s)) must be specified");
 }
 if (!$_POST['tcpflags_any']) {
     $settcpflags = array();
     $outoftcpflags = array();
     foreach ($tcpflags as $tcpflag) {
         if ($_POST['tcpflags1_' . $tcpflag] == "on") {
             $settcpflags[] = $tcpflag;
         }
         if ($_POST['tcpflags2_' . $tcpflag] == "on") {
             $outoftcpflags[] = $tcpflag;
         }
开发者ID:rohankapoorcom,项目名称:pfsense,代码行数:31,代码来源:firewall_rules_edit.php


示例2: gettext

 if (!empty($pconfig['max']) && !is_posnumericint($pconfig['max'])) {
     $input_errors[] = gettext("Maximum state entries (advanced option) must be a positive integer");
 }
 if (!empty($pconfig['max-src-nodes']) && !is_posnumericint($pconfig['max-src-nodes'])) {
     $input_errors[] = gettext("Maximum number of unique source hosts (advanced option) must be a positive integer");
 }
 if (!empty($pconfig['max-src-conn']) && !is_posnumericint($pconfig['max-src-conn'])) {
     $input_errors[] = gettext("Maximum number of established connections per host (advanced option) must be a positive integer");
 }
 if (!empty($pconfig['max-src-states']) && !is_posnumericint($pconfig['max-src-states'])) {
     $input_errors[] = gettext("Maximum state entries per host (advanced option) must be a positive integer");
 }
 if (!empty($pconfig['max-src-conn-rate']) && !is_posnumericint($pconfig['max-src-conn-rate'])) {
     $input_errors[] = gettext("Maximum new connections per host / per second(s) (advanced option) must be a positive integer");
 }
 if (!empty($pconfig['statetimeout']) && !is_posnumericint($pconfig['statetimeout'])) {
     $input_errors[] = gettext("State timeout (advanced option) must be a positive integer");
 }
 if (empty($pconfig['max-src-conn-rate']) && !empty($pconfig['max-src-conn-rates']) || !empty($pconfig['max-src-conn-rate']) && empty($pconfig['max-src-conn-rates'])) {
     $input_errors[] = gettext("Both maximum new connections per host and the interval (per second(s)) must be specified");
 }
 if (empty($pconfig['tcpflags2']) && !empty($pconfig['tcpflags1'])) {
     $input_errors[] = gettext("If you specify TCP flags that should be set you should specify out of which flags as well.");
 }
 if (count($input_errors) == 0) {
     $filterent = array();
     // 1-on-1 copy of form values
     $copy_fields = array('type', 'interface', 'ipprotocol', 'tag', 'tagged', 'max', 'max-src-nodes', 'max-src-conn', 'max-src-states', 'statetimeout', 'statetype', 'os', 'descr', 'gateway', 'sched', 'associated-rule-id', 'direction', 'quick', 'max-src-conn-rate', 'max-src-conn-rates');
     foreach ($copy_fields as $fieldname) {
         if (!empty($pconfig[$fieldname])) {
             if (is_array($pconfig[$fieldname])) {
开发者ID:paudam,项目名称:opnsense-core,代码行数:31,代码来源:firewall_rules_edit.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP is_post函数代码示例发布时间:2022-05-15
下一篇:
PHP is_pos_int函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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