PHP Classes
elePHPant
Icontem

File: example/app/scripts/log.php

Recommend this page to a friend!
  Classes of Rafael Rodriguez  >  Div PHP Ways  >  example/app/scripts/log.php  >  Download  
File: example/app/scripts/log.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Div PHP Ways
Route HTTP requests to registered handlers
Author: By
Last change:
Date: 9 months ago
Size: 330 bytes
 

Contents

Class file image Download
<?php

#id = log
#type = background

#listen = /{controller}/{action}
#listen = /{controller}
#listen = *

$f = fopen("../logs/access.log", "a");
$ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : "[unknown client ip]";
fputs($f,date("Y-m-d h:i:s - "). " - [$ip] - " . divWays::getCurrentWay() . "\n");
fclose($f);