1

我无法重新创建问题,它似乎只发生在多台机器上的一个人身上..

我在想,也许与 SQL 有关。我不知道他的 ISP 是否与此有关?就像我说的,到目前为止,这个问题只发生在一个人身上。多台机器,多个用户名来测试我的权限代码,这很奇怪。

我已经测试了另外 100 次,一切都完美无缺。这是我的代码的一部分。

if($_REQUEST['do'] == 'save_new_vehicle') {
$userid = $vbulletin->userinfo['userid'];
$username = $vbulletin->userinfo['username'];
$vbulletin->input->clean_array_gpc('p', array(
'year' => TYPE_INT,
'make_model' => TYPE_NOHTML,
'susp_type' => TYPE_NOHTML,
'interior' => TYPE_NOHTML,
'exterior' => TYPE_NOHTML,
'audiovideo' => TYPE_NOHTML,
'wheelstires' => TYPE_NOHTML,
'suspension' => TYPE_NOHTML,
'drivetrain' => TYPE_NOHTML,
'nickname' => TYPE_NOHTML,
));  

$year = $vbulletin->GPC['year'];
$make_model = $vbulletin->GPC['make_model'];
$susp_type = $vbulletin->GPC['susp_type'];
$interior = $vbulletin->GPC['interior'];
$exterior = $vbulletin->GPC['exterior'];
$audio_video = $vbulletin->GPC['audiovideo'];
$wheels_tires = $vbulletin->GPC['wheelstires'];
$suspension = $vbulletin->GPC['suspension'];
$drivetrain = $vbulletin->GPC['drivetrain'];
$nickname = $vbulletin->GPC['nickname'];


$sql = "INSERT INTO ". TABLE_PREFIX ."BAMFG_vehicle (

  userid, 
  username, 
  nickname, 
  year, 
  make_model,
  susp_type,
  exterior,
  interior,
  audio_video,
  drivetrain,
  suspension,
  wheels_tires) VALUES (

  '". $userid ."',
  '". $username ."',
  '". $nickname ."',
  '". $year ."',
  '". $make_model ."',
  '". $susp_type ."',  
  '". $exterior ."',
  '". $interior ."',
  '". $drivetrain ."',
  '". $audio_video ."',
  '". $suspension ."',
  '". $wheels_tires ."')";
$db->query_write($sql);
}

它会写:年份,make_model,susp_type,interior,exterior和audio_video..这个家伙没有别的了..

再一次,无数次我试图重新创造一切正常工作的问题,其他人以及一切正常工作。我要拔头发了!

您可以自己尝试该站点,看看我们是否可以复制结果.. http://www.minitrucker.org/bamfg.php 登录:stackoverflow 密码:密码

在没有 CSS 的情况下,一切仍然很粗糙,直到我把所有的代码都弄清楚了。再次感谢。

编辑 * 我已将代码更改为:

$year =  mysql_real_escape_string($vbulletin->GPC['year']);
$make_model =  mysql_real_escape_string($vbulletin->GPC['make_model']);
$susp_type =  mysql_real_escape_string($vbulletin->GPC['susp_type']);
$interior =  mysql_real_escape_string($vbulletin->GPC['interior']);
$exterior =  mysql_real_escape_string($vbulletin->GPC['exterior']);
$audio_video =  mysql_real_escape_string($vbulletin->GPC['audiovideo']);
$wheels_tires =  mysql_real_escape_string($vbulletin->GPC['wheelstires']);
$suspension =  mysql_real_escape_string($vbulletin->GPC['suspension']);
$drivetrain =  mysql_real_escape_string($vbulletin->GPC['drivetrain']);
$nickname =  mysql_real_escape_string($vbulletin->GPC['nickname']);

一切对我来说仍然有效,我将进行更多测试,看看会发生什么。想法?

4

0 回答 0