Re: cvs: pear /Text_Wiki/doc BBtest.txt test_Text_Wiki.php

From: Date: Mon, 18 Jul 2005 18:31:49 +0000
Subject: Re: cvs: pear /Text_Wiki/doc BBtest.txt test_Text_Wiki.php
References: 1 2  Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-33132@lists.php.net to get a copy of this message
Hello ! Thanks to give me some clues on the right ways ... Martin Jansen wrote:
On Mon Jul 18, 2005 at 04:3552PM -0000, bertrand GUGGER wrote:
+set_include_path( realpath(dirname(__FILE__).'/../'). PATH_SEPARATOR . get_include_path() );
This once again does not conform to the CS. This is a test file, this set include path was there to avoid a general setting only for tests.
I will withdraw it. I thought it was admited for test/demo scripts, just do: find /usr/share/pear -name '*.php' -exec grep -iEl '(include|require).*dirname' {} \; A lot of test scripts use that ...
+if ($_SERVER['PHP_SELF']) {
+    $html = true;
   
Why don't you check for the return value of php_sapi_name() instead? I'm really not sure it's an easy/correct way ...
How decrypt that in the list of possible sapi_names ? On the other hand, I have to admit $_SERVER['PHP_SELF'] is unsure for portability ... Could I use $_SERVER['SERVER_NAME'] ? -- bertrand

« previous php.pear.cvs (#33132) next »