source/index/open_weixin.ctrl.php
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?php
class open_weixinControl extends skymvc{
public $wx;
public $REDIRECT_URI;
public function __construct(){
parent::__construct();
}
public function onInit(){
if($_SESSION['ssuser']){
header("Location: /index.php");
exit;
}
$wid=get_post('wid','i');
if($wid){
$where=" id=".$wid;
}else{
$where="";
}
$this->wx=M("weixin")->selectRow(array("where"=>$where,"order"=>"id DESC"));
$this->REDIRECT_URI=HTTP_HOST."/index.php?m=open_weixin&a=callback&wid=".$this->wx['id'];
}
public function upload_oss($files){
$this->loadClass("image");
$this->loadClass("upload");
$this->upload->uploaddir="attach/".$this->sitedir;
set_time_limit(100);
include_once(ROOT_PATH."api/ossapi/ossapi.php");
if(!UPLOAD_OSS) return false;
if(empty($files)) return false;
$arr=array("",".100x100.jpg",".small.jpg",".middle.jpg");
foreach($arr as $a){
if(file_exists(ROOT_PATH.$files.$a)){
$to=str_replace("//","/",$files.$a);
$from=ROOT_PATH.$files.$a;
$response = oss_upload_file(array("bucket"=>OSS_BUCKET,"to"=>$to,"from"=>$from));
if(defined("UPLOAD_DEL") && UPLOAD_DEL){
@unlink($from);
}
}
}
}
public function onDefault(){
echo "hello";
}
public function onGeturl()
{
if(get('backurl')){
$backurl=get('backurl','x');
}elseif(!empty($_SESSION["backurl"])){
$backurl=$_SESSION["backurl"];
}else{
$backurl=$_SERVER['HTTP_REFERER'];
}
if(empty($backurl)){
$backurl="/";
后面还有 186 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。