Re: invalid path when a page calls itself again
| From: | Kevin Stone | Date: | Wed, 19 Feb 2003 20:04:56 +0000 |
| Subject: | Re: invalid path when a page calls itself again | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-136244@lists.php.net to get a copy of this message | ||
I don't know for sure but I believe commands like (../) may not work in the
require() or include() functions. Just code the exact path from the home
directory and you should be good to go..
require("/var/www/html/system/index.php");
By the way I'd think twice about the way in which you're authenticating the
user. If register_globals is ON then I could simply type
http://www.yourdomain/system/subd1/page1.php?nu_user=true
and gain access without logging in.
- Kevin
----- Original Message -----
From: "enediel" <enediel@com.ith.tur.cu>
To: "php" <php-general@lists.php.net>
Sent: Wednesday, February 19, 2003 2:59 PM
Subject: [PHP] invalid path when a page calls itself again
> Hi everyone:
> Suppose please this example:
>
> /var/www/html/system/index.php
> /var/www/html/system/subd1/page1.php
>
> The users should call index.php to see the other pages into the
> /var/www/html/system/ directory
>
> the index.php calls itself using a form to authenticate the user
>
> Inside page1.php I wrote:
> if(!$nu_user){
> require ("../index.php");
> exit;
> };
>
> It works correctly, but calling index.php through page1.php produces the
> following error when index.php calls itself
>
> the request URL /system/subd1/index.php was not found on this server.
>
> index.php exists on /system/, not in /system/subd1/
> What should I declare inside of index.php to avoid this error ?
>
> thanks in advance
> Enediel
>
>
>
>
>
>
>
>
>
> Greetings
> Enediel
> Linux user 300141
>
> Happy who can penetrate the secret causes of the things
> ¡Use Linux!
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>