Révision 7f9aab46
Ajouté par Victor Pongnian il y a plus de 11 ans
class/sites_dir.class.php | ||
---|---|---|
4 | 4 |
|
5 | 5 |
public function __construct($dir) { |
6 | 6 |
$this->base_dir = $dir; |
7 |
} |
|
7 |
}
|
|
8 | 8 |
|
9 | 9 |
public function get_sites() { |
10 |
$dir_fd = opendir($this->base_dir); |
|
10 |
try |
|
11 |
{ |
|
12 |
$dir_fd = opendir($this->base_dir); |
|
13 |
} |
|
14 |
catch(Exception $e) |
|
15 |
{ |
|
16 |
die('Erreur : '.$e->getMessage()); |
|
17 |
} |
|
18 |
|
|
19 |
|
|
11 | 20 |
$point_list = array(); |
12 | 21 |
while (false !== ($point_dir = readdir($dir_fd))) { |
13 | 22 |
$pt = new site_point($this->base_dir.'/'.$point_dir); |
... | ... | |
15 | 24 |
} |
16 | 25 |
return $point_list; |
17 | 26 |
} |
27 |
|
|
28 |
public function get_dir() { |
|
29 |
return $this->base_dir; |
|
30 |
} |
|
18 | 31 |
|
19 | 32 |
} |
Formats disponibles : Unified diff
Version réaliée pour la sage de Victor Pongnian