⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 get_data.php

📁 php绿色服务器,让大家试用greenamp
💻 PHP
字号:
<?
    function showData() 
    { 
        //make your query here that selects all your data for the grid 
        //you have to modify the $res and fetch yourself to make the query succesfull 
        //$res = $this->dbi->query('your query here'); 
                 
       // while($obj =& $this->dbi->fetch())                 
       // { 
       //     $arr[] = $obj;  
       // } 
        $arr = array(
    "common"  => array("a"=>"orange","b"=>"banana","c"=>"apple"),
    "numbers" => array(1, 2, 3, 4, 5, 6),
    "holes"   => array("first", 5 => "second", "third")
); 

        //encode your data for the jsonreader 
        echo $_GET['callback'].'({"total":"'.$rows.'","results":'.json_encode($arr).'})'; 
    } 

    function saveData() 
    { 
        $data = json_decode(stripslashes($_POST['data'])); 
         
        //make here a query that updates the database 
    }  
    
    ?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -