- re-add mysteriously missing file
authorMichael Wallner <mike@php.net>
Thu, 22 Jun 2006 05:51:33 +0000 (05:51 +0000)
committerMichael Wallner <mike@php.net>
Thu, 22 Jun 2006 05:51:33 +0000 (05:51 +0000)
tests/log.inc [new file with mode: 0644]

diff --git a/tests/log.inc b/tests/log.inc
new file mode 100644 (file)
index 0000000..f5e33b8
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+define('_REDIR_LOG', '__r_log');
+define('_CACHE_LOG', '__c_log');
+define('_AMETH_LOG', '__m_log');
+define('_CMPST_LOG', '__a_log');
+
+function log_prepare($log)
+{
+       is_file($log) and @unlink($log);
+       switch ($log)
+       {
+               case _REDIR_LOG:        ini_set('http.log.redirect', _REDIR_LOG);                       break;
+               case _CACHE_LOG:        ini_set('http.log.cache', _CACHE_LOG);                          break;
+               case _AMETH_LOG:        ini_set('http.log.allowed_methods', _AMETH_LOG);        break;
+               case _CMPTS_LOG:        ini_set('http.log.composite', _CMPST_LOG);                      break;
+       }
+}
+function log_content($log)
+{
+       echo file_get_contents($log);
+       unlink($log);
+}
+?>