You are here: Re: [PHP] Execute shell script from PHP « PHP « IT news, forums, messages
Re: [PHP] Execute shell script from PHP

Posted by Jason Wong on 01/18/05 18:48

On Tuesday 18 January 2005 18:59, Tom wrote:

> Khan wrote:
> > Tom wrote:
> >> shell_exec()
> >
> > yes, I have try that but nothing happenes. here is my code. Is this
> > correct?
> >
> > <?php
> > shell_exec('/test/acct.sh');
> > ?>

Note that shell_exec() expects a filesystem path and not your webserver's
document root.

> looks fine to me, except that I tend to run a check to make sure that it
> has run ok, like
> $myReturn = shell_exec('/test/acct.sh');
> or
> if (shell_exec('/test/acct.sh');

Note also that if command executes correctly without error then 0 is returned
and non-zero in case of errors.

--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
New Year Resolution: Ignore top posted posts

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация