note 55498 added to function.apache-lookup-uri
| From: | trejkaz at osu1 dot php dot net | Date: | Fri, 05 Aug 2005 01:09:16 +0000 |
| Subject: | note 55498 added to function.apache-lookup-uri | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-93107@lists.php.net to get a copy of this message | ||
Apparently on PHP 4.2, this function returns an array instead of an object.
That being the case, the example code above would translate to:
<?php
$info = apache_lookup_uri('index.php?var=value');
print_r($info);
if (file_exists($info['filename'])) {
echo 'file exists!';
}
?>
A means of making this transparent so that the object syntax works, is left as an exercise for the
reader. ;-)
----
Manual Page -- http://www.php.net/manual/en/function.apache-lookup-uri.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+55498
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55498&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55498&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55498&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55498&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55498&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55498&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+55498&report=yes
Search -- http://master.php.net/manage/user-notes.php