Ejemplo n.º 1
0
<?php 
header('Content-Type: text/html; charset=utf-8');
/// set the content charset to utf-8 for php
error_reporting(E_ALL);
ini_set('display_errors', '1');
session_start();
$temp = $_POST["param"];
$temp = str_replace("[", "", $temp);
$temp = str_replace("]", "", $temp);
//echo $temp;
$param = json_decode($temp);
$ordr = (int) $param->order;
switch ($ordr) {
    case 1:
        GetWords();
        break;
    case 2:
        InsertWord($param);
        break;
    case 3:
        UpdateWord($param);
        break;
    case 4:
        GetWordInfo($param);
        break;
    case 5:
        DelWord($param);
        break;
}
function GetWords()
{
Ejemplo n.º 2
0
<?php 
header('Content-Type: text/html; charset=utf-8');
/// set the content charset to utf-8 for php
error_reporting(E_ALL);
ini_set('display_errors', '1');
session_start();
$temp = $_POST["param"];
$temp = str_replace("[", "", $temp);
$temp = str_replace("]", "", $temp);
//echo $temp;
$param = json_decode($temp);
$ordr = (int) $param->order;
switch ($ordr) {
    case 1:
        GetWords($param);
        break;
    case 2:
        InsertWord($param);
        break;
    case 3:
        UpdateWord($param);
        break;
    case 4:
        GetWordInfo($param);
        break;
    case 5:
        DelWord($param);
        break;
    case 6:
        WriteJson($param);
        break;