Ben aşağıdaki kodu vardır:
protected function safePath($path) {
$path = (string) $path;
$path = preg_replace(
array(
'#[\n\r\t\0]*#im',
'#/(\.){1,}/#i',
'#(\.){2,}#i',
'#(\.){2,}#i',
'#\('.DIRECTORY_SEPARATOR.'){2,}#i'
),
array(
'',
'',
'',
'/'
),
$path
)
;
return rtrim($path,DIRECTORY_SEPARATOR);
}
Ben bir yol ile işlevi yürütmek sonra, bu hatayı alıyorum:
Warning: preg_replace () [function.preg değiştirme]: Derleme başarısız oldu: eşsiz parantez ....../myfile.php on line 534
hat 534 ile burada işaretlenmiş bu nereden:
protected function safePath($path) {
$path = (string) $path;
$path = preg_replace(
array(
'#[\n\r\t\0]*#im',
'#/(\.){1,}/#i',
'#(\.){2,}#i',
'#(\.){2,}#i',
'#\('.DIRECTORY_SEPARATOR.'){2,}#i'
),
array(
'',
'',
'',
'/'
), <---------------- THis is line 534
$path
)
;
return rtrim($path,DIRECTORY_SEPARATOR);
}
Bu hatayı sabitleme ile herhangi bir yardım? Teşekkür ederim.