Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,195,537 members, 7,958,663 topics. Date: Wednesday, 25 September 2024 at 08:04 PM |
Nairaland Forum / Science/Technology / Programming / Need Help With Working With Direcories In PHP (988 Views)
A Web Developer Needs Help Working With Bootstrap Carousel / Online Banking Source Code In PHP, MSQL / How Can I Build A Twitter like @mention System In PHP? (2) (3) (4)
(1) (Reply)
Need Help With Working With Direcories In PHP by Setag: 2:45pm On Feb 05, 2016 |
I created a director handle $dp = opendir('.'); //old directory //changed the directory chdir("./object" //new diretory i expect the code I write that list files in the new directory but it listed all files in old directory. Now, if $dp = opendir("./object" I write a code that lists all files in this directory it does, but the links don't work well; it thinks my files reside in the old folder Here's the code: $dp = opendir("." chdir("./object" $currentfile = ""; while ($currentfile !== false) { $currentfile = readdir($dp); $filesarray[] = $currentfile; } print "<ul>"; foreach ($filesarray as $afile) { print "<li><a href = \"$afile\">$afile</a></li>"; } print "</ul>"; |
(1) (Reply)
Microsoft Buys Professional Network Linkedin / Python Programming Classes / Get Your Approved Adsense Account And Start Making Money.
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 9 |