mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-01 00:02:21 +09:00
#51 preg_match()를 substr_compare() 또는 strncmp()로 대체
This commit is contained in:
parent
681a9b2d07
commit
63e0fd6f3b
20 changed files with 68 additions and 61 deletions
|
|
@ -59,7 +59,7 @@ class installAdminController extends install
|
|||
}
|
||||
|
||||
$default_url = Context::get('default_url');
|
||||
if($default_url && !preg_match('/^(http|https):\/\//i', $default_url)) $default_url = 'http://'.$default_url;
|
||||
if($default_url && strncasecmp('http://', $default_url, 7) !== 0 && strncasecmp('https://', $default_url, 8) !== 0) $default_url = 'http://'.$default_url;
|
||||
|
||||
$use_ssl = Context::get('use_ssl');
|
||||
if(!$use_ssl) $use_ssl = 'none';
|
||||
|
|
|
|||
|
|
@ -676,13 +676,14 @@ class installController extends install
|
|||
|
||||
$header = sprintf($fheader,$auto_config['path'],$auto_config['host'],strlen($body),$body);
|
||||
$fp = @fsockopen($auto_config['host'], $auto_config['port'], $errno, $errstr, 5);
|
||||
|
||||
if($fp)
|
||||
{
|
||||
fputs($fp, $header);
|
||||
while(!feof($fp))
|
||||
{
|
||||
$line = trim(fgets($fp, 4096));
|
||||
if(preg_match("/^<error>/i",$line))
|
||||
if(strncmp('<error>', $line, 7) === 0)
|
||||
{
|
||||
fclose($fp);
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue