私はPHPコーディングが初めてで、新しい単純なスクリプトを書いていますが、このコードを配置すると空白のページが表示されます。このコードの何が問題なのか教えてもらえますか?
<?php
if($_POST) {
$host = $_POST['host'];
if (!function_exists("ssh2_connect")) die("function ssh2_connect doesn't exist");
if(!($con = ssh2_connect("127.0.0.1", "22")))
{
echo "fail: unable to establish connection";
}
else
{
if(!ssh2_auth_password($con, "root", "password"))
{
echo "fail: unable to authenticate ";
}
else
{
$stream = ssh2_exec($con, "".$host."");
stream_set_blocking($stream, true);
$item = "";
while ($input = fread($stream,4096)) {
$item .= $input;
}
echo $item;
}
}
?>
私の悪い日本語でごめんなさい