PHP MD5 File Name
<p>I have an upload script, and to fix the upload for several things, I want to md5 encrypt the files name. Here is the top of the php script I am using.</p>

<blockquote>
  <p><code>$target_dir = "file_dir/";
  $target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);
  $uploadOk = 1;
  $imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);</code></p>
</blockquote>

<p>I attempted to use the md5() method like this </p>

<blockquote>
  <p><code>md5($target_dir . basename($_FILES["fileToUpload"]["name"]));</code></p>
</blockquote>

<p>which did not work. Just came back as an error.
If you guys need more code in this script to help me, please tell me in the comments and i'll make a dummy copy of my script. Thank's in advance :D</p>