Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jan 2008
    Location
    malaysia
    Posts
    7
    Thanks
    3
    Thanked 0 Times in 0 Posts

    aZdgdating install.php script error message...

    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;
    }

  • #2
    New to the CF scene
    Join Date
    Jan 2008
    Location
    malaysia
    Posts
    7
    Thanks
    3
    Thanked 0 Times in 0 Posts

    what is unknown modifier in this script???

    Quote Originally Posted by theriver View Post
    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.

  • #3
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    $ 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: /.\/$/
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •