0
我一个试图从URL的结果(图像),但有一些事情出错代码 我的代码是:无法显示合成图像(PHP代码)
<?php
if(isset($_POST['submit']))
{
$url= $_POST['url'];
$qrurl= 'http://www.qr-code-generator.com/phpqrcode/getCode.php?
cht=qr&chl='.$url.'&chs=180x180&choe=UTF-8&chld=L|0';
$result = file_get_contents("$qrurl");
echo $result;
}
else
{
echo"<form method='post' action='index.php' >
<input name='url' class='material' placeholder='Enter url...' type='url'autofocus/></br><br>
<input name='submit' id='submit' type='submit' value='submit'/></br><br>
</form>
";
}
?>
上面的代码中显示任何 但是当我在浏览器中打开url时,它显示qr码。
错误:“无法打开流:连接超时”和“无法修改标题信息” –
@SriCharan再次检查我的答案;我做了一些编辑。完全跟随他们。这是一个编码问题。 –
@SriCharan欢迎。 –