title: move_uploaded_file does not work in WordPress (functions.php)
body: <p>I have a form made with Contact Form 7 and I need to save the attachment in a folder but move_uploaded_file() or copy doesn't work. Do you know how to solve this problem? Thanks!!</p>
  
  <pre><code>add_action('wpcf7_before_send_mail', 'save_form' );
  
  function save_form( $wpcf7 ) { 
  
  if (move_uploaded_file($_FILES["photo1"]["tmp_name"],$_FILES["photo1"]["name"]))
  { /*   CORRECT    */ } 
  else {  /*    ERROR   */ } }
  </code></pre>
  
  <p>Hope you can help me, I don't know how continue. In a php file this function works but in Wordpress it's impossible. Thanks very much!!!!</p>