Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set *nix envirnment variable? Is it possible?

Status
Not open for further replies.

Microbe

Programmer
Oct 16, 2000
607
AU
Hey folks,

I can set an environment variable with PHP by doming something like

Code:
putenv("my_var=something") ;

Is there anyway to do the same thing with Javascript?

or an anternative?

Thanks in advance

Steve
- I have fun with telemarketers
 
Well - that depends where you want to set the variable. If you want to set it on the server, you MUST use server-side coding. If you want to set it on the client, you MUST use client-side coding.

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Tech Snippets & Info:
 
In that case you already know the answer
Use AJAX to call the PHP script & then set the variable using PHP.
 
Hi

Am I the only who not understand the reason of setting that environment variable ?
PHP manual said:
The environment variable will only exist for the duration of the current request. At the end of the request the environment is restored to its original state.
( See [tt]putenv()[/tt]. )

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top