我用wampserver来开发PHP页面什么都不显示,代码没看到有什么错误

地址:http://192.168.0.107/app/index.php

代码:<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
    public function index(){
      $nonce =$_GET['nonce'];
      $token ='weixin';
      $timestamp=$_GET['timestamp'];
      $echostr=$_GET['echostr'];
      $signature=$_GET['signature'];
      $array =array();
      $array =array($nonce,$timestamp,$token);
      sort($array);
      $str=sha1(implode($array));
      if( $str==$signature && $echostr){
       //第一次接入微信API接口的时候才会验证合法性
        echo $echostr;
        exit;
      }       
    }
    public function show(){
     echo 'weixin'; 
     
    }   
}

3696558
浏览 2995回答 1
1回答

Aslan丶

你搞了一个class   可是没用
打开App,查看更多内容
随时随地看视频慕课网APP