如何从php中的ashx读取以及如何在数据库中存储数据

时间:2018-07-05 14:56:14

标签: php

代码:

$options = array(
    'http' => array(
       'header'  => "Content-type: application/x-www-form-urlencoded\r\n",
       'method'  => 'POST',
       'content' => http_build_query($data)
     )
);
$context  = stream_context_create($options);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) {
    /* Handle error */
}

我想读取数据,然后将其导入数据库中。

所有行都是字符串,但是用\r\n隔开。

有什么想法吗?

0 个答案:

没有答案