Re: Execute Linux commands from controller
Thanks Andrel & Skimmas. This worked for the basic commands.. Any idea
how to execute server login commands such as ssh & scp?
Regards,
Arjun Urs
On Sep 20, 3:53 pm, Andrei Mita <andrei.m...@gmail.com> wrote:
> I don't know if CakePHP has something special in place for executing
> commands but exec and passthru will definitely work:http://www.php.net/manual/en/ref.exec.php
>
> On Mon, Sep 20, 2010 at 1:10 PM, Urs <ajnur...@gmail.com> wrote:
> > Hi..
>
> > How can we execute linux commands from the controller?
>
> > like:
> > Example1: cat file1.txt
> > Example2: ifconfig | grep eth | awk {'print $1'}
>
> > Plz help..
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscribe@googlegroups.com<cake-php%2Bunsubscribe@googlegroups.com>For more options, visit this group at
> >http://groups.google.com/group/cake-php?hl=en
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home