Bug #4524 [NEW]: Error in "Example 27-2. Using optional authentication" example php code.

From: Date: Sat, 04 Jun 2005 12:05:54 +0000
Subject: Bug #4524 [NEW]: Error in "Example 27-2. Using optional authentication" example php code.
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-6221@lists.php.net to get a copy of this message
From: janmartin3 at lycos dot com Operating system: Kanotix 2005-02 PHP version: 4.3.11 Package: Documentation Bug Type: Bug Bug description: Error in "Example 27-2. Using optional authentication" example php code. Description: ------------ I saved the example cade as peartest.php But he code will only work when saved as test.php Reproduce code: --------------- Line 32 has hard coded file name: test.php echo "<a href=\"test.php?login=1\">Click here to log in</a>\n"; It should be dynamic: echo "<a href=\"".$_SERVER['PHP_SELF']."?login=1\">Click here to log in</a>\n"; Expected result: ---------------- One can only see this if he is logged in! Actual result: -------------- Not Found The requested URL /dir1/dir2/test.php was not found on this server. -- Edit bug report at http://pear.php.net/bugs/bug.php?id=4524&edit=1 --

« previous php.pear.doc (#6221) next »