abdelelbouhy Posted August 7, 2010 Share Posted August 7, 2010 hello guysi'm trying to upload file then move it to the desktop the uploading is done i've checked the temprary file in windows but the file didn't move i think the problem is with the path name here is the code<?php if(is_uploaded_file($_FILES['toProcess']['tmp_name'])){ echo 'success'; } move_uploaded_file($_FILES['toProcess']['tmp_name'],"desktop"); ?> if someone help me and tell me some example of the path name like if i want to put in the desktop or in the root directorythanx Link to comment Share on other sites More sharing options...
real_illusions Posted August 7, 2010 Share Posted August 7, 2010 I have this in one site I've built, although I haven't included any of the checks you must be for file uploads. (such as checking the file is the right type and size and not something that can cause a few hiccups on the site). $file_name = $_FILES['uploadfile']['name'];$file_temp = $_FILES['uploadfile']['tmp_name'];$uploads_dir = 'movedfiles';move_uploaded_file($file_temp, "$uploads_dir/$file_name"); Link to comment Share on other sites More sharing options...
justsomeguy Posted August 7, 2010 Share Posted August 7, 2010 The path to the Windows desktop isn't "desktop", it's something like "C:\Documents and Settings\All Users\Desktop" or there are different paths for the desktop for each user. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.