Home / PHP / How to include() all PHP files from a directory?

How to include() all PHP files from a directory?

<?php
foreach (glob("system/lib/*.php") as $filename)
{
include $filename;
}
?>

Hits: 4

Leave a Reply