if(checkSecurityKeyIsValid($_POST['key'], $_POST['item_id'], $_POST['type'], $dbConnection))
{
// Creates the target directory and returns the full path relative to upload.php
$targetdir = createUccDirectoryAndGetTargetDir($_FILES['uccfile']['name'], $ucctype);
$target_upload = $targetdir . basename($_FILES['uccfile']['name']);

if(move_uploaded_file($_FILES['uccfile']['tmp_name'], $target_upload)) {   
//updateUccRecord($_POST['item_id'], basename( $_FILES['uccfile']['name']), $dbConnection);
//insertUpdateUccEquipRecord($_POST['userid'], $_POST['item_id'], $dbConnection);
echo "PANGYA_UPDATE_OK";
} else
echo "ERR_SRVVAR444";
} else
echo "ERR_SRVVAR555";
} else {
echo "ERR_SRVVAR666";
初学php,大家见笑。朋友们给看下这段语句具体说了什么操作过程。
我运行此语句,提示ERR_SRVVAR666是哪里的问题。

解决方案 »

  1.   

    你else后面要么都不加{}   要么都加else{
    echo "ERR_SRVVAR444";
    } else{
    echo "ERR_SRVVAR555";
    } else {
    echo "ERR_SRVVAR666";
    }
      

  2.   

    哦,不好意思,后面的 } 本来有,我复制的时候没复制,只是让大家看下 那些语句说了什么意思,大家在后面给注释下,最后提示 ERR_SRVVAR666 是哪段语句造成的。
      

  3.   

    if...else...用法有问题
    if($s == 1){
       if($a==1){
        echo '1';
      }else{
        echo '2';
      }
    }else{
    echo '3';
    }
      

  4.   

    最后提示 ERR_SRVVAR666 是用法问题导致的?如何修改
      

  5.   

    if 和 else 的量不对应, 现在这个结果会不会是再上一层的 if 判断的?
      

  6.   

    你先把if else修改好了  再看看报不报错
      

  7.   

    if(checkSecurityKeyIsValid($_POST['key'], $_POST['item_id'], $_POST['type'], $dbConnection))
    {
    // Creates the target directory and returns the full path relative to upload.php
    $targetdir = createUccDirectoryAndGetTargetDir($_FILES['uccfile']['name'], $ucctype);
    $target_upload = $targetdir . basename($_FILES['uccfile']['name']);if(move_uploaded_file($_FILES['uccfile']['tmp_name'], $target_upload)) {   
    //updateUccRecord($_POST['item_id'], basename( $_FILES['uccfile']['name']), $dbConnection);
    //insertUpdateUccEquipRecord($_POST['userid'], $_POST['item_id'], $dbConnection);
    echo "PANGYA_UPDATE_OK";
    } else
    echo "ERR_SRVVAR444";
    } else
    echo "ERR_SRVVAR555";
    } else {
    echo "ERR_SRVVAR666";
    }用法没错吧!!
      

  8.   

    if(checkSecurityKeyIsValid($_POST['key'], $_POST['item_id'], $_POST['type'], $dbConnection))
    {这个if没有结束的括号.
      

  9.   

    if(checkSecurityKeyIsValid($_POST['key'], $_POST['item_id'], $_POST['type'], $dbConnection))
    {
    这个还是没有右括号啊  建议你用一些编辑器写代码 可以提示那些显而易见的错误  eclipse等等。。
      

  10.   

    if只能对应一个else    
    if(){}
    else {}后面不能再加else了  不然如果if不满足  你执行哪个else?可以if(){}
    else if(){}
    else if(){}....