Hi guys, i hope you can help me. Im having trouble uploading a .CSV file that is 25MB in file size. I already set the ff. fo php.ini max_execution_time = 3600 max_input_time = 3600 memory_limit = 100M upload_max_filesize = 200M post_max_size = 400M i can get the value of the $_FILES['form_data']['name'] but i cant echo $_FILES['form_data']['tmp_name'] Note: my form also has a enctype="multipart/form-data" name="form1" Do you think guys there is an issue with .CSV files or i miss something Thanks, mike
Find out from your host - some hosts even though you have your ini edited don't allow that. Unless ofcourse you are on your own production machine
thanks for the help datropics. Well already solved it and the error is in the form, its really kind of akward but i just fix the proper html tag. tnx again, mike
Guys, please help me , im having trouble with my .CSV file. My goal is to be able to display it per row. Now if the parser reach column G, the display is destroy, what i mean is that the next row display an error. Here's the sample .CSV file http://www.michaelgalon.com/test/ here is my code: $file_data=addslashes(fread(fopen($file, "r"), filesize($file))); $oneField = strtok($file_data, ","); $i=0; while($oneField){ $i++; $name1=$oneField; $oneField=strtok(","); $address1=$oneField; $oneField=strtok(","); $zip=$oneField; $oneField=strtok(","); $city=$oneField; $oneField=strtok(","); $company_reg_id=$oneField; $oneField=strtok(","); $court_location=$oneField; $oneField=strtok(","); $fg_data=$oneField; $oneField=strtok("\n"); $payment_date=$oneField; } Thanks a lot guys...mike
ok guys, i already figure out why, coz column G contains a comma that is why when i parse my .CSV occurs error when displaying the record per row. Any alternative so i can read and display this file row by row http://www.michaelgalon.com/test Thanks again, mike
BTW Mike, you can use this in future if you get timeout errors: set_time_limit(0); // for unlimited execution time http://in.php.net/set_time_limit
hi, thanks, but what i did was a adjust some php directives (php.ini) so that my page will not timeout... Maybe you have an idea on how i can ignore the comma in ColumnG so i can move to Column H though in reality .CSV is comma delimeted... thanks again, mike
Hi Guys, i already figured it out, when .xls is converted to .csv, all column is delimited comma, in addition (this is what i missed) all column wit a comma will be automatically enclosed by a double qoute, example below .xls Column A Column B 1 mike php 2 mik php, foxpro 3 me visual basic when converted to .csv mike, php, mik, "php, foxpro", me, visual basic second there is already a function that reads this kind of file, so insted of using explode() using comma, use fgetcsv. Just check the php.net for this... Thanks again, mike