私はこのコードでphpを使って「アップデートページの検索」を行おうとしていました:
<?php
$update = file_get_contents('https://raw.githubusercontent.com/esteves25566/gestordebiblioteca/master/updater');
if ($update == "build001"){
}else{
echo "<p style= \"color:red\">Existe um novo update! A nova build é a $update</p>";
}
?>
しかし、サイトの出力がbuild001の場合、if文はそれをfalseと読み、「Existe um novo update!anovabuildéabuild001」と出力します。私はすでにすべてを試しています。助けてくれてありがとう!!!
build001の最後に印刷できない文字があり、その外観からすると改行文字になります。
このテストを試してください
<?php
$update = file_get_contents('https://raw.githubusercontent.com/esteves25566/gestordebiblioteca/master/updater');
if ($update == "build001\n"){
echo 'gotit';
}else{
echo "<p style= \"color:red\">Existe um novo update! A nova build é a $update</p>";
}
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加