当我运行它时,我总是得到:(什么是 wdl 形式)。
copy ("templates/colors/win.txt", "tips/$today/color.txt");
copy ("templates/text/win.txt", "tips/$today/wdl.txt");
这意味着最后一个命令,我的 php 代码上的if不起作用。编码:
<?php
echo ("Setting up colors...");
if($_GET["wdl"] == "D");
{
copy ("templates/colors/dr.txt", "tips/$today/color.txt");
copy ("templates/text/dr.txt", "tips/$today/wdl.txt");
}
if($_GET["wdl"] == "L");
{
copy ("templates/colors/lose.txt", "tips/$today/color.txt");
copy ("templates/text/lose.txt", "tips/$today/wdl.txt");
}
if($_GET["wdl"] == "W");
{
copy ("templates/colors/win.txt", "tips/$today/color.txt");
copy ("templates/text/win.txt", "tips/$today/wdl.txt");
}
?>
我该如何解决?
解决方案是删除:例如:;
从if($_GET["wdl"] == "W");