×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Unless the PC is also running the PHP server, you can't do this.
-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Larry
Kleinman
Sent: Thursday, December 04, 2014 2:11 PM
To: web400@xxxxxxxxxxxx
Subject: [WEB400] trying to use EXEC with Zend
I want my PHP script to run a DOS command on the PC whose browser opened
the script, It looks like EXEC should do this, but no matter what
command I use - including easy stuff like DIR or IPCONFIG - I get a
"file
not found" message. For example, if the script contains
$test= exec('dir 2>&1', $output);
echo $test;
echo '<BR>';
var_dump($output);
I get
sh: dir: not found.
array(1) { [0]=> string(20) "sh: dir: not found." }
Any ideas?
Larry Kleinman
Kleinman Associates, Inc.
212-949-6469
--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing
list To post a message email: WEB400@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.
Kevin Bucknum
Senior Programmer Analyst
MEDDATA/MEDTRON
Tel: 985-893-2550
As an Amazon Associate we earn from qualifying purchases.