简体   繁体   中英

My php can't find 'normalizer_normalize()' function, why?

How come I can't use normalizer function?

I am using it exactly as I should, ie: $var = normalizer_normalize($str);

I get php error: no such function!

Here is the code:

 $headline= mysql_real_escape_string($_POST['headline']);
 $ad_id_string=normalizer_normalize($headline);

Thanks

From the docs , normalizer_normalize was included in PHP as of version 5.3.0. Prior to that, it was available as a PECL extension. To build it as part of PHP, you'll need to install internationalization support.

If you need to provide your own equivalent to the Normalizer class, strtr() would be a good option. The only downside is that you will need to provide your own character strings to translate to / from.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM