2 Star 1 Fork 2

徐子玉/品贷网

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ad_head.php 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
徐子玉 提交于 2017-07-05 11:21 . + pdw
<?php
include_once 'config.php';
$ad_head_html = '';
$filename = "ad_head.html";
$file = @fopen($filename,"r");
if ($file) {
$contents = @fread($file, filesize($filename));
//��ҳ�������
$adtype = 3;
$ADTypes = array("type"=>$adtype);
$client = new SoapClient($GLOBAL_REMOTE_API);
$ADList_result = $client->getADList($ADTypes);
$getADListResult = $ADList_result->getADListResult;
$getADListResultArray = json_decode($getADListResult, TRUE);
//��ʼ����
$ADList_totalCount = $getADListResultArray[0]['totalCount'];
$ADList_success = $getADListResultArray[0]['success'];
$ADList_data = $getADListResultArray[0]['data'];
$ADListhtml = '';
foreach($ADList_data as $key=>$d){
$factoryId = $ADList_data[$key]['factoryId'];
$picUrl = $ADList_data[$key]['picUrl'];
$linkUrl = $ADList_data[$key]['linkUrl'];
$linkUrl = ($linkUrl != '') ? $linkUrl : 'store.php?id=' .$factoryId;
}
$adhead_html = str_replace("{\$ad_url}", $linkUrl, $contents);
$adhead_html = str_replace("{\$ad_img}", $picUrl, $adhead_html);
$adhead_htmlArr[] = $adhead_html;
fclose($file);
}
$ad_head_html = implode('', $adhead_htmlArr);
?>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xuqipeter/pdw.git
git@gitee.com:xuqipeter/pdw.git
xuqipeter
pdw
品贷网
master

搜索帮助