Ask a Question related to ASP, Design and Development.
-
middletree #1
server variables question
I have a little snippet of code that looks like this:
strServer = Request.ServerVariables ("server_name")
If strServer = "localhost" then
The purpose of this code is to do one thing when I'm on my development
machine, and another when on production. This is valuabel as it has kept me
from having to change code when uploading from dev to prod.
It was working fine, as recently as two hours ago, and now it doesn't. I do
a response.write and it returns an empty string. I have no idea why, and I
certainly didn't change anything. Anyone have any idea why this could
happen?
middletree Guest
-
Variables question
I have a musql database on a personal web server which correctly displays the variable I want in flash. However I wish to change my variables now... -
Question about url variables
Does anyone know of a way to grab a complete url, save it in a variable and transfer it to another page. Thanks, Robert -
component variables question??
I would appreciate any help that can be afforded on this... I am gathering the following variables in component definition; btn_action | list |... -
QUESTION ON SESSION VARIABLES
Hi there.... i got a quick one for you guys. i've this session variable that is updated by calling a server method (i set this value when the user... -
getenv variables question
I am trying to write a PHP action into my custom 404 error page that will email me when someone tries to access a bad link. I can get it to work... -
Aaron #2
Re: server variables question
What is empty? strServer?
dim strserver
strServer = Request.ServerVariables ("server_name")
response.write strserver '<-- is this empty?
middletree wrote:
> I have a little snippet of code that looks like this:
>
> strServer = Request.ServerVariables ("server_name")
> If strServer = "localhost" then
>
>
> The purpose of this code is to do one thing when I'm on my development
> machine, and another when on production. This is valuabel as it has kept me
> from having to change code when uploading from dev to prod.
>
> It was working fine, as recently as two hours ago, and now it doesn't. I do
> a response.write and it returns an empty string. I have no idea why, and I
> certainly didn't change anything. Anyone have any idea why this could
> happen?
>
>
>
>Aaron Guest
-
middletree #3
Re: server variables question
Yes, strServer is empty.
Specifically I do
response.write strServer &"test"
response.end
and get:
test
Also, it should be noted that although I show a space just before the
opening parenthesis, there's actually no space in my code. Just a typo here.
"Aaron" <a@1.net> wrote in message
news:OfRxR$amDHA.964@TK2MSFTNGP10.phx.gbl...me> What is empty? strServer?
>
> dim strserver
> strServer = Request.ServerVariables ("server_name")
> response.write strserver '<-- is this empty?
>
> middletree wrote:
>> > I have a little snippet of code that looks like this:
> >
> > strServer = Request.ServerVariables ("server_name")
> > If strServer = "localhost" then
> >
> >
> > The purpose of this code is to do one thing when I'm on my development
> > machine, and another when on production. This is valuabel as it has keptdo> > from having to change code when uploading from dev to prod.
> >
> > It was working fine, as recently as two hours ago, and now it doesn't. II> > a response.write and it returns an empty string. I have no idea why, and>> > certainly didn't change anything. Anyone have any idea why this could
> > happen?
> >
> >
> >
> >
middletree Guest
-
Ray at #4
Re: server variables question
Load up a page with this code and look at the results.
<%
Dim asdf4uaiskjdyf74
For each asdf4uaiskjdyf74 in Request.ServerVariables
Response.Write asdf4uaiskjdyf74 & " = " &
Request.ServerVariables(asdf4uaiskjdyf74)
Response.Write "<hr>"
Next
%>
Do you see all the server variable values, and does SERVER_NAME show up
okay?
Ray at home
"middletree" <middletree@htomail.com> wrote in message
news:Oz2ERBbmDHA.1284@TK2MSFTNGP09.phx.gbl...here.> Yes, strServer is empty.
>
> Specifically I do
> response.write strServer &"test"
> response.end
>
> and get:
>
> test
>
>
> Also, it should be noted that although I show a space just before the
> opening parenthesis, there's actually no space in my code. Just a typo>
>
> "Aaron" <a@1.net> wrote in message
> news:OfRx
Ray at Guest
-
Aaron Bertrand - MVP #5
Re: server variables question
> Dim asdf4uaiskjdyf74
WT_? Do you always make your variable names this cryptic, or only on
Thursdays? :-P
Aaron Bertrand - MVP Guest



Reply With Quote

