Your Ad Here

 Navigation
Home
Source code
Tutorials
RSS feeds
Articles
Wordpress plugins
Books
Sample Chapters
Software
Downloads
Hosting
manuals
Script directory
Training
Our Links




 Sponsors
 Links
domain names
wwwstores
dvd information
 Downloads
dzphp editor
EasyPHP
mysql_phpgenerator
php-studio-trial
phpdesigner_7_2_5
phpMyAdmin-3.4.3.2
/phptriad2-2-1
phpxedit_321
rapidphp 2011
WampServer2.1d-x64
WampServer2.1e-x32
xampp-win32-1.7.4-VC6-installer
xampplite-win32-1.7.3
 Misc
Webmaster Resources
Only PHP
ScriptSearch.com
Scripts.com - Get the best scripts NOW!
AndreaPHP Programming

Valid XHTML 1.0 Transitional


Valid CSS!


Directory file viewer


Directory file viewer

This is the next step in the directory file viewer , allowing your users to click on the files to view them . A good usage for this is this example , this example allows a user to click on an image in the "images" folder and this is then displayed in a new window.

Code :

<table>
<tr><th>file viewer</th></tr>
<?php
$directory = opendir('./images');
while ($files = readdir($directory))
{
$file_array[] = $files;
}
foreach ($file_array as $files)
{
echo "<tr><td>";
if($files == ".." || $files == ".")
{
continue;
}
echo "<a href=\"$files\" target = \"_blank\">$files</a><br>";
echo "</tr>";
}
?>
</table>




Books
 Sponsors


 Random Code
Random number examples(randomizing)
create a jpeg(image)
decimal to octal conversion(math)
 Random Article
  Network
Programming resources
Tutorials directory
Hosting resources
ASP site
Domain names
Progged
Maxi directory
bigarticle : free articles
A Code
Code N Tutorials
Get PHP
Programmers help




beginners PHP Copyright © 2004 onwards by beginnersPHP.