Terminate your session on the server and quit the shell.
Command line interface
Syntax
- $ logout
Arguments
This command takes no arguments.
Example

logout.php
- <?
- require("../plugin.php");
- if (is_ajax()) {
- if ($_POST["action"] == 'logout') {
- $_SESSION = array();
- die("Logout");
- }
- exit;
- }
- ?>
- /**
- * Logout, Exit and Quit
- **/
- TinyShell.plugins.logout = new Class({
- description: "Terminate session",
- run : function(terminal) {
- this.t = terminal;
- terminal.ajax_request(this.print, "<?php echo $_AJAX_URL?>", "action=logout");
- },
- print : function(r) {
- this.t.print("logout");
- }
- });
- // define shortcuts to this function:
- TinyShell.plugins.exit = TinyShell.plugins.logout;
- TinyShell.plugins.quit = TinyShell.plugins.logout;