first commit
This commit is contained in:
+31
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
ini_set("display_errors","1");
|
||||
//ini_set('error_reporting', 'E_ALL'); //wrong way to open error_reporting
|
||||
//ini_set("error_reporting","32759"); //Right way to set error_reporting
|
||||
$mysqli = new mysqli('localhost','root','nancysimon','myquant');
|
||||
include_once __DIR__ . "/inc/excelOperate.inc.php";
|
||||
include_once __DIR__ . "/inc/tradeRec.inc.php";
|
||||
|
||||
$file = $_REQUEST['fpath'];
|
||||
$company = $_REQUEST['up_vendor'];
|
||||
$msg = array();
|
||||
/*
|
||||
echo json_encode(array(
|
||||
"status" => "2",
|
||||
"fpath"=> $file,
|
||||
'company'=> $_REQUEST['up_vendor'],
|
||||
"msg" => "upload sucessful!",
|
||||
));
|
||||
*/
|
||||
$data = readMyExcel($file);
|
||||
$msg[] = addslashes("Finished excel read! <br />");
|
||||
$msg_op = dbOp($data, $company);
|
||||
if($msg_op == false) exit(); //if return false, function dbOp() will echo massage to ajax
|
||||
$msg = array_merge($msg,$msg_op);
|
||||
echo json_encode(array(
|
||||
"status" => "1",
|
||||
"fpath"=> $file,
|
||||
'company'=> $_REQUEST['up_vendor'],
|
||||
"msg" => $msg,
|
||||
));
|
||||
?>
|
||||
Reference in New Issue
Block a user