国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

php - Design issues with sensitive word filtering function? ?
高洛峰
高洛峰 2017-06-07 09:23:03
0
1
744

is to filter the content submitted by the user for sensitive words. If the sensitive words are stored in the database, write a sensitive word filtering function (query the sensitive words from the database).
If the user submits content, it will be called This function means that the database must be queried every time, so the design feels unreasonable.

I would like to ask how to design the sensitive word filtering more rationally. Is it okay to write the sensitive words into the configuration file of the project and not store them in the database?

高洛峰
高洛峰

擁有18年軟件開(kāi)發(fā)和IT教學(xué)經(jīng)驗(yàn)。曾任多家上市公司技術(shù)總監(jiān)、架構(gòu)師、項(xiàng)目經(jīng)理、高級(jí)軟件工程師等職務(wù)。 網(wǎng)絡(luò)人氣名人講師,...

reply all(1)
僅有的幸福

Yes, you can separate the inscriptions by separators and save them into a text file, or directly use a script to generate json and save it into the file. When reading, parse and read directly.
There is also a faster way. If there are not too many inscriptions (only a few hundred to 2 or 3 thousand), you can directly save them in a configuration file in the form of an array and return an array. The array is retrieved directly each time.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template