/school
/teacher
index.php
/student
index.php
如何从student/index.php
致电teacher/index.php
?
答案 0 :(得分:0)
写
header("Location: ../student/index.php"); // this is incase you want to go to that page
require_once('../student/index.php'); // incase you want to include that file
答案 1 :(得分:0)
require '../student/index.php';
这将打电话给'剧本。如果脚本有返回值,那么只需在require语句的左侧创建赋值语句。
$ret = require '../student/index.php';
答案 2 :(得分:0)
在teacher/index.php
中使用此代码
header("Location: ../student/index.php");
答案 3 :(得分:0)
您还可以使用pecl_http(如果可用)和函数http_redirect。