Send Command Lines from PHP Interface Face?

This is a discussion on "Send Command Lines from PHP Interface Face?" within the PHP Forum section. This forum, and the thread "Send Command Lines from PHP Interface Face? are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Feb 1st, 2008, 13:50
Junior Member
Join Date: Feb 2008
Location: UK
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send Command Lines from PHP Interface Face?

Hi, could somebody please help me with this query please? I know you can use php cli, but can you send command lines from a php web interface?

Currently i can only edit values in a application from command line, i would like to design some sort of web interface to be able to do the exact thing.

If anyone can help, it would be much appreciated!!
Reply With Quote

  #2 (permalink)  
Old Feb 1st, 2008, 14:12
alexgeek's Avatar
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,770
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: Send Command Lines from PHP Interface Face?

Yes you can use the backtick operater.
e.g.
PHP: Select all

$list = `ls`; 

That should list the files in the current directory.
There also commands such as exec() and system() to use. Just google them
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #3 (permalink)  
Old Feb 1st, 2008, 16:15
Junior Member
Join Date: Feb 2008
Location: UK
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Send Command Lines from PHP Interface Face?

Cheers!!
Reply With Quote
  #4 (permalink)  
Old Feb 1st, 2008, 16:25
alexgeek's Avatar
Technical Administrator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,770
Blog Entries: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alexgeek
Re: Send Command Lines from PHP Interface Face?

Be sure to use the backtick ` not the inverted comma (or whatever you want to call this: ').
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Reply With Quote
  #5 (permalink)  
Old Feb 5th, 2008, 15:04
Junior Member
Join Date: Feb 2008
Location: UK
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Send Command Lines from PHP Interface Face?

On the same subject, im also trying to execute a batch file from the php page.

Ive got:

echo exec('load.bat');

after submission the page is doing something but nothing executes. The batch file loads fine when i click it manually!

any ideas please? thanks!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Asp to execute a command in a .exe file Andrew1986 Classic ASP 7 Jan 11th, 2008 09:44
Face lift frinkky Graphics and 3D 4 Jan 16th, 2007 15:32
Datagrid and update command Mitsuki ASP.NET Forum 0 May 16th, 2006 05:06
Image Slideshow with face sing2trees JavaScript Forum 2 Apr 24th, 2006 03:39
Need help with document.write command MojoP JavaScript Forum 0 Aug 15th, 2005 18:15


All times are GMT. The time now is 02:13.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43