php - file uploads script problems -


I'm having trouble with my file upload script. This function is (jp_upload_pic ()) I'm having problems especially The move_uploaded () function, the second parameter "Destination" is my value ("../usr/ceo/JPCEO_20"), but this error is telling me.

WARNING: move_uploaded_file ( ../ usr/ ceo/JPCEO_20): failed to open the stream: line / 11/11 / warning: move_uploaded_file () on / var / www / There is no such file or directory in the jobinpal / includes / func.php: '/ tmp / phpgf1k7y' to 'on the

  function  ../ usr / ceo / JPCEO_20 '/var/www/jobinpal/includes/func.php at jp_upload_pic () {if (isset ($ _GET [' Upload '])) {$ jp_img = $ _ files [' file_to_be_uploaded ']; // File Uploader for JOBINPL ... $ jp_img_name = $ jp_img ['name']; // file name $ jp_img_type = $ jp_img ['type']; $ Jp_img_size = $ jp_img ['size']; $ jp_img_tmp_name = $ jp_img ['tmp_name']; // $ _ files ['userfile'] ['tmp_name'] $ jp_img_err = $ jp_img ['error']; // File Error ... // Check if image post issat before work ... if the file to receive (isset ($ jp_img)) {// .xx extension $ jp_img_name_len = strlen ($ jp_img_name) Let's name a string; $ jp_img_ext = substr ($ jp_img_name, -4, $ jp_img_name_len); // Check image image type jp_img_size; If (/ * file can be any more bounces * / (($ jp_img_ext == '.jpg') || ($ jp_img_ext == '.png') of this format) || $ ($ jp_img_ext == ' .gif ')) & amp; Amp; ($ jp_img_size & lt; 10240)) {// Call the session file to get the current user ("JOBINP_SCSI.PHP"); $ Jp_usr_verified_ses = $ _ session ['jp_new_usr']; // Use the user session to create a folder in the URL / CEO 'folder. *************************************************************************************************** *********** JPCEO_ID_FILEID // Write a function to output from database ... // user CEO, staff, student account // function jp_check_usr_acc () // {$ jp_usr_verified_ses = $ _ The session is ['jp_new_usr']; // ***** ----------------------------- ****** // ----- ---------------------------------- // // ***** ----- - Include ---------------------- ****** // ('JOBINPAL_DB_config.fp'); $ Jp_run = $ jobinpal_db_lite-> Query ("SELECT account_type, id to jp_user 'where email =' $ jp_usr_verified_ses'"); // $ jp_aff_rows = $ jobinpal_db_lite-> affected_rows; While ($ jp_result = $ jp_run- & gt; fet_are (MYSQLI_BOTH)) {$ jp_results [] = $ jp_result; } foreach ($ jp_results $ as jp_result) {$ jp_res = $ jp_result ['account_type']; $ Jp_res = strtoupper ($ jp_res); $ Jp_res2 = $ jp_result ['id']; } rmdir ('../ usr / ceo / JPCEO_20'); If (! ISID ("../USR / CEO /" "JP". $ Jp_res. "_". $ Jp_res2)) {MKDIR ("../Urr/CoO/JP" .JP_res "_" $ Jp_res2, 0700); . $ JP_new_usr_dir = "../ usr / CEO /" "JP" $ jp_res "_" $ jp_res2 ... $ JP_new_usr_dir = "jp" $ jp_res "_" $ jp_res2 ... // Please have problems with file uploading Please help me get this stackoverflow // ... (?) Move_uploaded_file ($ jp_img_tmp_name, "` ../ usr/ ceo/".$ JP_new_usr_dir); } //$path=/*"http://".$domain.*/".."."/"."jobinpal"."/"."usr"."/"."ceo "." /".$JP_new_usr_dir; //move_uploaded_file($jp_img_tmp_name,'../usr/ceo '); //} // jp_check_usr_acc (); // Move the uploaded file to the directory created for the user ... // move_uploaded_file ($ jp_img_tmp_name, $ JP_new_usr_dir); } And {if (/ * file should be in any of this format then bounce * /! ($ Jp_img_ext == '.jpg') || ($ jp_img_ext == '.png') || ($ jp_img_ext == 'GIF')) (echo "and lt; h6 id = 'img_upload_ar' 'gt; image this extension (.jpg), (.png), (.gif) and lt; h6 & gt;"; return false; }}}}}}    

It looks like a typo:

  move_uploaded_file ($ jp_img_tmp_name, "` ../ usr / CEO /".$ JP_new_usr_dir); ^ Should it be here?   

You also see the backcat in your error message but not in the directory that you created and checked.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -