I have some files in PHP, I have to add based on the checkbox selection. If a check box is selected then the requirement and so on. I have to use the system call, and I am working in php and ssh (secure shell client)
< Div class = "post-text" itemprop =
& lt ;? Php $ files = array (like 'file1.txt', 'file2.txt', 'text' '> find files in an array, file3.txt'); ? & Gt; & Lt; Form action = "action.php" method = "post" & gt; & Lt ;? Php foreach ($ c => $ files as $ files) {? & Gt; & Lt; Input type = "checkbox" name = "files [ & Lt; / Form & gt;
You PHP
& lt ;? Checkboxed with php // can check. I have made a perception outfile, in the same path as the source path is $ path = '/ var / www / whatever / for files /'; $ Dest_file = $ path 'Out.txt'; // Create empty file if passshtru is not present ("touch $ dest_file;"); Forex currency ($ _POST ['files'] as the $ key) {$ source_file = $ path $ files [$ key]; Using the Shell Redirect Passra ("cat $ source_file>> $ dest_file;") // contact; }
by entering the actual path for the binaries you want, with whatever file you want, with thetouch
and/ Code>, depending on your system config. I am curious to know where the need to do this with the system call, the thias file is large?
Comments
Post a Comment