Re: Can't link image directory?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry for the lack of information.
 
I also was wrong about the subdirectory name. It's "Images" and not
"Image"
 
The workstation is running WinXP Pro while PHP 5 & Apache 2 are on Suse
10.1.
I also installed apache2 & php5 on a WinXP Pro system and the same
problem occurs.
 
I have tried 7 workstations and they are all giving the same problem.
 
Whether the subdirectory is "Images" or "images", it makes no
difference, the problem is still there.
 
Once I rename that "images" or "Images" directory, all is fine.
 
Here's the code:
 
 
<?php
 
 
$path = '//path to directory/';
$dir_handle = opendir($path) or die("Unable to open $path");
$paths = array();
while ($file = readdir($dir_handle))
{
    if(!is_dir($file))
    {
        $paths[] = "$path$file";
    }
}
closedir($dir_handle); 
sort($paths);
echo '<ul>';
$x="0";
foreach ($paths as $link) {
 
    $show = substr($link,strrpos($link, '/')+1);
    echo "<li><a href= 'file://$paths[$x]'>$show</a></li>\n";
        $x++;
}
echo '</ul>';
 
?>
 
 
 
 
 
On 5/18/07, Tijnema ! <tijnema@xxxxxxxxx
<http://ca.f622.mail.yahoo.com/ym/Compose?To=tijnema@xxxxxxxxx&YY=7077&y
5beta=yes&y5beta=yes&order=down&sort=date&pos=0&view=a&head=b> > wrote:
> 
> On 5/18/07, Haig (Home) <hdedeyan@xxxxxxxxxxxx
<http://ca.f622.mail.yahoo.com/ym/Compose?To=hdedeyan@xxxxxxxxxxxx&YY=70
77&y5beta=yes&y5beta=yes&order=down&sort=date&pos=0&view=a&head=b> >
wrote:
> > Hi everyone,
> >
> > I have a simple script that scans a directory and will output a 
list of
> sub
> > directories as a hyperlink.
> >
> > Script is working fine. Only problem I have is that if there is a
> > subdirectory called "Image", my script won't see it. If I rename 
that
> > subdirectory to anything else, it will see it.
> >
> > If I use a standard href line to link that "image" subdirectory, 
that's
> fine
> > but then it won't show up alphabetically when the other folders are
> linked.
> >
> > Any ideas?
> >
> > Haig
> 
> 
> We can't guess what you did wrong, show us relevant parts of your 
code.
> 
> Tijnema
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
    I'm guessing that it's just a typo, but are "Image" (first mention) 
and
"image" (all lower-case, second mention) actually the exact same 
directory?
Remember, all POSIX-based systems (*nix, Linux, BSD, MacOS) are all
cAsE-sEnSiTiVe.
 
    Also, in addition to Tijnema's request, please supply your basic 
server
configuration (WIMP, LAMP, et cetera).  For example:
 
        Linux (Redhat 7.1)
        Apache 1.3.37
        MySQL 3.23
        PHP 3.4.4
 
    Just *please* don't tell me you have that configuration!  ;-P
 
-- 
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

 


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux