app-for PHP to do the app interface the entire communication process

Source: Internet
Author: User
Keywords App Interface PHP Data
App Interface PHP Data

Ask how to do the steps what are the files

  header (' Content-type:application/json; Charset=utf-8 '); require ' conn.php ';//Read Data $sql_notice = mysql_query (' SELECT id,user_name from Yxd_user limit 0,4 ');//$  Data[] = mysql_fetch_array ($sql _notice,mysql_assoc); First row//print all row array data while ($data [] = mysql_fetch_array ($sql _notice,mysql_assoc)) {$data;}
 Var_dump ($data); echo "
";
  class response{/** * Encapsulates the communication method by JSON * @param integer $code status code * @ param string $message message * @param array $data data */public static function json ($code, $message = ', $data =array ()        ) {if (!is_numeric ($code) | |!is_array ($DATA)) {return '; } $result = Array (' code ' = = $code, ' message ' = $message, ' data ' = $dat    A) echo Json_encode ($result); }}  

Now write these two but don't know what to do

  • 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.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.