私は、ファイル「menu.php」が含まれてい不正なリダイレクトが
<?php
include("menu.php");
?>
をそして、それが正常に動作しています。私が入力したindex.phpの中
しかし、今..私は、「データ」というフォルダを作成し、その中で私が「index.phpを」というファイルを作成し...
:
<?php
include("../menu.php");
?>
ホーム::データ/ index.phpを ログアウト:「データ/ index.phpを」を閲覧しながら、
は、だから今のメニューはリンクがある...あまりにも「データ/ index.phpを」で表示されますが、データ/ logout.php
データなしでindex.phpとlogout.phpを作る方法/?
解決策は、それが '...'. This will make the browser always go to the root directory. – JensV
@JensV - Now it redirect to the main root directory of the domain ... While menu.php is not in the root directory. – Jacksweet
If your files are not located in the root of the webserver you should consider having absolute paths everywhere. E.g. '/dir/of/your/files/index.php' Also to achive this in php you can prepend your paths with '$_SERVER['DOCUMENT_ROOT']' – JensV