【发布时间】:2016-06-03 23:48:49
【问题描述】:
鉴于此 HTML:
<input type="text" class="form-control" name="link" rows="3" action="add2.php" method="post" placeholder="link here">
我想先对该 URL 进行编码,然后将其发送到 add2.php。
add2.php如下:
<?php
$url=$_GET["linki"];
include("../db.php");
$url=$_GET["linki"];
$html = file_get_contents("$url");
preg_match('/<meta property="og:image" content="(.*?)" \/>/', $html, $matches);
preg_match("/<title>(.*)<\/title>/i", $html, $title);
$pdo -> exec("INSERT INTO `postss`(`link`) VALUES ('$w')");
?>
当我尝试汇总 URL 时,服务器回复“fordinended 错误”。
【问题讨论】:
-
那肯定不是一个有效的文本输入。 (文本输入本身没有参数
action。它放在带有该参数和提交按钮的表单中) -
为什么?它的引导形式
-
是的,你是真的,我有 sumbot 按钮,但它不是问题/...