<?php header("Access-Control-Allow-Origin:*"); //载入配置文件和连接数据库 require 'Common/Mysql.php'; $pdo=conn(); $type = $_POST['type']; $type = str_replace("_",'/',$type); //根据需求调用相应的文件获得数据 require 'Model/'.$type.'.php'; ?>