Author |
Message |
wtd
|
Posted: Wed Sep 08, 2004 7:08 pm Post subject: (No subject) |
|
|
beard0 wrote: Oh wow! I didn't know of that nice little ">" command! That will do what I need at least temporarily. I can look into other methods to improve speed later. Thanks!
The ">" is just a bit of shell syntax which redirects standard output. Basically I'm saying, 'execute "php input.php" with standard output sent to the file "output.html".'
Using ">>" does the same thing, except appends to the file.
Both of these work more or less identically under *nix operating systems and Windows. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
beard0
|
Posted: Sun Sep 26, 2004 8:51 pm Post subject: (No subject) |
|
|
This is a bit of a stretch I know, but now I'm trying to pass variables from post & get methods that are sent from the browser to my server on to the php.exe. Any ideas on the correct format for doing so? (I did try doing "php.exe phpfile.php?var1=value > out.html" but that didn't work)
Any ideas would be very appreciated. |
|
|
|
|
|
rizzix
|
Posted: Thu Sep 30, 2004 2:27 pm Post subject: (No subject) |
|
|
ehmm i think for cgi applications it just reads the ENV variable..
but maybe its also possible to pass arguments.. if so it could be something like: for help=1 ... php.exe test.php help 1 > test.htm
but i'm not sure |
|
|
|
|
|
wtd
|
Posted: Thu Sep 30, 2004 2:37 pm Post subject: (No subject) |
|
|
rizzix wrote: ehmm i think for cgi applications it just reads the ENV variable..
It does, and this can be incredibly complex. |
|
|
|
|
|
beard0
|
Posted: Thu Sep 30, 2004 6:30 pm Post subject: (No subject) |
|
|
errr... just what is the ENV variable? When I get the information say from a POST satement in the form:
Client wrote: POST file.php HTTP/1.1
Header1: Val1
Header2: Val2
Header3: Val3
name=bob&lname=smith
is some part of that the ENV variable, or do I have to encode it to something else, being the ENV variable? |
|
|
|
|
|
wtd
|
Posted: Thu Sep 30, 2004 7:06 pm Post subject: (No subject) |
|
|
Environment variables define various bits of information about the computing environment you're in. They're available to any language with an API for accessing them, and include things like HOME and PATH. The former would be the absolute path to the user's home directory on the hard drive, and the latter is a list of all directories the system should automatically look in for executables.
If you create a program "foo.exe" and stick it in "C:\Stupid Programs", and "C:\Stupid Programs" is listed in PATH, then just typing "foo" at the command prompt will run the program without you having to explicitly tell the computer where to look for the actual executable. |
|
|
|
|
|
beard0
|
Posted: Fri Oct 01, 2004 11:53 am Post subject: (No subject) |
|
|
So what ENV variable would php be reading, and do you have any idea weather or not turing can set it? |
|
|
|
|
|
wtd
|
Posted: Fri Oct 01, 2004 1:13 pm Post subject: (No subject) |
|
|
Well, a few that come to mind from my Perl days:
CONTENT_LENGTH
REQUEST_METHOD
QUERY_STRING |
|
|
|
|
|
Sponsor Sponsor
|
|
|
rizzix
|
Posted: Fri Oct 01, 2004 7:20 pm Post subject: (No subject) |
|
|
yep well CGI is a standard.. i suggest you lookup those
oh and ur in luck.. turing has functions to access the ENVs..
code: | getenv ( symbol : string ) : string |
|
|
|
|
|
|
|