Added line length to fgets
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1269 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
0b85ecd67f
commit
9dc4db04d2
|
@ -29,7 +29,7 @@ define( "ZM_PATH_CGI", "<from zmconfig>" ); // Path to cgi files
|
||||||
$cfg = fopen( ZM_CONFIG, "r") or die("Could not open config file.");
|
$cfg = fopen( ZM_CONFIG, "r") or die("Could not open config file.");
|
||||||
while ( !feof($cfg) )
|
while ( !feof($cfg) )
|
||||||
{
|
{
|
||||||
$str = fgets( $cfg );
|
$str = fgets( $cfg, 256 );
|
||||||
if ( preg_match( '/^\s*$/', $str )) { continue; }
|
if ( preg_match( '/^\s*$/', $str )) { continue; }
|
||||||
elseif ( preg_match( '/^\s*#/', $str )) { continue; }
|
elseif ( preg_match( '/^\s*#/', $str )) { continue; }
|
||||||
elseif ( preg_match( '/^\s*([^=\s]+)\s*=\s*([^=\s]+)\s*$/', $str, $matches ))
|
elseif ( preg_match( '/^\s*([^=\s]+)\s*=\s*([^=\s]+)\s*$/', $str, $matches ))
|
||||||
|
|
Loading…
Reference in New Issue