View Single Post
Old 09-12-2008, 08:57 AM   #1 (permalink)
d4v1d
The Contributor
Good Samaritan 
 
d4v1d's Avatar
 
Join Date: Dec 2007
Location: Durban, South Africa
Posts: 51
Thanks: 1
d4v1d is on a distinguished road
Default HELP! File Upload

I'm about to rip all my hair out on this... Been struggling with it since last night, and still can't figure it out. Basically, doing a file upload through flash, which then calls a php file to handle moving it from the temp directory. Here's the basic code that handles that little bit:

PHP Code:
$uploadFile "/games/" $_SESSION['filename'] . '.swf';

if (
move_uploaded_file($_FILES['Filedata']['tmp_name'], $uploadFile)) {

Now here's my problem, it doesn't work. The filename variable is set from mktime() on a previous page. I have echoed it to this new page to check, and it is definitely set. And I have definitely called the session start function. All that works perfectly, yet no file on the server...

When i set a name manually, however, it works. Thus I don't understand why. It should work the way it is, shouldn't it?
d4v1d is offline  
Reply With Quote