PHP outputs the database query result as a simple instance in json format, and the query result is json. PHP outputs the database query result as a simple example in json format. the query result is json1_deconn. php is a database link file and does not search for phpinclude online. includeconn. php; PHP outputs the database query results as simple instances in
PHP delivers a simple example of JSON data based on jquery's Ajax technology, Jqueryjson
In this paper, a simple implementation method of PHP-based AJAX technology is presented. Share to everyone for your reference, as follows:
HTML page:
A look at the show results submitted
PHP Page:
Using the Post method
Read more about PHP related content readers can view the topic: "Php+ajax Tips and Applications Summary", "PHP operation and operator Usage
PHP tutorial comes with Json_encode to process JSON data, then their support for Chinese is not good, let's look at an example
echo Json_encode (Array (123213, ' China '));
{"PlatformID": "123213", "userid": "1023", "username": "U00B7U00F0U00B5U00B2U00C9U00B1U00B7U00F0U00CCU00FC"}
We will find that the English can be correctly parsed, but Chinese will come out U00B7U00F0U00B5U00B2U00C9U00B1U00
PHP and Web pages use UTF-8 encoding, the database is SQL server2008, using the default encoding (936, which is GBK encoding)
When reading the database data, use PHP's own json_encode () to return to the front end, the result Chinese is not displayed.
The solution is as follows:
In this way, the Chinese in SQL Server 2008 can be displayed correctly on the Web page.
If you want to insert Chinese correctly into SQL Server 2008, add a code: $query = Iconv ("Utf-8", "Gbk//ignore", $query);//In ord
Tutorial
var Incomejson = eval (' (' +xmlhttp.responsetext + ') ');
Incomejson.name//value is Xiaozhang
If the Xmlhttp.responsetext is a JSON string that is transmitted asynchronously, assume that the contents are: {"name": "Xiaozhang"}
Look at a string to convert to a JSON function
Analysis
{
Name: "Down.111cn.net",
role:[
resource configuration file Default.res.jsonThe binary Dbbin file needs to be selected as bin typeImport the Dragonbones library into the Egretproperties.json file and compile the engine againCreating skeletal animations in code[AppleScript]Plain Text view copy code ?
12345678
let factory = dragonBones.EgretFactory.factory;factory.parseDragonBonesData(RES.getRes("NewDragon_ske_bin"));factory.parseTextureAtlasData(RES.getRes("NewDragon_tex2_json"), RES.getRes("NewDragon_tex3_png
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.