2 Star 1 Fork 2

徐子玉 / 品贷网

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
user_head.php 1.64 KB
一键复制 编辑 原始数据 按行查看 历史
徐子玉 提交于 2017-07-05 11:21 . + pdw
<?php
session_start();
$user_id = isset($_SESSION["userid"]) ? $_SESSION["userid"] : 0;
$ProxyName = "";
$phoneNumber = "";
$authStatus = "";
if($user_id > 0)
{
$client = new SoapClient($GLOBAL_REMOTE_API); //开始调用接口
$user_head_parms = array("userProxyId"=>$user_id);
$user_head_result = $client->userGetInfo($user_head_parms); //Response->Result
//获取用户信息
$userGetInfoResult = $user_head_result->userGetInfoResult;
$userGetInfoResultArray = json_decode($userGetInfoResult, TRUE);
//开始解析
//获取用户信息
$userGetInfo_totalCount = $userGetInfoResultArray[0]['totalCount'];
$userGetInfo_success = $userGetInfoResultArray[0]['success'];
$userGetInfo_data = $userGetInfoResultArray[0]['data'];
if ($userGetInfo_totalCount > 0 && $userGetInfo_success == true)
{
$ProxyName = $userGetInfo_data[0]['ProxyName'];
$phoneNumber = $userGetInfo_data[0]['phoneNumber'];
$authStatus = $userGetInfo_data[0]['authStatus'];
}
}
$localurl = $_SERVER['PHP_SELF'];
$localarg = $_SERVER["REQUEST_URI"];//$_SERVER["SERVER_NAME"] .
$user_head_html = '';
$filename = "user_head.html";
$file = @fopen($filename,"r");
if ($file) {
$contents = @fread($file, filesize($filename));
$head_html = $contents;
$head_html = str_replace("{\$user_id}", $user_id, $head_html);
$head_html = str_replace("{\$ProxyName}", $ProxyName, $head_html);
$head_html = str_replace("{\$phoneNumber}", $phoneNumber, $head_html);
$head_htmlArr[] = $head_html;
fclose($file);
}
$user_head_html = implode('', $head_htmlArr); //将切开后的字符串返回到数组变量中
?>
1
https://gitee.com/xuqipeter/pdw.git
git@gitee.com:xuqipeter/pdw.git
xuqipeter
pdw
品贷网
master

搜索帮助