How to convert txt file data to sqlite data
100 of the data calling interfaces of express delivery are used to develop the express delivery query function of the public platform.
- $ Kuaidi_data = file_get_contents ("kuaidiinfo.txt ");
- $ Sp = explode ("\ n", $ kuaidi_data );
- // Var_dump ($ sp );
- $ Conut = count ($ sp );
- Echo "". $ conut ."
";
- // $ Code = array ();
- // $ Company = array ();
- $ Dbname = "data. dat ";
- $ Dbh = new PDO ("sqlite:". $ dbname );
- $ Create_ SQL = "CREATE TABLE kuaidi (
- Id integer primary key,
- Code VARCHAR (20) not null,
- Company TEXT NOT NULL
- )";
- $ Dbh-> exec ($ create_ SQL );
- For ($ I = 0; $ I <$ conut; $ I ++ ){
- $ Kdinfo = explode ("", $ sp [$ I]);
- $ Code = $ kdinfo [0];
- $ Company = $ kdinfo [1];
- // $ Inserte_ SQL = "INSERT INTO kuaidi VALUES ('', '". $ code."', '". $ company ."')";
- $ Inserte_ SQL = "INSERT INTO kuaidi ('code', 'Company') VALUES ('". $ code. "','". strtoupper ($ company ). "')";
- // $ Inserte_ SQL = "INSERT INTO kuaidi VALUES ('', "fdsfds", "fdsfdsf ")";
- Echo $ inserte_ SQL ."
";
- $ Dbh-> exec ($ inserte_ SQL );
- }
-
- Aae Global Delivery
- Anjie Express
- Anxindakuaixi ainta Express
- Biaojikuaidi Express
- Bht
- Baifudongfang Baifu Oriental International Logistics
- Coe China Orient (COE)
- Changyuwuliu Changyu logistics
- Datianwuliu Datian logistics
- Debangwuliu Debang Logistics
- Dhl
- Dpex
- Dsukuaidi d Express
- Disifang
- EMS Express
- Fedex (foreign)
- Feikangda
- Fenghuangkuaidi Phoenix Express
- Feikuaida
- Guotongkuaidi Express
- Ganzhongnengda Hong Kong Zhongda logistics
- Guangdongyouzhengwuliu Guangdong mail logistics
- Gongsuda
- Huitongkuaidi Express
- Hengluwuliu Henglu logistics
- Huaxialongwuliu Hua Xialong logistics
- Haihongwangsong Haihong
- Haiwaihuanqiu overseas
- Jiayiwuliu Jiayi logistics
- Jinguangsudikuaijian Jingguang Express
- Jixianda
- Jjwl Jiaji logistics
- Jymwl plus US Logistics
- Jindawuliu logistics
- Jialidatong Kerry Chase
- Jykd Express
- Kuaijiesudi Express
- Lianb FedEx (China)
- Lianhaowuliu lianhaotong logistics
- Longbanwuliu Longbang logistics
- Lijisong send now
- Lejiedi lejidi
- Minghangkuaidi Express
- Meiguokuaidi US Express
- Menduimen door-to-door
- Ocs
- Peisihuoyunkuaidi
- Quanchenkuaidi all morning express
- Quanfengkuaidi Express
- Quanjitong Global Logistics
- Quanritongkuaidi all-day Express
- Quanyikuaidi all-one Express
- Rufengda
- Santaisudi three-state express delivery
- Shenghuiwuliu Sheng Hui logistics
- Shentong
- Shunfeng SF
- Sue speed logistics
- Shengfeng logistics
- Saiaodi Saio delivery
- Tiandihuayu
- Tiantian daily express delivery
- Tnt
- Ups
- Wanjiawuliu Wanjia logistics
- Wenjiesudi Wenjie Air Express
- Wuyuan
- Wxwl Vientiane logistics
- Xinbangwuliu Xinbang logistics
- Xinfengwuliu Xinfeng logistics
- Yafengsudi AirAsia Express
- Yibangwuliu Yibang Express
- Youshuwuliu
- Youzhengguonei zip package registered letter
- Youzhengguoji Post international parcel registered letter
- Yuanchengwuliu Yuancheng logistics
- Yuantong G yuantong Express
- Yuanweifeng source Weifeng Express
- Yuanzhijiecheng Express
- Yunda Express
- Yuntongkuaidi Express
- Yuefengwuliu Yuefeng logistics
- Yad source security
- Yinjiesudi Yinjie Express
- Zhaijisong home delivery
- Zhongtiekuaiyun China Railway Express
- Zhongtong Express
- Zhongyouwuliu China Mail Logistics
- Zhongxinda zhongcinda
- Zhimakaimen Zhima opens
|