experience makes perfect
Since 2 days ago, I have a trouble in coding case upload csv file. I developed the fiture in order my client can upload csv file. I used xampp and Windows OS. I had tested my script in localhost, it run well. But when I upload the file to server, it can not run as well. So I asked to network administrator, why such a problem coming? And then, he examined my script, and the conclusion was because they are in different environment, the server uses Linux Fedora. The flow of my script is like this, I uploaded csv and get tmp file from the csv and I store it in folder tmp like I’ve set before. And then the tmp files, I opened and parsing the content and store to MySQL database. Well, it’s different in the server, the tmp file has no permission for user, so the tmp file can not be opened
. So, I have to change my technique in uploaded csv file, I change that the csv file can upload into a folder I made without tmp file like before, and opened the csv file, buat the method to parse manually, not using a fast method like before. But, finally it was done. So, I’ve realize that the same environment between developer environment and server are so important.
