面向对象加载类
include("Info.class.php"); ? ? ? ? ? ? ?// 將文件加載到頁面,參數是路徑(找到類文件)
require_once "./Info.class.php"; ? ?//請求目標頁面一次
require ("Info.class.php");
?
查找目錄的方法:
當前目錄: ./
上級目錄:../
下級目錄:目錄名/
根目錄:/
如果是在php代碼里面 /代表本地磁盤的根(D)
如果在html里面 /代表當前站點目錄
?
轉載于:https://www.cnblogs.com/zk0533/p/5451981.html
總結
- 上一篇: tinyhttp源码阅读(注释)
- 下一篇: PHP爬取历史天气