LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Execute Linux command with PHP (https://www.linuxquestions.org/questions/programming-9/execute-linux-command-with-php-558194/)

jpostma 06-01-2007 01:05 AM

Execute Linux command with PHP
 
Is it possible to execute a Linux command with PHP? For example 'cat file1.txt >> file2.txt'.

Johannes

slimm609 06-01-2007 01:38 AM

look up the system() command in php.


i think it would be

<?php
*/ use the full path /*
system(`cat /root/file1.txt >> /root/file2.txt', $retval);
printf "$retval"

?>

mssanchu 06-01-2007 01:48 AM

sure hope this shud help....

http://www.phpfreaks.com/phpmanual/p...tion.exec.html


try google for more related help links...


All times are GMT -5. The time now is 02:42 AM.