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