This is a discussion on "PHP system commands" within the PHP Forum section. This forum, and the thread "PHP system commands are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
PHP system commands
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
PHP system commands
Hi all!
I want to execute system commands through the functions provided by PHP (like exec, system etc) In the LINUX machine in my work, everything seems to be OK, when, for example, I write system `ls`; and I print it on the screen. In my home PC on the other hand, where I have winXP and the Cygwin platform installed, none of these works. 1) Is the Cygwin platform sufficient to run system commands or must I have LINUX machine? 2) Do I need to change anything in my php.ini file in order to 'activate' the system commands? Thanx! |
|
|
|
#2
|
|||
|
|||
|
I think on windows it calls cmd.exe by default for system commands, so it'll only process windows commands. You'll need to first have a system call to start cygwin and then run your linux commands.
|
|
#3
|
|||
|
|||
|
Thanx a lot for your time.
I tried `dir` and it worked, so you were right. |
![]() |
| Tags |
| php, system, commands |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| load commands | acrikey | Flash & Multimedia Forum | 11 | Aug 17th, 2007 08:13 |
| system commands | ktsirig | PHP Forum | 0 | Oct 12th, 2005 13:06 |