[英]Access to another file from index.php
我在訪問文件時遇到問題。 我有文件夾和文件:
公共/ index.php文件
應用程序/ doit.php
當我使用header('Location: ../app/doit.php');
我的index.php,我有錯誤:找不到對象!
我的網站以public / index.php開頭
如何訪問doit.php?
header('Location: ../app/doit.php');
這意味着重定向到http://yourhost/public/app/doit.php
要使用此代碼重定向,必須將應用程序文件夾移動到公用文件夾內部
文件夾結構必須類似於public/app/doit.php
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.