PHP Classes

File: tests/server.php

Recommend this page to a friend!
  Classes of Fabio Ambrosanio   AJAX Locking   tests/server.php   Download  
File: tests/server.php
Role: Auxiliary script
Content type: text/plain
Description: Example AJAX server
Class: AJAX Locking
Lock server side resources from AJAX requests
Author: By
Last change: Added example of use of AJAX_Locking_Driver_File driver
Date: 17 years ago
Size: 656 bytes


Class file image Download
require_once ('../AJAX_Locking.php');

//$driver = new AJAX_Locking_Driver_SharedMemory('file', false, 3600);

//$names = array(
// 'table' => 'ajaxlocks',
// 'columns' => array(
// 'user' => 'username',
// 'time' => 'expire'
// )
//$driver = new AJAX_Locking_Driver_MDB2("mssql://test:test!@localhost/pubs", $names, 3600);

$driver = new AJAX_Locking_Driver_File('/tmp', 30);

$server = new AJAX_Locking($driver);
$server->registerJSLibrary('Locking','Locking.js', "../js/");