The Codeigniter shopping cart class cannot add a Chinese solution. Some may find that the Codeigniter shopping cart class cannot add Chinese characters. After I have been searching for N for a long time, I found that the following code restricts the input of Chinese characters. I will introduce it to you below. A friend who modified systemli may find that the Codeigniter shopping cart class cannot add Chinese characters. After I have been searching for N for a long time, I found that the following code restricts the input of Chinese characters. I will introduce it to you below.
Modify systemlibrariesCart. php and comment out the judgment of the product name in line 186-190:
| The code is as follows: |
|
/* If (! Preg_match ("/^ [". $ this-> product_name_rules. "] + $/I", $ items ['name']) { Log_message ('error', 'an invalid name was submitted as the product name :'. $ items ['name']. 'The name can only contain alpha-numeric characters, dashes, underscores, colons, and spaces '); Return FALSE; } */ |
However, deleting a regular expression is not the best solution. you can simply change the regular expression matching to Chinese. I will not introduce it to the php Tutorial channel.
The shopping cart class cannot be added with Chinese characters. After I have been searching for N long, I found that the following code restricts the input of Chinese characters. I will introduce it to you below. Modify systemli...