VrsTurbo
Premium Member
Registered: 8th Jun 10
User status: Offline
|
Hello, how do i get the $_POST to work in the second line?
It works on the Echo but not on the destination
<?php echo $_POST["dirName"];
copy_directory('./audit/','./audits/'$_POST["dirName"]);
function copy_directory( $source, $destination ) {
if ( is_dir( $source ) ) {
@mkdir( $destination );
$directory = dir( $source );
while ( FALSE !== ( $readdirectory = $directory->read() ) ) {
if ( $readdirectory == '.' || $readdirectory == '..' ) {
continue;
}
$PathDir = $source . '/' . $readdirectory;
if ( is_dir( $PathDir ) ) {
copy_directory( $PathDir, $destination . '/' . $readdirectory );
continue;
}
copy( $PathDir, $destination . '/' . $readdirectory );
}
$directory->close();
}else {
copy( $source, $destination );
}
}
?>
Thanks
|