i want to know about uploading files

January 23, 2010 at 01:54:28
Specs: Windows XP
i am uploading multiple files .now i want to save file dynamically in at anywhere in php.plz let me know the solution of this question..

See More: i want to know about uploading files

Report •

January 23, 2010 at 11:11:07
Please supply some more details.

Is this question related to Microsoft Office or Web Development or what?

Report •

January 24, 2010 at 20:58:48
This is web based question..i am uploading multiple files by using array in php by using system programing .now i want to save file dynamically at anywhere in computer.how do i save uploaded files dynamically..

Report •

January 26, 2010 at 13:42:18
I *think* you have to upload them into a specific path that the webserver is setup to recognize. If I understand what you wish to do correctly, then you'd need full access to the computer running the run webserver. If that's the case, then something like below *may* work.

Note: this may also be platform specific.

   $target = "c:\\";

   foreach(glob('*.php') as $source) {

      $cmd = sprintf("copy %s %s", $source, $target);
      echo $cmd . " return status: " . (system($cmd) != false ? "ok" : "failure") . "<br />";

The paths to the source file should be whatever path is used to upload the files in through the server. If it works, just replace the copy command with the move command or its system equivalent.

If you don't have full access to the computer, then the best you can probably do is move them somewhere within the space allotted to you by the wed hosting company.

$path_of_upload = $upload_path . basename($_FILES["form_name_used"]["name"]);

move_uploaded_file($_FILES['form_name_used']['temp_name'], $path_of_upload)) ;


Report •
Related Solutions

Ask Question