|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
|
|
#1
|
|||
|
|||
|
Hi,
I'm a newbee on this forum, and I'm looking for the var in Perl, that has the value of the location of the page, that was typed by the user... So when someone goes to http://www.someurl.com/thisdir/thispage.htm, thats the exact value, the var must have. Is this possible??? Any help is welcome and thanks in advance... |
|
#2
|
||||
|
||||
|
something like this may do the trick:
Code:
$domain = $ENV{'HTTP_HOST'}; # the domain http://www.somedomain.com
$file = $ENV{'REQUEST_URI'}; # folder/file requested
$url = "$domain" . "$file"; # tie them together
$request_url = "http://$url"; # the whole thing
Now the $request_url will contain the entire requested URL Mickalo
__________________
Thunder Rain Internet Publishing Custom Programming & Database development Providing Personal/Business Internet Solutions that work! |
|
#3
|
|||
|
|||
|
ENV ? undefined variable ?
Could there be another name for ENV ?
Warning: Undefined variable: ENV in C:\Inetpub\wwwroot\url.php on line 3 Warning: Undefined variable: ENV in C:\Inetpub\wwwroot\url.php on line 4
__________________
perl / cgi newbie |
|
#4
|
||||
|
||||
|
Apparently your using PHP and not Perl, so this won't work. I believe to get in the enviromental variables, you us getvar() or something like. Maybe try posting your question in the PHP forum!
Mickalo |
|
#5
|
|||
|
|||
|
Actually the easiest way it to just use the $HTTP_HOST variable (you can get the php variable about 4 different ways
). This is the easiest way to get that variable (it just exists).[edit: this applies to all env variables] |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Load the URL in a var |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|