first commit

This commit is contained in:
yangshuimiao
2023-10-16 12:58:41 +08:00
commit 3a09f3ca67
1512 changed files with 570984 additions and 0 deletions
+31
View File
@@ -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,
));
?>