PHP错误406不可接受

PHP错误406不可接受,php,mysql,Php,Mysql,这是我的密码。每次我在$sunrise之前将值放在$u POST[maxhu]上,我都会收到一个406错误,表示不可接受 问题是,如果我在上面放一个字符,它会工作,但如果我放一个字符串,它不会 $saving="INSERT INTO tblforecast (Issued,Valid,Synopsis,Forecast,Local_Forecast,Station11,Station12,Station13,Station14,Station15,Station16,Station17,Sta

这是我的密码。每次我在$sunrise之前将值放在$u POST[maxhu]上,我都会收到一个406错误,表示不可接受

问题是,如果我在上面放一个字符,它会工作,但如果我放一个字符串,它不会

$saving="INSERT INTO tblforecast (Issued,Valid,Synopsis,Forecast,Local_Forecast,Station11,Station12,Station13,Station14,Station15,Station16,Station17,Station18,Station19,MaxTempYes,MaxTempTod,HighTide,LowTide,MaxHum,MinHum,Illuminate,Sunrise,Sunset,Moonrise,Moonset,Forecaster)
                               VALUES (
                               now(),
                               $_POST[ThisType],
                               '$syn',
                               '$fore',
                               '$localfore',
                               '{$_SESSION['STemp'][0]},{$_SESSION['SCond'][0]},{$_POST['wsc1']}',
                               '{$_SESSION['STemp'][1]},{$_SESSION['SCond'][1]},{$_POST['wsc2']}',
                               '{$_SESSION['STemp'][2]},{$_SESSION['SCond'][2]},{$_POST['wsc3']}',
                               '{$_SESSION['STemp'][3]},{$_SESSION['SCond'][3]},{$_POST['wsc4']}',
                               '{$_SESSION['STemp'][4]},{$_SESSION['SCond'][4]},{$_POST['wsc5']}',
                               '{$_SESSION['STemp'][5]},{$_SESSION['SCond'][5]}{$_POST['wsc6']}',
                               '{$_SESSION['STemp'][6]},{$_SESSION['SCond'][6]},{$_POST['wsc7']}',
                               '{$_SESSION['STemp'][7]},{$_SESSION['SCond'][7]},{$_POST['wsc8']}',
                               '{$_SESSION['STemp'][8]},{$_SESSION['SCond'][8]},
                               {$_POST['wsc9']}',
                               '$_POST[maxtempyes]',
                               '$_POST[maxtemptod]',
                               '$_POST[hightide]',
                               '$_POST[lowtide]',
                               '$_POST[maxhu]',
                               '$_POST[minhu]',
                               '$_POST[illuminati]',
                               '$sunrise',
                               '$sunset',
                               '$moonrise',
                               '$moonset',
                               $id)";

                $save = mysql_query($saving);

有什么问题吗?

像这样试试可能会有用

`$saving="INSERT INTO tblforecast (Issued,Valid,Synopsis,Forecast,Local_Forecast,Station11,Station12,Station13,Station14,Station15,Station16,Station17,Station18,Station19,MaxTempYes,MaxTempTod,HighTide,LowTide,MaxHum,MinHum,Illuminate,Sunrise,Sunset,Moonrise,Moonset,Forecaster)
                         VALUES (
                         now(),
                         $_POST[ThisType],
                         '$syn',
                         '$fore',
                         '$localfore',
                         '".{$_SESSION['STemp'][0]}.",".{$_SESSION['SCond'][0]}.",".{$_POST['wsc1']}."',
                         '".{$_SESSION['STemp'][1]}.",".{$_SESSION['SCond'][1]}.",".{$_POST['wsc2']}."',
                         '".{$_SESSION['STemp'][2]}.",".{$_SESSION['SCond'][2]}.",".{$_POST['wsc3']}."',
                         '".{$_SESSION['STemp'][3]}.",".{$_SESSION['SCond'][3]}.",".{$_POST['wsc4']}."',
                         '".{$_SESSION['STemp'][4]}.",".{$_SESSION['SCond'][4]}.",".{$_POST['wsc5']}."',
                         '".{$_SESSION['STemp'][5]}.",".{$_SESSION['SCond'][5]}.",".{$_POST['wsc6']}."',
                         '".{$_SESSION['STemp'][6]}.",".{$_SESSION['SCond'][6]}.",".{$_POST['wsc7']}."',
                         '".{$_SESSION['STemp'][7]}.",".{$_SESSION['SCond'][7]}.",".{$_POST['wsc8']}."',
                         '".{$_SESSION['STemp'][8]}.",".{$_SESSION['SCond'][8]}.",".{$_POST['wsc9']}."',
                         '".$_POST[maxtempyes]."',
                         '".$_POST[maxtemptod]."',
                         '".$_POST[hightide]."',
                         '".$_POST[lowtide]."',
                         '".$_POST[maxhu]."',
                         '".$_POST[minhu]."',
                         '".$_POST[illuminati]."',
                         '$sunrise',
                         '$sunset',
                         '$moonrise',
                         '$moonset',
                         $id)";`

请阅读:您的“406不可接受”被抛出代码中的某个位置,但该位置不在您提供的代码中。第二,我猜它与表定义有关,表定义也不包括在问题中。@Alexander我如何知道代码的哪一部分是问题所在?这不是一个真正的解决方案,因为您没有包括任何解释,它也不是自解释的。