我试图做一个“搜索更新页面”用PHP与此代码:错误。如果用file_get_contents()函数
<?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语句去阅读它作为假,印刷“Existe um novo update!新星建造ébuild001” 我已经试过每一个! 感谢您的帮助!
您是否尝试使用var_dump($ update)来查看您必须匹配的内容? – wmk