...

View Full Version : aZdgdating install.php script error message...



theriver
10-09-2009, 04:14 AM
While installing the aZdgdatingmedium, the error message appeared:

Warning: preg_match() [function.preg-match]: Unknown modifier '$' in C:\wamp\www\penpal\install.php on line 349
Part of the install.php script is shown here. Could anybody help? Thank you so much.

theriver -" help protect our earth.";)
---------------------------------------------------------------------------------------------------------------------------

case '3':
function check_last_slash($file) {
if (preg_match('/./$/', $file)) return false;
else return true;
}

function cb($ss) {
//$ss = htmlspecialchars(stripslashes($ss));
//$ss = str_replace("\r\n"," <br>","$ss");
//$ss = str_replace("\\","","$ss");
$ss = str_replace("'","&rsquo;","$ss");
$ss = str_replace('"',"&quot;","$ss");
$ss = trim($ss);
return $ss;
}

theriver
10-12-2009, 03:44 AM
While installing the aZdgdatingmedium, the error message appeared:

Warning: preg_match() [function.preg-match]: Unknown modifier '$' in C:\wamp\www\penpal\install.php on line 349
Part of the install.php script is shown here. Could anybody help? Thank you so much.

theriver -" help protect our earth.";)
---------------------------------------------------------------------------------------------------------------------------

case '3':
function check_last_slash($file) {
if (preg_match('/./$/', $file)) return false; else return true;
}

function cb($ss) {
//$ss = htmlspecialchars(stripslashes($ss));
//$ss = str_replace("\r\n"," <br>","$ss");
//$ss = str_replace("\\","","$ss");
$ss = str_replace("'","&rsquo;","$ss");
$ss = str_replace('"',"&quot;","$ss");
$ss = trim($ss);
return $ss;
}

////
I do not understand by...
unknown modifier($) in the script ???
Thanks.

Fou-Lu
10-12-2009, 03:48 AM
$ indicates an endofline modifier. But, when using / followed by a character, its usually a specific pattern modifier (ie: using /i represents insensitive cases, /m allows multiline, etc). Since you're bounding you're pattern using the / character, when it finds the first / it assumes its reached the end of the pattern.
If you're meaning to match the / (the pattern would indicate any character followed by a / to end it), you either need to escape it with \, or choose different boundaries:
Try this for you're pattern: /.\/$/



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum