2
我有一个网站,使用核心的PHP来建立这个网站。在管理面板中,当我更新页面并在ckeditor文本编辑器中插入图像时。我收到错误。内容未更新。错误是:当我更新一个页面,我得到错误
Forbidden. You don't have permission to access /admin/ on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
现在我该怎么做。这里是我的代码:
if($_REQUEST['page'] == "ac" && isset($_REQUEST['update']) && $_REQUEST['edit'] == "yes")
{
$id= $_REQUEST['id'];
$activitySUB = $_POST['activitySUB'];
$activityDetels= mysql_escape_string(stripcslashes($_POST['activityDetels']));
$v = htmlentities($activityDetels);
$files = $_FILES['photo']['name'];
$delete = mysql_query("SELECT activityImages FROM activity WHERE activityID = '$id'");
$delet = mysql_fetch_array($delete);
$img = $delet['activityImages'];
if($files !="")
{
$delete = mysql_query("SELECT activityImages FROM activity WHERE activityID = '$id'");
$delet = mysql_fetch_array($delete);
$img = $delet['activityImages'];
if (file_exists("activity/images/upload/$img"))
{
unlink("activity/images/upload/$img");
}
if($files !="")
{
if ((($_FILES["photo"]["type"] == "image/gif")
|| ($_FILES["photo"]["type"] == "image/jpeg")
|| ($_FILES["photo"]["type"] == "image/jpg")
|| ($_FILES["photo"]["type"] == "image/png")
|| ($_FILES["photo"]["type"] == "image/jpeg"))
&& ($_FILES["photo"]["size"] < 105000000)) {
move_uploaded_file($_FILES["photo"]["tmp_name"],"activity/images/upload/$files");
}
}
$UPDATE = mysql_query("update activity set activitySub = '$activitySUB', activityDetels = '$v', activityImages = '$files' where activityID = '".$_REQUEST['id']."'") or die(mysql_error());
if($UPDATE)
{
?>
<script type="text/javascript">
//window.location ="http://kmahasnat.com/admin/?page=ac&id=<?php echo $id;?>&edit=yes&msg=Content Updated Successfully!";
</script>
<?php
}
}
else
{
$insert = mysql_query("update activity set activitySub ='$activitySUB', activityDetels ='$activityDetels', activityImages ='".$img."' where activityID = '".$_REQUEST['id']."'") or die(mysql_error());
if($insert)
{
?>
<script type="text/javascript">
window.location ="http://kmahasnat.com/admin/?page=ac&msg=Content Updated Successfully!";
</script>
<?php
}
}
}
是不是错误简单的“您没有权限访问/管理/在此服务器上”?目录没有正确的读写权限,或者用户组没有访问权限。 –
我已将权限更改为755或777,但不起作用。 –
然后它必须是.conf文件的问题....请参阅这里更多更多帮助http://stackoverflow.com/questions/10873295/error-message-forbidden-you-dont-have-permission-to-access -on-this-server –