[php] 讀 CSV 檔

if ( empty($_SERVER[“DOCUMENT_ROOT”]) ) $DOC_ROOT=”/m1/root”; else $DOC_ROOT=$_SERVER[“DOCUMENT_ROOT”]; include $DOC_ROOT.”/db.inc.php”; $filename=”test_data.dat”; $filename=”d_0416.dat”; $max_aline=1000; if ( !$__db_mysql=@mysql_connect($__config[‘host’],$__config[‘user’],$__config[‘pass’],FALSE, MYSQL_CLIENT_COMPRESS) ) { debug_log($process_log,”fail on connect db,0″); die(‘fail on connect db,0’); } mysql_select_db(‘demo’,$__db_mysql); mysql_query(“set names…Continue Reading …