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


PHP interface_configure函数代码示例

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


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

示例1: unset

        }
    }
}
if ($_POST['apply']) {
    unset($input_errors);
    if (!is_subsystem_dirty('interfaces')) {
        $input_errors[] = gettext("You have already applied your settings!");
    } else {
        unlink_if_exists("{$g['tmp_path']}/config.cache");
        clear_subsystem_dirty('interfaces');
        if (file_exists("{$g['tmp_path']}/.interfaces.apply")) {
            $toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/.interfaces.apply"));
            foreach ($toapplylist as $ifapply => $ifcfgo) {
                if (isset($config['interfaces'][$ifapply]['enable'])) {
                    interface_bring_down($ifapply, false, $ifcfgo);
                    interface_configure($ifapply, true);
                } else {
                    interface_bring_down($ifapply, true, $ifcfgo);
                    if (isset($config['dhcpd'][$ifapply]['enable']) || isset($config['dhcpdv6'][$ifapply]['enable'])) {
                        services_dhcpd_configure();
                    }
                }
            }
        }
        /* restart snmp so that it binds to correct address */
        services_snmpd_configure();
        /* sync filter configuration */
        setup_gateways_monitor();
        clear_subsystem_dirty('interfaces');
        filter_configure();
        enable_rrd_graphing();
开发者ID:simudream,项目名称:pfsense,代码行数:31,代码来源:interfaces.php

示例2: implode

            $bridge['autoptp'] = implode(',', $_POST['autoptp']);
        }
        $bridge['bridgeif'] = $_POST['bridgeif'];
        interface_bridge_configure($bridge);
        if ($bridge['bridgeif'] == "" || !stristr($bridge['bridgeif'], "bridge")) {
            $input_errors[] = gettext("Error occurred creating interface, please retry.");
        } else {
            if (isset($id) && $a_bridges[$id]) {
                $a_bridges[$id] = $bridge;
            } else {
                $a_bridges[] = $bridge;
            }
            write_config();
            $confif = convert_real_interface_to_friendly_interface_name($bridge['bridgeif']);
            if ($confif != "") {
                interface_configure($confif);
            }
            header("Location: interfaces_bridge.php");
            exit;
        }
    }
}
// port list with the exception of assigned bridge interfaces to prevent invalid configs
function build_port_list($selecton)
{
    global $config, $ifacelist;
    $portlist = array('list' => array(), 'selected' => array());
    foreach ($ifacelist as $ifn => $ifdescr) {
        if (substr($config['interfaces'][$ifn]['if'], 0, 6) != "bridge") {
            $portlist['list'][$ifn] = $ifdescr;
            if (in_array($ifn, explode(',', $selecton))) {
开发者ID:LFCavalcanti,项目名称:pfsense,代码行数:31,代码来源:interfaces_bridge_edit.php

示例3: DAMAGES

	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
	POSSIBILITY OF SUCH DAMAGE.
*/
require_once "guiconfig.inc";
require_once "filter.inc";
if ($_POST['if'] && $_POST['submit']) {
    $interface = $_POST['if'];
    if ($_POST['status'] == "up") {
        interface_bring_down($interface);
    } else {
        interface_configure($interface);
    }
    header("Location: status_interfaces.php");
    exit;
}
$pgtitle = array(gettext("Status"), gettext("Interfaces"));
$shortcut_section = "interfaces";
include "head.inc";
?>

<body>
<?php 
include "fbegin.inc";
?>

<section class="page-content-main">
开发者ID:hlcherub,项目名称:core,代码行数:31,代码来源:status_interfaces.php

示例4: array

                         if (!is_array($config['interfaces'][$ifname]['wireless'])) {
                             $config['interfaces'][$ifname]['wireless'] = array();
                         }
                     } else {
                         unset($config['interfaces'][$ifname]['wireless']);
                     }
                     /* make sure there is a descr for all interfaces */
                     if (!isset($config['interfaces'][$ifname]['descr'])) {
                         $config['interfaces'][$ifname]['descr'] = strtoupper($ifname);
                     }
                     if ($reloadif == true) {
                         if (preg_match($g['wireless_regex'], $ifport)) {
                             interface_sync_wireless_clones($config['interfaces'][$ifname], false);
                         }
                         /* Reload all for the interface. */
                         interface_configure($ifname, true);
                     }
                 }
             }
         }
         write_config();
         enable_rrd_graphing();
     }
 } else {
     unset($delbtn);
     if (!empty($_POST['del'])) {
         $delbtn = key($_POST['del']);
     }
     if (isset($delbtn)) {
         $id = $delbtn;
         if (link_interface_to_group($id)) {
开发者ID:michaeleino,项目名称:pfsense,代码行数:31,代码来源:interfaces_assign.php


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