my win7_x86 system.
I tried system.popen("c:\php\php.exe c:\sbbs\myscript.php " + someargs); which returns nothing
Re: run external php script
By: Mortifis to All on Sat Feb 09 2019 15:57:26
my win7_x86 system.
If I were doing a lot of this, I'd probably make a function that:
- Takes the command-line to execute as an argument
- Generates a random tempfile name
- Runs the command and tacks on the redirect to the temp file
- Reads the temp file contents
- Deletes the temp file
- Returns the temp file contents
And then I'd probably still feel a bit gross.
I am trying to get a php script to run externally from an sbbs.ssjs script, I have this working on my Linux system but am having problems on my win7_x86 system.
I tried system.popen("c:\php\php.exe c:\sbbs\myscript.php " + someargs); which returns nothing
so I tried system.exec("c:\php\php.exe c:\sbbs\myscript.php " + someargs); which returns 1
So, my question is, how do I trap the result under windows, it is handled automagically under Linux
look at the tickit sources in the addfiles section and you'll
see what i came up with that worked great and was left in
tickit if anyone needed the facility later for
troubleshooting...
I did, thank you, knew how to redirect to files and read them,
seems a long way around that mr gates imposed upon us :-Þ
hopefully some future verion of winbloz has a
comparable > /dev/null 2>&1 function or whatever ...
I only bothered with all this cuz I broke a G string on my
acoustic and got bored LOL
I only bothered with all this cuz I broke a G string on my
acoustic and got bored LOL
i think i'd rather play with the G string as long as the female that owns it is close by and willing to play a "round or two" O:) -=B-)
Sysop: | Nelgin |
---|---|
Location: | Plano, TX |
Users: | 513 |
Nodes: | 10 (1 / 9) |
Uptime: | 13:26:58 |
Calls: | 8,287 |
Files: | 15,519 |
Messages: | 928,526 |