Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- masalah log nanti saja..yg ptg jalan
- */
- $dirSource =".";
- $files =scandir($dirSource);
- $info =array();
- foreach($files as $file){
- $target=$dirSource."/".$file;
- if(is_file($target)){
- echo "<br/>{$target} = file";
- $aList[]=array(
- 'target'=>$target,
- 'name'=>$file
- );
- }else{
- echo "<br>{$target} = not file";
- }
- }
- echo "<hr/>";
- $aDir=array("../log1","../log2");
- foreach($aList as $files){
- foreach($aDir as $dir){
- copy($files['target'], $dir."/".$files['name']);
- echo '<br/>copy :'.$files['name']." menuju {$dir}";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment