planzelle

Pt.3: DataTables ColReorder Ajax State Save

Dec 1st, 2015
76
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. // state_load.php
  3. header('Content-Type: application/json');
  4. try {
  5.     $fh = fopen('saved_state.json', 'r');
  6.     $content = fread($fh, 10000);
  7.     fclose($fh);
  8.     $arr = json_decode($content);
  9.     $ret = array('ColReorder'=>$arr->ColReorder);
  10.     echo json_encode($ret);
  11. } catch (Exception $e) {
  12.     echo "Error";
  13. }
RAW Paste Data