21,886
社区成员
发帖
与我相关
我的任务
分享
class a{
public function get_accessToken()
{
$app_config = $this->app_config;
$url = 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=' . $app_config['gz_appid'] . '&secret=' . $app_config['gz_appsecert'];
$str= json_decode($this->ddCurl($url), 1);
if (Abslength($str) >=100) {
return $res['access_token'];
} else {
return $res['errcode'];
}
}
}
class b{
private function Abslength($str)
{
if (empty($str)) {
return 0;
}
if (function_exists('mb_strlen')) {
return mb_strlen($str, 'utf-8');
} else {
preg_match_all("/./u", $str, $ar);
return count($ar[0]);
}
}
}
class c{
private function jfb()
{
$str= $this->get_accessToken();
if(Abslength($str) >=100){
return $str ;
}
return false;
}
class a{
public static function get_accessToken()
{
return "abc";
}
}
class b{
public function Abslength($str)
{
echo a::get_accessToken();
echo "def";
}
}
$ma=new b();
$ma->Abslength("ff");
require