I log in the background with the session, only use the background one login foreground index.php Insert File You will read the top.php in the background, not the top.php in the root directory. There is no problem locally. There is a problem on the server.
Both local and server are Win2003 + php5.2.5
I don't have an absolute path, it's all a relative path.
Reply to discussion (solution)
Require_once (' top.php ');
Top.php of the directory where the current file is loaded
Require_once (' top.php ');
Top.php of the directory where the current file is loaded
Now is not to load the current directory of top.php, loading is the background of the top.php
Give your directory structure
Put out the wrong tips and see
Put out the wrong tips and see
No prompt error, is called manage under the top.php
Directory structure:
/root directory
└---top.php
└---index.php
└---Manage (folder)
└---login.php
└---top.php
Inserted top.php in the index.php.
After logging in with login.php, accessing the index.php in the root directory will load manage/top.php instead of loading the root directory top.php
It's a strange question.
Master please come in and see what's going on!
Is the action for the login form not manage/login.php?
You're inside the index.php. GETCWD () print as current path look
You're inside the index.php. GETCWD () print as current path look
Returning the correct directory locally
Remote return: C:\WINDOWS\system32\inetsrv
Directory structure:
/root directory
└---top.php
└---index.php
└---Manage (folder)
└---login.php
└---top.php
Inserted top.php in the index.php.
After logging in with login.php, accessing the index.php in the root directory will load manage/top.php instead of loading the root directory top.php
It's a strange question.
When you visit index.php, if you use the Require words is right, because if it is require ("index.php") then it is quite the same as the current directory (login.php) in the top also imported, If it's not requrire, then I don't know what's going on.
Return the correct path with dirname (__file__), but still call top.php! under Manage
The problem is still not solved, but thank you all, see a part!
If anyone has a good idea, remember to contact me!