SHARE
TWEET

Pt.3: DataTables ColReorder Ajax State Save

planzelle Dec 1st, 2015 64 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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top