![]() |
$_server['request_uri']
I got this code off another forum(yes it was posted) and I am not really sure what the $_SERVER['REQUEST_URI'] means. It's part of a membership system
Here is code(its called register.php): PHP Code:
I'm kinda new at php anyway. If you can tell me what the $_SERVER['REQUEST_URI'] means in somewhat detail, I would appreciate that too. Thanks in advance, W3C |
Re: $_server['request_uri']
The $_SERVER is a global variable, which contains serveral server variables and their values. The $_SERVER['REQUEST_URI'] hold the value of the URI requested not the URL though. For example when you visit http://go4expert.com/forums/index.php the $_SERVER['REQUEST_URI'] contains /forums/index.php.
If you want to print all the server variables and their values use the following code: Code: PHP
Finally, the 403 error might be because of your web server configuration, check your web server's documentation for details. |
Re: $_server['request_uri']
I can't find anything under the documentations.
But when I click register button on the form it takes me to the 403 Forbidden. The Address is: http://localhost/KRZY%20Space/%3C?php=$_SERVER['REQUEST_URI']?%3E Error says: Forbidden You don't have permission to access /KRZY Space/< on this server. Apache/2.0.59 (Win32) PHP/5.1.6 Server at localhost Port 80 Don't know if this helps. But tell me if you need more info. And for the $_SERVER['REQUEST_URI'], is it used in forms like when you register at the site stargatewars.com? or is it different? |
Re: $_server['request_uri']
Looks like you dont have a filename for the PHP script in the URL, and also there are lot of special characters in the URL.
|
Re: $_server['request_uri']
So do you any suggestion on what to do?
Do I make a folder/file? If so what should it be called? And for the specail characters how do I get rid of those? |
Re: $_server['request_uri']
See, the folder and file should be limited to these characters [a-z,A-Z,0-9,_,-], this would elimniate the problems, try making a new folder and make new files there.
|
| All times are GMT +5.5. The time now is 16:32. |