Eroare preg_match() Unknown modifier
Scris: Lun Noi 23, 2015
imi da eroarea asta in fisierul system.php la linia 7222
iar eu la linia asta am urmatoarea linie
care face parte din functia asta,ma poti ajuta sa rezolv eroarea?
Cod: Selectaţi tot
Warning: preg_match(): Unknown modifier '(' in /home/u854531772/public_html/dev/inc/system.php on line 7222
Cod: Selectaţi tot
preg_match($pattern, $url, $matches);
Cod: Selectaţi tot
function make_clickable($ret) {
$ret = ' ' . $ret;
// in testing, using arrays here was found to be faster
$ret = preg_replace_callback('#([\s>])([\w]+?://[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]*)#is', '_make_url_clickable_cb', $ret);
$ret = preg_replace_callback('#([\s>])((www|ftp)\.[\w\\x80-\\xff\#$%&~/.\-;:=,?@\[\]+]*)#is', '_make_web_ftp_clickable_cb', $ret);
$ret = preg_replace_callback('#([\s>])([.0-9a-z_+-]+)@(([0-9a-z-]+\.)+[0-9a-z]{2,})#i', '_make_email_clickable_cb', $ret);
$pattern = '/(?:youtube.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu.be/)([^"&?/ ]{11})/';
preg_match($pattern, $url, $matches);
// this one is not in an array because we need it to run last, for cleanup of accidental links within links
$ret = preg_replace("#(<a( [^>]+?>|>))<a [^>]+?>([^>]+?)</a></a>#i", "$1$3</a>", $ret);
$ret = trim($ret);
return $ret;
}