向服务器发送数据时为什么出现问号?

时间:2019-09-30 09:10:40

标签: c# server udp iot quectel

我使用UDP连接将数据传输到服务器上的程序。数据由Quectel BC66的调制解调器传输。终端的AT命令如下所示:

Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given 
in /storage/ssd3/691/11050691/public_html/signin.php on line 255
Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, 
null given in /storage/ssd3/691/11050691/public_html/signin.php on line 
256

当数据出现在服务器上而不是显示已发送的数据时,它会显示问号:

enter image description here

该程序的代码如下所示:

the connection code:

<?php 
$db=mysqli_connect("localhost","id11050691_kimo","025586381") or die 
("Couldn't connect to Mysql");
$db=mysqli_select_db($db,"id11050691_daowat_db") or die ("Couldn't select 
database");

//time formate
function formatDate($date){
    return date('F j, Y, g:i a', strtotime($date));
}
 ?>

the code wich I have problem with :

//getting daowat post photo
$getposts = mysqli_query($db,"SELECT * FROM daowat WHERE photos != '' 
ORDER BY  RAND()");
$row = mysqli_fetch_assoc($getposts);
$photos_db = $row['photos'];
$photosrow = "./userdata/daowat_pics/".$photos_db;

您对如何在服务器程序上显示相同的发送数据有何建议?

1 个答案:

答案 0 :(得分:0)

您的终端应用程序似乎不支持您要显示的Unicode字符。

尝试更改设置以允许使用unicode字符或切换到另一个ConEmu之类的终端仿真器。

希望这会有所帮助!