Webiter
09-09-2011, 02:04 PM
Seeking to get a newsletter faciliity working. Before I move to a production server I would wish to eliminate the depreciated item that I am picking up in WAMP.
I am being advised as follows on line 146.
Deprecated: Function eregi() is deprecated in C:\wamp\www\newsletter\wespa_php_newsletter_v3\inc\csvfile.php on line 146
Line 146 is identified in the code below -
function open( $mode )
// opens the data source
{
if ( ! $this->handle = fopen( $this->name, $mode ) )
{
return false;
}
else
{
// lock file if opened for write mode
Line 146 = if ( eregi( "a|w|\+", $mode ) )
{ flock( $this->handle, 2); }
$this->eol = feof( $this->handle );
return true;
}
}
How should I apply the 'preg_match' to update this line of the code? :o
I am being advised as follows on line 146.
Deprecated: Function eregi() is deprecated in C:\wamp\www\newsletter\wespa_php_newsletter_v3\inc\csvfile.php on line 146
Line 146 is identified in the code below -
function open( $mode )
// opens the data source
{
if ( ! $this->handle = fopen( $this->name, $mode ) )
{
return false;
}
else
{
// lock file if opened for write mode
Line 146 = if ( eregi( "a|w|\+", $mode ) )
{ flock( $this->handle, 2); }
$this->eol = feof( $this->handle );
return true;
}
}
How should I apply the 'preg_match' to update this line of the code? :o