require_once 'Excel/reader.php';
$data = new Spreadsheet_Excel_Reader();
$data->setUTFEncoder('iconv');
$data->setOutputEncoding('utf-8');
$data->read('Sample.xls');
error_reporting(E_ALL ^ E_NOTICE);
$mynull=NULL;
for ($i = 2; $i <= $data->sheets[0]['numRows']; $i++) {
$param=$data->sheets[0]['cells'][$i][5];
$query=$dbpdo->prepare("INSERT INTO table (field) VALUES(?)");
$sorgu->bindParam(1,$param,PDO::PARAM_STR);
$sorgu->execute();
}
I have 2 problems.
I am using this code for export fields from Excel to MySql. When i run this codes on local server it is working perfectly. But when I run it on web server it isn't get all data in Excel. For example, in Excel I have 5000 data but it is saving 1000 data to MySql.
When I want to UPDATE fields from another Excel file, it is working on local server but in the web server it isn't working.
A different problem is that, I am using $data->read('C:/Files/Sample.xls');
path in local server. How can i use this in web server?
I readed a lot of things about it but didn't find any solution. Can you help me?
'; }` code for error code but it isnt give me any error. – Hüseyin Çiftçi Feb 27 '18 at 20:22