如何使用mysql从Php页面读取文本并将其插入到表格中,例如,我的页面包含
"Hello World“,我需要在表格"hello”中插入这段文本。
发布于 2012-02-08 02:01:56
如果你有活动标志"allow_url_fopen“(如果你想打开外部URL),你能使用file_get_contents吗?
<?php
// Connect to mysql...
//
$page = file_get_contents('http://www.example.com/');
mysql_query("INSERT INTO hello (page) VALUES ('$page');
?>https://stackoverflow.com/questions/9181174
复制相似问题