本文整理汇总了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);
}
示例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);
}
示例3: __construct
function __construct()
{
$this->mConfig = FileUtil::GetGlobalConfig();
$this->mGroupUrl = $this->mConfig['FRAMEWORK_DEFAULT']['DOUBAN_SHINE_GROUP_URL'] . $mStart;
parent::__construct();
}