|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi there,
I have a little problem. I'm trying to call a schemeinterpreter (chez scheme 'petite') with PassThru-function in PHP3. It works, I can even see the Output on the browser but then I've tried to execute some commands f.e.: (load "file.ss") it seems to work (the return variable of the command is [0]) but I can't see output of this on the browser. I've tried with system() and exec() but still nothing. some code: $cmd="/var/local/bin/petite"; passthru($cmd, $ret_var); echo $ret_var; Output: Petite Chez Scheme Version 6.0a Copyright <c> 1998 Cadence Research Systems> 0 and then: $code="(define ... an so on)"; passthru($code, ret_var); echo $ret_var; as output comes only: 0 Maybe anyone of you knows what should I do? PERL - advice wouldn't be bad too. Magda |
|
#2
|
|||
|
|||
|
As far as I know, passthru() only accepts filepaths and URLs and all it does is suck the input in one end and spit it out the other...
Your example is a little vague- perhaps you could post something a little more substantial and I could tell you what to use in place of passthru... if you're trying to execute PHP code from a string, try eval(). Jake ------------------ icongarden.com Making good ideas grow |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > PHP Development > PassThru() and the schemeinterpreter |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|