1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
xscan_htaccess.php
См. документацию.
1
<?php
2
3
class
CBitrixXscanHtaccess
{
4
5
public
$doc_root
=
null
;
6
public
$start_time
=
null
;
7
public
$time_limit
=
null
;
8
public
$break_point
=
null
;
9
public
$skip_path
=
null
;
10
public
$found
=
false
;
11
public
$result
= [];
12
13
function
__construct
(
array
$result
= [])
14
{
15
$this->doc_root = rtrim(
$_SERVER
[
'DOCUMENT_ROOT'
],
'/'
);
16
$this->start_time = time();
17
18
$mem = (int)ini_get(
'memory_limit'
);
19
$this->time_limit = ini_get(
'max_execution_time'
) ?: 30;
20
$this->time_limit = min($this->time_limit, 30);
21
$this->time_limit = $this->time_limit * 0.7;
22
23
$this->result =
$result
;
24
25
}
26
27
28
function
Search
(
$path
)
29
{
30
$path
= str_replace(
'\\'
,
'/'
,
$path
);
31
do
32
{
33
$path
= str_replace(
'//'
,
'/'
,
$path
, $flag);
34
}
35
while
($flag);
36
37
if
($this->start_time && time() - $this->start_time > $this->time_limit)
38
{
39
if
(!$this->break_point)
40
{
41
$this->break_point =
$path
;
42
}
43
return
;
44
}
45
46
if
($this->skip_path && !$this->found)
47
{
48
if
(strpos($this->skip_path, dirname(
$path
)) !== 0)
49
{
50
return
;
51
}
52
53
if
($this->skip_path ==
$path
)
54
{
55
$this->found =
true
;
56
}
57
}
58
59
if
(is_dir(
$path
))
// dir
60
{
61
$p
= realpath(
$path
);
62
63
if
(is_link(
$path
))
64
{
65
$d = dirname(
$path
);
66
if
(strpos(
$p
, $d) !==
false
|| strpos($d,
$p
) !==
false
)
67
{
68
return
true
;
69
}
70
}
71
72
$dir
= opendir(
$path
);
73
74
while
($item = readdir(
$dir
))
75
{
76
if
($item ==
'.'
|| $item ==
'..'
)
77
{
78
continue
;
79
}
80
81
$this->
Search
(
$path
.
'/'
. $item);
82
}
83
closedir(
$dir
);
84
}
85
elseif
(preg_match(
'/\.htaccess$/'
,
$path
))
86
{
87
if
(!$this->skip_path || $this->found)
88
{
89
$this->result[] =
$path
;
90
}
91
}
92
}
93
}
$path
$path
Определения
access_edit.php:21
CBitrixXscanHtaccess
Определения
xscan_htaccess.php:3
CBitrixXscanHtaccess\$result
$result
Определения
xscan_htaccess.php:11
CBitrixXscanHtaccess\$found
$found
Определения
xscan_htaccess.php:10
CBitrixXscanHtaccess\Search
Search($path)
Определения
xscan_htaccess.php:28
CBitrixXscanHtaccess\$break_point
$break_point
Определения
xscan_htaccess.php:8
CBitrixXscanHtaccess\$time_limit
$time_limit
Определения
xscan_htaccess.php:7
CBitrixXscanHtaccess\$start_time
$start_time
Определения
xscan_htaccess.php:6
CBitrixXscanHtaccess\__construct
__construct(array $result=[])
Определения
xscan_htaccess.php:13
CBitrixXscanHtaccess\$doc_root
$doc_root
Определения
xscan_htaccess.php:5
CBitrixXscanHtaccess\$skip_path
$skip_path
Определения
xscan_htaccess.php:9
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$p
$p
Определения
group_list_element_edit.php:23
$_SERVER
$_SERVER["DOCUMENT_ROOT"]
Определения
cron_frame.php:9
elseif
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения
prolog_main_admin.php:393
$dir
$dir
Определения
quickway.php:303
bitrix
modules
security
classes
general
xscan_htaccess.php
Создано системой
1.14.0