暫無描述
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

getIndexZXZC.php 488B

123456789101112131415161718192021222324
  1. <?php
  2. header('Content-type:text/html;charset=utf-8');
  3. $link = mysqli_connect('localhost', 'shenzhenmayi', 'w82q5bmy', 'shenzhenmayi');
  4. if(!$link){
  5. exit('数据库连接失败!');
  6. }
  7. $n = 0;
  8. $arr = array();
  9. $sql = "SELECT * FROM ey_archives WHERE typeid = 1 LIMIT 6";
  10. $res = mysqli_query($link, $sql);
  11. while($row = mysqli_fetch_array($res)){
  12. $arr[0][$n] = $row['aid'];
  13. $arr[1][$n] = $row['title'];
  14. $n++;
  15. }
  16. echo json_encode($arr);
  17. mysqli_free_result($res);
  18. mysqli_close($link);
  19. ?>