调用

WBOY
WBOYasal
2016-06-23 13:59:49927semak imbas

$resultStr = _response_text($postObj,$contentStr); 写上去可以  但是调用数据库$resultStr = $rows["softsize"]; 却不行 softsize数据库里的值就是_response_text($postObj,$contentStr);  为什么不行呢??


回复讨论(解决方案)

没有人去解释 _response_text($postObj,$contentStr); 当然就不行
$resultStr = eval("return {$rows["softsize"]}"); 
就可以了

没有人去解释 _response_text($postObj,$contentStr); 当然就不行
$resultStr = eval("return {$rows["softsize"]}"); 
就可以了

试了试 不行啊 
$resultStr = _response_text($postObj,$contentStr); 整句写进softsize数据库里的值里 然后$rows["softsize"] 也不行

没有人去解释 _response_text($postObj,$contentStr); 当然就不行
$resultStr = eval("return {$rows["softsize"]}"); 
就可以了

$resultStr = eval("return {$rows["softsize"]}");  不行啊 老大 为嘛


没有人去解释 _response_text($postObj,$contentStr); 当然就不行
$resultStr = eval("return {$rows["softsize"]}"); 
就可以了

$resultStr = eval("return {$rows["softsize"]}");  不行啊 老大 为嘛

public function handleText($postObj)    {        $keyword = trim($postObj->Content);        if(!empty( $keyword ))        {			$sql="select * from wsc_download  where isgood='2'";		$result=mysql_query($sql);		while($rows=mysql_fetch_assoc($result))		switch ($keyword)						{							case "byd":		$record[]=array(					'title' =>$rows["title"],					'description' =>$rows["notice"],					'picUrl' => $rows["showpic"],					'url' =>$rows["downurl"]			);						$contentStr = $rows["hits"];			            $resultStr = eval("return {$rows["softsize"]}");  			  break;			         }echo $resultStr;}		    }

eval("return {$rows[‘softsize]}");试试

 eval("return {$rows['softsize']}");

 eval("return {$rows['softsize']}");

这个试了 不行..

 eval("return  {$rows['softsize'] }"); {}去掉试试

 eval("return  {$rows['softsize'] }"); {}去掉试试

显示语法错误

eval 的参数必须是合法的 php 语句

eval 的参数必须是合法的 php 语句  感谢你们啦! 自己用了个比较贱的方法解决了.. 

Kenyataan:
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn