• Hi everyone!

    I have a form made with Contact Form 7 and It works perfect but now I need to save the attachments in a folder but move_uploaded_file() or copy() doesn’t work. Do you know how to solve this problem? Thanks!!

    add_action('wpcf7_before_send_mail', 'save_form' );
    
    function save_form( $wpcf7 ) 
       { 
         move_uploaded_file($_FILES["photo1"]["tmp_name"],$_FILES["photo1"]["name"]);
       }
    • This topic was modified 7 years, 5 months ago by huggotivi.
Viewing 1 replies (of 1 total)
  • Thread Starter huggotivi

    (@huggotivi)

    I think it’s a problem of privileges, because I tried out of wordpress and it works but I’d love to use Contact Form 7.

    Thanks!!

Viewing 1 replies (of 1 total)
  • The topic ‘move_uploaded_file does not work when I use it in functions.php’ is closed to new replies.