Getting data from Excel in web server


[php]require_once ‘Excel/reader.php’;
$data = new Spreadsheet_Excel_Reader();
error_reporting(E_ALL ^ E_NOTICE);
for ($i = 2; $i <= $data->sheets[0][‘numRows’]; $i++) {
$query=$dbpdo->prepare(“INSERT INTO table (field) VALUES(?)”);
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 o local server but in the web server it isn’t working. A different problem from this is 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?


For the path issue, you need the path of the file on the server.

For the other issue. It may be timing out, or the number of rows may be giving a different number, hard to tell.