Eigenlijk is een scriptrequest taboe; maar ik kon het niet laten om deze even te posten
PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
| <?PHP
/**
* FileName: functions.inc.php
*
* Function: Go thru a specific directory and include all files in there
*
* Dependencies: none
*
* VersionHistory: v1.0 Initial setup by Spider.007
**/
$rootDirectory = $_SERVER["DOCUMENT_ROOT"];
$PHPfunctionFiles = returnAllPHPfiles($rootDirectory."/functions/");
reset($PHPfunctionFiles);
foreach($PHPfunctionFiles as $PHPfunctionFile) include $PHPfunctionFile;
/**
* FunctionName: returnAllPHPfiles
*
* Function: Go thru a specific directory and return all files in that directory as an array
*
* Input: $dirName > STRING The base directory where to search for PHP files
*
* Output: $PHPfunctionFiles > ARRAY All the files found in the directory
*
* Dependencies: none
*
* VersionHistory: v1.0 Initial setup by Spider.007
**/
function returnAllPHPfiles($dirName){
$PHPfunctionFiles = Array();
$dirHandle = opendir($dirName);
while ($fileName = readdir($dirHandle)) if (preg_match("/(.*)\.php$/i", $fileName)) $PHPfunctionFiles[] = $dirName.$fileName;
closedir($dirHandle);
return $PHPfunctionFiles;
}
?> |
[
Voor 19% gewijzigd door
Spider.007 op 07-09-2003 13:56
]
---
Prozium - The great nepenthe. Opiate of our masses. Glue of our great society. Salve and salvation, it has delivered us from pathos, from sorrow, the deepest chasms of melancholy and hate