Jump to content

[SOLVED] How to return values after shell_exec


DMeerholz

Recommended Posts

Hi,

 

I am just getting into PHP so be nice...

 

This is my situation, little bit hard to explain, but I will try.

Making a website that will be connected to my database. (UniVerse... if you heard of it...)

Instead of loggin into the DB each time they have a program that lets you execute a UniVerse program straight from Linux.

Like this...

  /usr/ibm/uv/bin/uvsh "TEST.WEB $PRNO"

TEST.WEB is my program and $PRNO has been submitted from the web.

 

This works fine, I do this

 

$PRNO = $_REQUEST['PRNO'];

$b = <<<EOT

cd /u2/myaccount ; /usr/ibm/uv/bin/uvsh "TEST.WEB $PRNO" 

EOT;

echo shell_exec($b);

?>

 

I can do whatever and send it back to the client no problem,

 

BUT...

 

I want to make it a little more intelligent. And to do this i need to be able to return variables to PHP and then do conditional stuff based on that. I know a subroutine is meant for this, but you cant call a subroutine straight from the command line like that. I guess you need to know a bit about UniVerse to understand completely, but maybe not...

 

Any ideas?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.