Courseware _48. Nineth: Ajax technology [3]-on browser native AJAX interface (3)

Source: Internet
Author: User
Tags eval http request json php file php code

Ajax02.html

Client

<!
DOCTYPE html> <!--client--<!--courseware _48. Nineth: Ajax technology [3]-on the browser-native Ajax interface (3). RAR--<!--processing the server response data--  



ajax02.php

Server-side

<?php
//server side//can execute a variety of PHP code, various judgments, as well as from the database to obtain data, returned to the client
//sleep (5);
echo "Hey, this data is back to you";

Echo ' <ul>
//    <li><a href= "#" > I am the headline of a news </a></li>
//    <li> <a href= "#" > I am a headline of a news </a></li>
//    <li><a href= "#" > I am a headline of a news </a>< /li>
//    <li><a href= "#" > I am a headline of the news </a></li>
//    <li><a href= "#" > I am a headline of the news </a></li>
//    <li><a href= "#" > I am the headline of a news </a></li >
//</ul> ';

$str 1=<<<a
//if (1>100) {
//    alert (':)) ');
}else{
//    alert (':((');
}
//a;
echo $str 1;

$arr =array (
    ' title ' = ' This is the title of an article ', ' url ' = ' # '),
    Array (' title ' = ' = ' This is the title of an article ', ' url ' = = ') Http://sifangku.com '),
    Array (' title ' = ' This is the title of an article ', ' url ' = ' # '),
    Array (' title ' = ' = ' This is the title of an article ', ' URL ' = = ' # ')
;
$str 2=json_encode ($arr);
echo $str 2;



? >


Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

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.