gpt4 book ai didi

php - 错误#2007,在AS3中,但它跟踪正确的结果,当添加var文本字段时,它在动态文本框中显示Null

转载 作者:行者123 更新时间:2023-11-30 01:12:05 25 4
gpt4 key购买 nike

当我尝试使用 var textField 和 String() 时,结果显示 null。我在下面发布的内容,它显示错误 #2007 参数文本必须为非空。尝试通过几个动态文本框通过 AS3 上的 php 传递来自 mysql 的回显结果。但是当我将其切换到 Trace(event.target.data) 时,它显示了正确的数据。

这是我的 AS3 代码

var Mend:URLRequest = new URLRequest("http://localhost/Autoresult.php");
Mend.method = URLRequestMethod.POST;



var variablesss:URLVariables = new URLVariables();
variablesss.nobed1 = result.text;
variablesss.LoZip=result2.text;
variabless.rangelow=result3.text;
Mend.data = variablesss;


var BLoader:URLLoader = new URLLoader();
BLoader.dataFormat = URLLoaderDataFormat.TEXT;
BLoader.addEventListener(Event.COMPLETE,Candler);
BLoader.load(Mend);


// handler for the PHP script completion and return of status
function Candler(event:Event){

var seVariables: URLVariables = new URLVariables(event.target.data);


result.text=seVariables.nobed1;
result2.text=seVariables.LoZip1;
result3.text=seVariables.rangelow1;



}

这是我的 php 代码

<?php
ini_set('display_errors', 1); error_reporting(E_ALL);

session_start();

include 'connect.php';


$_SESSION['username'];
$username=$_SESSION['username'];


$result=mysqli_query($con,"SELECT * FROM Test WHERE username = '$username'")or die( mysqli_error($con));
$solutions = array();
$check_num_rows=mysqli_num_rows($result);

while ($row = mysqli_fetch_assoc($result))
{
$solutions[0]=$row['nobed1'];
$solutions[1]=$row['LoZip1'];
$solutions[2]=$row['rangelow1'];}




echo "nobed1=.$solutions[0]&LoZip1=.$solutions[1]&rangelow1=.$solutions[2]";



?>

感谢您的宝贵时间

最佳答案

如果不深入研究,它似乎可能是类型不匹配。

你可以试试

var seVariables: URLVariables = new URLVariables(event.target.data + "");

这样就可以将其转换为文本

关于php - 错误#2007,在AS3中,但它跟踪正确的结果,当添加var文本字段时,它在动态文本框中显示Null,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19385643/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com