Windows under jquery+ajax+php file upload, Linux, problem.

Source: Internet
Author: User
Tags php file upload
Windows jquery+ajax+php file Upload, linux+nginx+php+mysql problem ..... There is a choice of file path after the JS detection suffix does not pop up, after the submission can not accept anything .... Wnmp wrote.


Reply to discussion (solution)

You're giving too little information.

Windows jquery+ajax+php file Upload, linux+nginx+php+mysql problem ..... There is a choice of file path after the JS detection suffix does not pop up, after the submission can not accept anything .... Wnmp wrote.

Jquery
Windows
......

Html

 
     
 
  Importing programs
 
  
 
  
 
          

Importing programs



Php
 

Can you confirm that the JS code is executed?

Can you confirm that the JS code is executed?
Executes the JS method outside the alert can play just see there is a JS undefined to the size of the case is not found the problem

Judging by my years of experience ... It should be JS problem.
Your 2 platform browser is consistent. Whether the browser is the same.
var f_content = Form.fileToUpload.value;
The form can be used directly? I feel the problem of Jane writing

And then look at the JS problem or the PHP problem.
Cancel JS to determine the test can be uploaded successfully. AJAX trigger alert (1) Ajax execution successful return at alert (2)


Separate test to solve the problem

It's probably a matter of case.

To complete the test individually:
1, judge whether JS gets the form object is successful;
2, to determine the feedback of the results of the submission, such as the form does not submit files, only post data, to determine the PHP back end of the post global array output;
3, the use of the removal of JS after the form submitted to see if the success;
4, use to remove JS after the file upload, to see if the success; (Ensure that the corresponding directory on the Linux server has write permissions)

Judging by my years of experience ... It should be JS problem.
Your 2 platform browser is consistent. Whether the browser is the same.
var f_content = Form.fileToUpload.value;
The form can be used directly? I feel the problem of Jane writing

And then look at the JS problem or the PHP problem.
Cancel JS to determine the test can be uploaded successfully. ajax trigger at alert (1) Ajax execution successfully returns to alert (...).

This var f_content = Form.fileToUpload.value; Change the
Now also reported error is: uncaught syntaxerror:unexpected end of input
Chrome IE has ...

Resolved because the return JSON type will not return a specific error so JS change jquery after the value is no problem (win under the original is no problem), the last is because the operation of the non-establishment of the corresponding table inserted error. After the establishment of the table all normal, thank you ~ ~

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.