用evaleval
(PHP 3, PHP 4, PHP 5)eval -- Evaluate a string as PHP code
说明
mixed eval ( string code_str )
Evaluates the string given in code_str as PHP code. Among other things, this can be useful for storing code in a database text field for later execution. There are some factors to keep in mind when using eval(). Remember that the string passed must be valid PHP code, including things like terminating statements with a semicolon so the parser doesn't die on the line after the eval(), and properly escaping things in code_str. To mix HTML output and PHP code you can use a closing PHP tag to leave PHP mode. Also remember that variables given values under eval() will retain these values in the main script afterwards. 

解决方案 »

  1.   

    好像不行啊。。 abc 这个 function 无法使用啊。
      

  2.   

    $str = "010-12345679-111";
    $v   = "[var:isValidTel('$str','010')]";$linkareaHtml = GetHtmlArea("[var:","]",$v); //---- isValidTel('$str','010')eval( "\$linkareaHtml = \"$linkareaHtml\";" );  // 这里应该应用什么方法??是下面的结果也出现为   12345679echo $linkareaHtml;  echo isValidTel($str,"010");  //----12345679
      

  3.   

    eval( "\$linkareaHtml = $linkareaHtml;" );