分享
  • 收藏
  • 举报
    X
    对接的微信页面出错提示
    • 笨熊 消费791.82元 2019-01-23 17:02 17:02
    703
    3

    [0] ThrowableError in Api.php line 33

    致命错误: Call to undefined function plugins\weixin\index\simplexml_load_string()

    * 对接微信公众号的唯一入口     * @return string|\plugins\weixin\index\unknown     */    public function index(){                if(input('echostr')){	//首次绑定接口地址时,微信要用到的测试接口是否正常            echo input('echostr');            exit;        }        //微信POST过来的非PHP标准数据        $responseObj = simplexml_load_string(file_get_contents("php://input"), 'SimpleXMLElement', LIBXML_NOCDATA);        //$responseObj = simplexml_load_string($HTTP_RAW_POST_DATA, 'SimpleXMLElement', LIBXML_NOCDATA);        //用户点击菜单事件        if($responseObj->Event=='CLICK'){            $responseObj->Content = $responseObj->EventKey;        }        self::$xml_obj = $responseObj;                //用户关注,取消关注,扫码,公众号开启的强制获取位置

     

    Call Stack

    1. in Api.php line 33

    2. at Api->index() in common.php line 368

    3. at plugin_action('weixin', 'api', 'index', []) in Plugin.php line 37

    4. at Plugin->execute()

    5. at ReflectionMethod->invokeArgs(object(Plugin), []) in App.php line 348

    6. at App::invokeMethod([object(Plugin), 'execute'], []) in App.php line 612

    7. at App::module(['index', 'plugin', 'execute'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 461

    8. at App::exec(['type' => 'module', 'module' => ['index', 'plugin', 'execute'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139

    9. at App::run() in start.php line 19

    10. at require('/home/tanglihe/wwwro...') in index.php line 29


    5
    赏礼
    赏钱
    收藏
    点击回复
        全部留言
    • 3
    • admin 超级管理员 消费:3.03元 2019-01-23 18:20 18:206楼

      空间不支持这个函数.

      simplexml_load_string



      笨熊 消费:791.82元 iPhone 2019-01-23 18:42
      ?这个函数不是php吗?ph运行都挺正常呀
      笨熊 消费:791.82元 2019-01-24 09:21
      OK,simplexml扩展库没有安装
    0 赏钱 赏礼回复
    更多回复
    恢复多功能编辑器
  • 3 1
  • 推荐内容
    扫一扫访问手机版
    请选择要切换的马甲:

     
    网页即时交流
    QQ咨询
    咨询热线
    020-28998648