index.php 662 B

123456789101112
  1. <?php
  2. header('text/html;application/json;charset=utf-8;');
  3. header('Access-Control-Allow-Origin: *');
  4. header('Access-Control-Allow-Headers:Origin, No-Cache, X-Requested-With, If-Modified-Since, Pragma, Last-Modified, Cache-Control, Expires, Content-Type, X-E4M-With;');
  5. include('mysql.php'); //引用连接数据库接
  6. if (isset($_POST['mode'])) { echo con::usselect($_POST['mode']); }
  7. else if(isset($_GET['mode'])){ echo con::usselect($_GET['mode']); } //Ajax处理
  8. // else if(isset($_GET['parame'])){ echo $_GET['callback']."(U.M.toList(".(con::usselect($_GET['parame']))."));"; } //Jsonp处理
  9. else { echo ""; }//无参数错
  10. //echo $_POST['mode'];