<?php
set_include_path($string); //设置路径

get_include_path(); // 获取当前的路径

//例如:文件路径为:
//D:/phpweb/demo/test.php
//test.php内容为:
echo "hi";

//D:/phpweb/index.php
//index.php内容为:

set_include_path(get_include_path() . PATH_SEPARATOR . dirname(__FILE__)."/demo/");
require_once("test.php");

//用 PATH_SEPARATOR分格目录(window 为 ; linux 为 :)

// 这样就可以调用test.php文件里面的内容了
?>

  

相关文章:

  • 2021-05-11
  • 2022-02-07
  • 2021-11-26
  • 2022-02-26
  • 2022-12-23
  • 2022-02-07
  • 2021-08-14
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-24
  • 2021-09-25
  • 2021-12-29
  • 2022-12-23
相关资源
相似解决方案