DMeerholz Posted June 28, 2007 Share Posted June 28, 2007 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? Quote Link to comment Share on other sites More sharing options...
DMeerholz Posted June 28, 2007 Author Share Posted June 28, 2007 Damn that was stupid, instead of echo shell_exec($a); $x = shell_exec($a); and then i just print the stuff in my program. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.