以下是我在我的在线服务器上上传文件的风险。当我在本地服务器上使用它然后它工作正常但当我在在线服务器上使用它然后它不起作用并且在上传100%文件后给出然后通知文件没有被移动。该文件夹的权限也被设置为'777',请告诉我如何解决此问题。只有当文件大小超过5mb
时才会发生if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$folder = "pak/".$_FILES['filename']['name'];
if (move_uploaded_file($_FILES['filename']['tmp_name'], $folder)) {
$insertSQL = sprintf("INSERT INTO sectiona (`Date`, Subject, Title, Link) VALUES (%s, %s, %s, %s)",
GetSQLValueString($_POST['Date'], "text"),
GetSQLValueString($_POST['Subject'], "text"),
GetSQLValueString($_POST['Title'], "text"),
GetSQLValueString($folder, "text"));
mysql_select_db($database_hammad, $hammad);
$Result1 = mysql_query($insertSQL, $hammad) or die(mysql_error());
Echo "File uploaded";
} else {
Echo "file not moved to destination folder. Check permissions";
};
$insertGoTo = "uploaded.php";
header(sprintf("Location: %s", $insertGoTo));
}