How to execute linux commands through a php program? :-
1- I am taking a 'C' program as input in PHP program. I want execute it directly through PHP means linux commands 'gcc' should be executed directly through our php program and out put should be displayed on our php page.
2- Execution of linux Commands like VMSTAT in our php program. How to execute it through php program.
Please reply soon.
How to execute linux commands through a php program?
Moderator: General Moderators
-
lalitmishra
- Forum Newbie
- Posts: 5
- Joined: Sat Jun 07, 2008 12:39 am
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: How to execute linux commands through a php program?
//step in Evil mod
Why on Earth did you think it's ok to post this thread in 6 seperate forums. Unfortunately, your first and final warning
Moved to PHP-Code.
Why on Earth did you think it's ok to post this thread in 6 seperate forums. Unfortunately, your first and final warning
Moved to PHP-Code.
Re: How to execute linux commands through a php program?
Code: Select all
$output = `/path/cmd args`;
// or
$output = system('/path/cmd args');
// or
exec('/path/cmd args', $output);
// or
passthru('/path/cmd args');There are 10 types of people in this world, those who understand binary and those who don't