PHP - Read number of dirs and then require for each a specified file name

Posted by Max on Stack Overflow See other posts from Stack Overflow or by Max
Published on 2010-03-26T14:10:33Z Indexed on 2010/03/26 14:13 UTC
Read the original article Hit count: 347

Filed under:
|
|
|
|

Hello,

I want to make a little script but I'm rather n00b in php so please help me if you can :)

What I want the script to do is:

  1. I have "index.php".
  2. I want "index.php" to read the sub-directories from a known folder, let's say "templates/"
  3. Each sub-directory will contain a file called "content.html".
  4. The index will then load the "content.html" with the require() function for each of the existing sub-directories.

Thank you very much for your help!

© Stack Overflow or respective owner

Related posts about directory

Related posts about require