Go Back   CodingForums.com > :: Server side development > PHP > Post a PHP snippet

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-26-2010, 12:01 PM   PM User | #1
Pcfr43k
New Coder

 
Join Date: Jan 2010
Location: The Netherlands
Posts: 53
Thanks: 10
Thanked 0 Times in 0 Posts
Pcfr43k is an unknown quantity at this point
Plugin includer

Includes plugins that you place in the same folder.
Creates div's from them for CSS markup.

PHP Code:
<?php

//Open directory
$location=opendir("./");

//List items in directory
while(($directory=readdir($location)) !== false) {

//Directory filter
if($directory!= '.' && $directory!= '..'){
if(
is_dir($directory)){

//Include index files from directories
echo "<div id='".$directory."'>"; include($directory.'/index.php'); echo "</div>\n";}}}
closedir($location);

?>
Pcfr43k is offline   Reply With Quote
Reply

Bookmarks

Tags
plugin include includer

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:10 PM.


Advertisement
Log in to turn off these ads.