Jump to content

File upload problem


LuciBKen

Recommended Posts

Can someone that knows something about uploading files from a form please lookk at this code and tell me why it will not upload to the right directory?

 

When I make minor changes, it will upload, but to the wrong directory, as it is coded now, it simply won't upload at all.

 

My directory for the upload permissions are 777.

 

Can anyone help?

 

function RecursiveMkdir($path)
{
   if (!file_exists($path)) 
   { 
      RecursiveMkdir(dirname($path));
      mkdir($path, 0777);
    }
  }

$uploadFile =  $file_Name ;
if (!is_dir(dirname($uploadFile)))
  {
    RecursiveMkdir(dirname($uploadFile));
  }

move_uploaded_file( $file_Temp , $uploadFile);

$file_URL = "http://www.hawaiisoccermag.com/html/video/".$file_Name ;

$uploadFile =  $file2_Name ;
if (!is_dir(dirname($uploadFile)))
  {
    RecursiveMkdir(dirname($uploadFile));
  }

move_uploaded_file( $file2_Temp , $uploadFile);

$file2_URL = "http://www.hawaiisoccermag.com/html/video/thumb/".$file2_Name ;

 

Thanks ahead of time guys!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.