好的,这是我上传文件的脚本
$target = "cloud/";
$target = $target . basename( $_FILES['uploaded']['name']) ;
$ok=1;
if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
{
echo "The file ". basename( $_FILES['uploaded']['name']). " has been uploaded";
mysql_query("INSERT INTO data (`id`,`title`,`url`,`display`) VALUES ('NULL','". basename( $_FILES['uploaded']['name']). "','http://test.info/". basename( $_FILES['uploaded']['name']). "','1');");
}
else {
echo "error";
}
我应该添加什么以仅允许 .html .php .cpp 等扩展名?