PDA

View Full Version : $_server['document_root']


weronpc
04-23-2003, 08:23 PM
Hello everyone, a quick question

here is my form:
<form action="<?php echo $_SERVER['DOCUMENT_ROOT']."/web/php/check.php"; ?>" method="POST">

and this showed when I view source
<form action="C:\\Program Files\\BadBlue\\PE/web/php/check.php" method="POST">

The funny thing is, when I use $_SERVER['DOCUMENT_ROOT'] for include files, it works fine, but when I use it for form, it doesn't work. why is there dboule \ at the view source?

Thank you

Mike

duniyadnd
04-24-2003, 07:51 AM
that's weird, it works fine for me using your exact code.

Duniyadnd

weronpc
04-24-2003, 02:07 PM
It doesn't work because I am trying to open a php file by it's location, samething as trying to open a php file by double clicking it (without a complier).

One small question:

Do anyone know how to make a folder only people with password can have access to it?

I am runing window xp, php 4.3.1.1, MySQL and Bad Blue.

Thank you

Weirdan
04-27-2003, 07:18 PM
http://httpd.apache.org/docs/howto/auth.html
Don't know how to do it with IIS (& don't even want to know:)).