Reply to Re: [PHP] Execute shell script from PHP

Your name:

Reply:


Posted by Tom on 01/18/05 12:59

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');
> ?>
>
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');

On some systems you have to execute the script
eg
$myReturn = shell_exec('. /test/acct.sh');

Also make sure that the acct.sh script is executable by the php user
(chmod / chown are your evil friends :) )
Tom

[Back to original 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

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