tags:

views:

26

answers:

1

I want to upload image out side site root directory using php? can any one tell me that how I give path of directory out side root for image upload ????

+1  A: 

did you try using move_uploaded_file

$upload_dir = '/out_directory/';
$upload_file = $upload_dir . basename($_FILES['filename']);
move_uploaded_file($_FILES['filename'], $upload_file); 

also look at this topic

http://stackoverflow.com/questions/748915/php-saving-files-with-php-to-different-root-directory

Haim Evgi
+1 the way to explain
Richa
@Richa : thanks, its my pleasure
Haim Evgi
@haim..welcome :) Happy coding!
Richa