| Server IP : 104.21.37.246 / Your IP : 172.71.28.145 [ Web Server : Apache System : Linux cpanel01wh.bkk1.cloud.z.com 2.6.32-954.3.5.lve1.4.59.el6.x86_64 #1 SMP Thu Dec 6 05:11:00 EST 2018 x86_64 User : cp648411 ( 1354) PHP Version : 7.2.34 Disable Function : NONE Domains : 0 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home2/cp648411/public_html/simded.com/include/ |
Upload File : |
<?php
function copydir($source,$destination)
{
if(!is_dir($destination))
{
$oldumask = umask(0);
mkdir($destination, 01777); // so you get the sticky bit set
umask($oldumask);
}
$dir_handle = @opendir($source) or die("Unable to open");
while ($file = readdir($dir_handle))
{
if($file!="." && $file!=".." && !is_dir("$source/$file")) //if it is file
copy("$source/$file","$destination/$file");
if($file!="." && $file!=".." && is_dir("$source/$file")) //if it is folder
copydir("$source/$file","$destination/$file");
}
closedir($dir_handle);
}
function Writefile($strFileName,$shop_id)
{
$objFopen = fopen($strFileName, 'w');
$strText1 = "<?php\r\n";
fwrite($objFopen, $strText1);
$strText2 = "$"."shop_id = '".$shop_id."';\r\n";
fwrite($objFopen, $strText2);
$strText3 = "?> \r\n";
fwrite($objFopen, $strText3);
if($objFopen)
{
$re = true;
}
else
{
$re = false;
}
fclose($objFopen);
return $re;
}
?>