note 47126 deleted from function.opendir by betz
| From: | betz@php.net | Date: | Wed, 03 Nov 2004 23:58:03 +0000 |
| Subject: | note 47126 deleted from function.opendir by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-79573@lists.php.net to get a copy of this message | ||
Note Submitter: steffen dot ille at upgrade-networks dot
----
Two things which are maybe trivial but also useful, hopefully...
First: You can also use opendir() with e.g. "./images" as a relative path to directories.
Second: For the "problem" with Win32 you can get the right directory seperator e.g. with
this litte code:
<?
if(strpos(PHP_OS,'WIN')!==FALSE)
{ $seperator='\\'; }
else
{$seperator='/'; }
?>
Trivial but useful because you don't have to rewrite your script for the Linux/Unix
platforms...
----
Reason: useless note