Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Camilo Sperberg  >  PID process check  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: How-to use the class
Class: PID process check
Check if a PHP script is running using PID files
Author: By
Last change:
Date: 2011-04-17 01:29
Size: 198 bytes
 

Contents

Class file image Download
<?php
include('pid.class.php');

$pid = new pid();
if (
$pid->already_running) die('Already running!');
    
// This is used to simulate the script will be running for 30 seconds.
sleep(30);