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


PHP FileUtil::GetGlobalConfig方法代码示例

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


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

示例1: __construct

 function __construct()
 {
     parent::__construct();
     $this->mConfig = FileUtil::GetGlobalConfig();
     $this->mProxyFilePath = WEB_ROOT . "/lib/common/Proxy.php";
     $data = $this->HttpRequest($this->mConfig['FRAMEWORK_DEFAULT']['PROXY_URL']);
     //echo $data."\n";
     $this->mHtmlDom = new simple_html_dom();
     //var_dump($this->mHtmlDom);
     $contentDom = $this->mHtmlDom->load($data);
     $proxyTableTrs = $contentDom->find('table[class=sortable]');
     $this->mProxyArray = array();
     foreach ($proxyTableTrs as $proxyTable) {
         $trs = $proxyTable->find("tr");
         $i = 0;
         foreach ($trs as $tr) {
             //前两个tr不能用
             if ($i++ < 2) {
                 continue;
             }
             $proxyIP = $tr->find("td", 0)->innertext;
             $proxyPORT = $tr->find("td", 1)->innertext;
             $tmp["IP"] = $proxyIP;
             $tmp["PORT"] = $proxyPORT;
             $this->mProxyArray[] = $tmp;
         }
     }
     $this->mHtmlDom->clear();
     $data = $this->HttpRequest($this->mConfig['FRAMEWORK_DEFAULT']['XC_PROXY_URL']);
     $contentDom = $this->mHtmlDom->load($data);
     $proxyTableTrs = $contentDom->find('table[id=ip_list]');
     foreach ($proxyTableTrs as $proxyTable) {
         $trs = $proxyTable->find("tr[class=odd]");
         foreach ($trs as $tr) {
             $proxyIP = $tr->find("td", 1)->innertext;
             $proxyPORT = $tr->find("td", 2)->innertext;
             $tmp["IP"] = $proxyIP;
             $tmp["PORT"] = $proxyPORT;
             $this->mProxyArray[] = $tmp;
         }
     }
     //var_dump($proxyArray);
     FileUtil::SaveFile($this->mProxyArray, $this->mProxyFilePath);
 }
开发者ID:jacksonlaw520,项目名称:HotGirlClaw,代码行数:44,代码来源:ProxyModel.php

示例2: exec

<?php 
//处理单个帖子
require_once "entry.php";
$topicUrl = $argv[1];
$proxyIP = $argv[2];
$proxyPORT = $argv[3];
echo "topicUrl=" . $topicUrl . "\n";
echo "IP=" . $proxyIP . "\n";
echo "PORT=" . $proxyPORT . "\n";
$model = ModelUtil::GetDouBanModel();
$config = FileUtil::GetGlobalConfig();
$imgList = $model->GetPhotoByTopic($topicUrl, $proxyIP, $proxyPORT);
foreach ($imgList as $imgUrl) {
    $cmd = $config['FRAMEWORK_DEFAULT']['PHP_PATH'] . " " . WEB_ROOT . "/download.php " . $imgUrl . " " . $proxyIP . " " . $proxyPORT . "  >/dev/null  &";
    exec($cmd);
}
开发者ID:jacksonlaw520,项目名称:HotGirlClaw,代码行数:16,代码来源:per_topic.php

示例3: __construct

 function __construct()
 {
     $this->mConfig = FileUtil::GetGlobalConfig();
     $this->mGroupUrl = $this->mConfig['FRAMEWORK_DEFAULT']['DOUBAN_SHINE_GROUP_URL'] . $mStart;
     parent::__construct();
 }
开发者ID:jacksonlaw520,项目名称:HotGirlClaw,代码行数:6,代码来源:DoubanModel.php


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