मुझे लगता है कि अशक्त लौटने जब मैं कोशिश करते हैं और उत्पादन सर्वर पर इसका इस्तेमाल एक PHP आवेदन में कुछ कोड है, लेकिन यह विकास सर्वर पर ठीक काम करता है।क्या preg_match_all `झंडा u` पर निर्भर है?
// use the regex unicode support to separate the UTF-8 characters into an array
preg_match_all('/./us', $str, $match);
क्या u
ध्वज पर निर्भर है: यहाँ कोड की पंक्ति है? मैं mb_string
सक्षम है और विकलांग के साथ परीक्षण किया और इसे प्रभावित करने के लिए नहीं लगता है।
त्रुटि मैं हो रही है
preg_match_all: Compilation failed: unknown option bit(s) set at offset -1
अधिक जानकारी
इस prodction सर्वर पर विकल्पों में से एक है:
'--with-pcre-regex=/opt/pcre'
और यहाँ पिक्चर सेक्शन
हैंPicture.png http://img829.imageshack.us/img829/8524/pictureke.png
मुझे इस पर विश्वास टिप्पणी @Wesley का हवाला देते हुए है:
In order process UTF-8 strings, you must build PCRE to include UTF-8
support in the code, and, in addition, you must call pcre_compile()
with the PCRE_UTF8 option flag, or the pattern must start with the
sequence (*UTF8). When either of these is the case, both the pattern
and any subject strings that are matched against it are treated as
UTF-8 strings instead of strings of 1-byte characters.
कैसे "PCRE UTF-8 शामिल करने के लिए का निर्माण करने के लिए" पर कोई लिंक या सुझावों?
परिणाम pcretest -C
PCRE version 6.6 06-Feb-2006
Compiled with
UTF-8 support
Unicode properties support
Newline character is LF
Internal link size = 2
POSIX malloc threshold = 10
Default match limit = 10000000
Default recursion depth limit = 10000000
Match recursion uses stack
आप एक चर या एक निरंतर मूल्य के खिलाफ परीक्षण कर रहे हैं? आपके उदाहरण में एक चर है, मुझे लगता है कि आपको यह सुनिश्चित करने के लिए निरंतर परीक्षण करना चाहिए कि आप देव और लाइव पर ऐसा कर रहे हैं। – hakre
http://php.net/manual/en/reference.pcre.pattern.modifiers.php, टिप्पणियां भी देखें। –