how to handle comand prompt using php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bugthefixer
Forum Contributor
Posts: 118
Joined: Mon Mar 22, 2004 2:35 am

how to handle comand prompt using php

Post by bugthefixer »

how can i run any comand on comand prompt using php...
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

Post by kettle_drum »

You mean you want to be able to run commands like "ls" and "uptime" from a php script? Or are you trying to run a php script from the command line?

answer 1:
exec(); and system();

answer 2:
>php this/is/my/script.php
Post Reply