corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » PHP Help


New Topic

New Poll
  Subscribe | Add to Favourites

You are not logged in and may not post or reply to messages. Please log in or create a new account or mail us about fixing an existing one - register@corsasport.co.uk

There are also many more features available when you are logged in such as private messages, buddy list, location services, post search and more.


Author PHP Help
VrsTurbo
Premium Member

Registered: 8th Jun 10
User status: Offline
11th Dec 10 at 12:49   View Garage View User's Profile U2U Member Reply With Quote

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
AndyKent
Member

Registered: 3rd Sep 05
User status: Offline
11th Dec 10 at 13:33   View User's Profile U2U Member Reply With Quote

copy_directory('./audit/','./audits/' . $_POST["dirName"]);

The '.' was missing to join the two items

[Edited on 11-12-2010 by AndyKent]

 
New Topic

New Poll

  Related Threads Author Forum Replies Views Last Post
Few Pics from the Pod (56K Warning) PaulW General Chat 12 1072
21st Feb 05 at 16:40
by Jambo
 
Dodgy HTML/PHP/Table problem liamC Geek Day 9 789
24th Jan 07 at 19:37
by liamC
 
phpbb index Tom J Geek Day 3 781
13th Feb 07 at 15:34
by Steve
 
PHP Template Help Laney Geek Day 14 869
17th Jul 07 at 19:26
by Ian
 

Corsa Sport » Message Board » Off Day » Geek Day » PHP Help 28 database queries in 0.0150261 seconds