In windows, jquery + ajax + PHP files are uploaded down. in linux, problems occur.
Source: Internet
Author: User
Upload jquery + ajax + PHP files in windows, and upload files in linux ..... upload jquery + ajax + php files in windows & nbsp; linux + nginx + php + mysql & nbsp; problems ..... & nbsp; & jquery + ajax + PHP file upload in windows, problems in linux .....
In windows, jquery + ajax + php files are uploaded. linux + nginx + php + mysql has a problem ..... after a file path is selected, the js detection suffix will not pop up. once submitted, nothing will be accepted .... written under wnmp. Jquery windows ajax linux nginx
------ Solution --------------------
You provided too little information.
------ Solution --------------------
Based on my years of experience, it should be a JS issue.
Are the browsers on your two platforms consistent? are the browsers the same.
Var f_content = form. fileToUpload. value;
Can form be used directly? I feel this kind of simple writing problem
Then let's see if it's a JS issue or a PHP issue ..
Cancel JS to determine if the upload is successful. ajax trigger alert (1) return alert (2) after successful ajax execution)
------ Solution --------------------
Separate tests to solve the problem
------ Solution --------------------
It may be case sensitive.
------ Solution --------------------
Complete the test separately:
1. determine whether js has obtained the form object successfully;
2. judge the feedback of the submitted results. for example, if the form does not submit a file and only POST data, it judges the output of the PHP backend POST global array;
3. Use the form submission after removing JS to check whether it is successful;
4. use the file uploaded after removing JS to check whether the file is successfully uploaded. (make sure that the corresponding directory on the linux server has the write permission)
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