Lite264 > Lite / Common / Config / Fs Diag.php

Questions? Need Help? Want to share? » PHP Forum
Script Name:
Lite264

Download:
lite264.zip

Category:
Web Traffic Analysis

Archive Content:

Lite > Admin

Lite > Common > Config

Lite > Common

Lite > Count

Lite > Data

Lite > Lang

Lite > Style > Basic > Image > Buttons

Lite > Style > Basic > Image

Lite > Style > Basic > Template

Lite > Style > Basic

Lite > View > Vdb

Lite > View

Lite

Fs Diag.php:


<?php

/*------------------------------------------------------------------------*/
// Product: ActualAnalyzer
// Script: fs_diag.php
// Source: http://www.actualscripts.com/
// Copyright: (c) 2002-2004 ActualScripts,  Company. All rights reserved.
//
// YOU DON'T NEED TO EDIT ANYTHING IN THIS SCRIPT.
// SEE LICENSE AGREEMENT FOR MORE DETAILS
/*------------------------------------------------------------------------*/

  
for($i=1;$i<=5;$i++) $test[$i]='Skip';

  
$file=fopen($this->rf.'test.php', 'w');
  if(!
$file) {$test[1]='Fail';$err->reason('config.php|fs_diagnostics|creating of test file has failed');return;}
  else 
$test[1]='Ok';
  
flock($file, LOCK_EX);
  if(!
fwrite($file, 'test')) {$test[2]='Fail';$err->reason('config.php|fs_diagnostics|can\'t write into test file');return;}
  else 
$test[2]='Ok';
  
flock($file, LOCK_UN);
  
fclose($file);

  
$file=fopen($this->rf.'test.php', 'r');
  if(!
$file) {$test[3]='Fail';$err->reason('config.php|fs_diagnostics|can\'t open test file');return;}
  else 
$test[3]='Ok';
  
flock($file, LOCK_EX);
  
$str=fgets($file, 10);
  if(
strcmp($str, 'test')) {$test[4]='Fail';$err->reason('config.php|fs_diagnostics|reading from test file has failed');return;}
  else 
$test[4]='Ok';
  
flock($file, LOCK_UN);
  
fclose($file);

  if(!
unlink($this->rf.'test.php')) {$test[5]='Fail';$err->reason('config.php|fs_diagnostics|deleting of test file has failed');return;}
  else 
$test[5]='Ok';

?>


Other Web Traffic Analysis Scripts:

WebMaster Resources Home

©RingsWorld.com