When uploading files to the server in php, the project created by the server operating system for centos is based on the yii framework. one of the file upload functions is implemented using the xupload plug-in.
After a user uploads a file, the script creates a folder for the current Upload time in the root directory of the target server (OS: centos), for example, 2014_8_3_8_39, and then writes the file to it.
This code can be uploaded after being deployed on several servers. However, a problem occurs on the target testing machine: folders can be created, but the content is empty, that is, files are not uploaded.
The younger brother checked the httpd log and did not find any problems. In php. ini, it is useless to change the size of the uploaded file. However, in the same operating system of other machines, the same php version is okay.
So I think it may be a problem with the configuration of that machine. I am very grateful to anyone who doesn't know much about linux!
Reply to discussion (solution)
Upload a small file of several k to determine if it is not a php configuration problem.
Creating an upload folder in the root directory is an error.
This will inevitably lead to various permissions. Files cannot be accessed by the web.
The cause of the problem has been found, because the background programmer directly removed the file, so it is empty.