1
2
3
4
5
6
7
8
9
10
11
12
13
| <?php
| include_once 'commfromx7.php';
|
| header("Content-type: text/html; charset=utf-8");
|
| $pre = "commfrom";
| // $_SERVER['PHP_SELF'] = /api/x7/$prexxxxx.php
| // strripos 最后一次出现 / 的位置,再+1得到 $prexxxxx.php
| // +$pre长度 从$pre后面开始
| // -4 去除最后的.php
| $appid = substr($_SERVER['PHP_SELF'], strripos($_SERVER['PHP_SELF'], "/") + 1 + strlen($pre), -4);
|
| processCommfromx7($appid);
|
|