★ wanayoo — archive 1999 http://www.devshed.com/Talk/Forums/Forum5/HTML/000091.htmlNouvelle recherche | Portail wanayoo
DevShed Menu
* DevShed Home
* Developer News
* DevShed Brain Dump




UBBFriend: Email This Page to Someone!
  DevShed Discussion Forums
  PHP
  PassThru() and the schemeinterpreter

Post New Topic  Post A Reply
profile | register | preferences | faq | search

next newest topic | next oldest topic
Author Topic:   PassThru() and the schemeinterpreter
Magda
Junior Member
posted July 27, 1999 08:59 AM     Click Here to See the Profile for Magda   Click Here to Email Magda     Edit/Delete Message Reply w/Quote
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

Jake @ Icongarden
Junior Member
posted August 09, 1999 03:11 PM     Click Here to See the Profile for Jake @ Icongarden     Edit/Delete Message Reply w/Quote
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

All times are MST (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | DevShed.com

Copyright © 1997-2000 ngenuity. All rights reserved.

Powered by: Ultimate Bulletin Board, Version 5.41a
© Infopop Corporation (formerly Madrona Park, Inc.), 1998 - 1999.