使用我的 php 代码时出现此错误
PHP 语法检查:解析错误:语法错误,第 7 行代码中出现意外的“}”
请帮助我,我不明白我在这里做错了什么 php 代码:
<?php
if ( $ready == "false" ) {
$rand = chr(rand(97, 122)). chr(rand(97, 122)). chr(rand(97, 122));
$folder = "uploads/".$rand
}
if ( !is_dir($folder) ) {
$ready = "true"
}
if ( is_dir($folder) ) {
$ready = "false"
}
if ( $ready == "true" ) {
$that = "yes"
mkdir("uploads/".$rand);
$to = "Uploads/".$_FILES["file"]["name"];
move_uploaded_file($_FILES["file"]["tmp_name"], $to);
echo "uploaded";
}
?>
<form method="post" enctype="multipart/form-data">
<label>Choose a file:</label>
<input type="hidden" name="upload" value="1">
<input type="file" name="file">
<input type="submit" value="upload" onclick="$other = "yes""/>
</form>