Home >Backend Development >PHP Tutorial >Example of php JSON cross-domain call data

Example of php JSON cross-domain call data

WBOY
WBOYOriginal
2016-07-25 09:11:061103browse
复制代码

php文件:profile.php

  1. $arr = array(
  2. 'name' => '李飞麟',
  3. 'nick' => '深空',
  4. 'contact' => array(
  5. 'email' => 'shenkong at qq dot com',
  6. 'website' => 'http://bbs.it-home.org',
  7. )
  8. );
  9. $json_string = json_encode($arr);
  10. echo "getProfile($json_string)";
  11. ?>
复制代码



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn