Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Gábor Papp
Added: Sep 7, 2018 7:43 AM
Views: 1
Tags: no tags
  1. // mycopy($kepek[$i]['route_big'],$umezok['route_big']);
  2. function mycopy($s1,$s2) {
  3.     $s1=$_SERVER["DOCUMENT_ROOT"].$s1;
  4.     $s2=$_SERVER["DOCUMENT_ROOT"].$s2;
  5.     $path = pathinfo($s2);
  6.     if (!file_exists($path['dirname'])) {
  7.         mkdir($path['dirname'], 0777, true);
  8.     }  
  9.     if (copy($s1,$s2)) {
  10.         // echo "SIKER \n";
  11.     } else {
  12.         // echo "MASOLASI HIBA \n";
  13.     }
  14.     // print('<pre>');print_r($path);print('</pre>');
  15. }