2014-02-28 68 views
0

我有網頁腳本,顯示406的形式不能接受的錯誤提交

406 Not Acceptable Error 

所請求的資源/admincp/settings.php無法在此服務器上找到的合適的代表性。

此外,試圖使用ErrorDocument來處理請求時遇到一個404 Not Found錯誤。」

問題是,它的工作原理上的一些託管服務提供商。誰能告訴我這是爲什麼錯誤來

<?php 
$act=isset($_GET['act'])?$_GET['act']:""; 

if($act=='sub'){ 
$name = $mysqli->escape_string($_POST['site']); 
$siteurl = $mysqli->escape_string($_POST['siteurl']); 
$keys = $mysqli->escape_string($_POST['keywords']); 
$desc = $mysqli->escape_string($_POST['descrp']); 
$email = $mysqli->escape_string($_POST['email']); 
$active = $mysqli->escape_string($_POST['active']); 
$template = $mysqli->escape_string($_POST['template']); 


$mysqli->query("UPDATE settings SET name='$name',siteurl='$siteurl',keywords='$keys',descrp='$desc',email='$email',active='$active',template='$template' WHERE id=1"); 

if($_FILES["file"]["name"]!=''){ 
      move_uploaded_file($_FILES["file"]["tmp_name"], "../images/logo.png"); 
    }?> 

<div class="msg-ok">updated successfully.</div> 

<?php } 

if($settings = $mysqli->query("SELECT * FROM settings WHERE id='1'")){ 

    $setrow = mysqli_fetch_array($settings); 

    $name=$setrow['siteurl']; 

    $settings->close(); 

}else{ 

    printf("Error: %s\n", $mysqli->error); 
} 


?> 
<form action="settings.php?act=sub" method="post" enctype="multipart/form-data"> 
<label class="artlbl">Site Name</label> 
<div class="formdiv"> 
<input type="text" name='site' value='<?php echo $setrow['name']?>'/> 
</div> 
<label class="artlbl">Logo (182px x 47px)</label> 
<div class="formdiv"> 
<input type='file' class="file" name='file'/> 
</div> 
<div class="clear"></div> 
<label class="artlbl">Site URL (without "http://" and end "/")</label> 
<div class="formdiv"> 
<input type="text" name='siteurl' value='<?php echo $setrow['siteurl']?>'/> 
</div> 
<div class="clear"></div> 
<label class="artlbl">Meta Keywords (Separated by Commas)</label> 
<div class="formdiv"> 
<textarea name='keywords' cols=40 rows=5 ><?php echo $setrow['keywords']?></textarea> 
</div> 
<label class="artlbl">Meta Description</label> 
<div class="formdiv"> 
<textarea name='descrp' cols=40 rows=5 ><?php echo $setrow['descrp']?></textarea> 
</div> 

<label class="artlbl">Email</label> 
<div class="formdiv"> 
<input type="text" name='email' value='<?php echo $setrow['email']?>'/> 
</div> 

<label class="artlbl">Approve</label> 
<div class="formdiv"> 
<select name="active" id="active"> 
<?php if ($setrow['active']==1){?> 
<option value="1">ON</option> 
<option value="0">OFF</option> 
<?php }else{?> 
<option value="0">OFF</option> 
<option value="1">ON</option> 
<?php }?> 
</select> 
</div> 
<div class="clear"></div> 

<label class="artlbl">Template</label> 
<div class="formdiv"> 
<select name="template" id="template"> 
<option value="<?php echo $setrow['template'];?>"><?php echo ucfirst($setrow['template']);?></option> 
<?php 
foreach(glob('../templates/*', GLOB_ONLYDIR) as $dir) { 
    $TemplateDir = substr($dir, 13); 
    $TemplateName = ucfirst($TemplateDir) 
?> 
<option value="<?php echo $TemplateDir;?>"><?php echo $TemplateName;?></option> 
<?php }?> 
</select> 
</div> 
<div class="clear"></div> 

</br> 
<div class="formdiv"> 
<div class="sbutton"><input type="submit" id="submit" value="Update Site Settings"/></div> 
</div> 
</form> 
+1