Warptweet Posted October 13, 2007 Share Posted October 13, 2007 I've been trying to make an upload without forms, and simply specify the location of the file to be uploaded on my computer in a variable. <?php $uploaddir = "uploads/"; $maxfilesize = 104857600; $filename = $_FILES['file']['name']; $filenameses = $_FILES['file']['name']; $filesize = $_FILES['file']['size']; $filetmpname = $_FILES['file']['tmp_name']; ?> This is part of my uploader code, and I need to "mimic" these so I can upload a specified file, instead of selecting a file from a file upload form. how can I do this? I tried making $filename = $eleven and other things, but they never work. Thanks, -Warptweet Link to comment https://forums.phpfreaks.com/topic/73114-upload-without-forms/ Share on other sites More sharing options...
marcus Posted October 13, 2007 Share Posted October 13, 2007 Try using rename if you're just trying to move the file. Link to comment https://forums.phpfreaks.com/topic/73114-upload-without-forms/#findComment-368719 Share on other sites More sharing options...
Warptweet Posted October 13, 2007 Author Share Posted October 13, 2007 I guess I should narrow down the code to a specific part that actually matters, I edited the topic post. Sorry, and thanks for trying. Link to comment https://forums.phpfreaks.com/topic/73114-upload-without-forms/#findComment-368720 Share on other sites More sharing options...
mattal999 Posted October 13, 2007 Share Posted October 13, 2007 $filename = 'your file location, e.g. C:\files\lol.txt'; try that Link to comment https://forums.phpfreaks.com/topic/73114-upload-without-forms/#findComment-368734 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.