Difficulty: I used PHP to read the content in a MYSQL field. how can I output the numbers to the image content?

Source: Internet
Author: User
Difficulty: I used PHP to read the content in a MYSQL field. how can I output the numbers in the text to the image content! PHP + MYSQL problem: the content of this article is included in a MYSQL field. to prevent copying and collection, I plan to output the "Arabic" number in the content to the image format. my idea is: using PHP to read text first: the article content is in a MYSQL field, using PHP to read the content, how to output the numbers in it with the image content!
PHP + MYSQL problems:
The content of this article is stored in a MYSQL field. to prevent copying and collection, I plan to output the "Arabic" numbers in the content as the image format. my thoughts are as follows: use PHP to read the content of the article first, and then determine the number in it. any number is displayed as an image! Effect


Difficulties: there are more than one number in an article, some of which are hundreds of digits, and some of which contain decimal points, such as 12.3. how can we output so many numbers?

Tip: The article introduces market conditions. all numbers are followed by a Chinese character "yuan", such as 15.6 yuan, 14-17 yuan, 48 yuan, etc.

Can I convert several characters before "yuan" into image output by judging ??

I didn't score much. I only scored 25 points in total. I gave it all!
------ Solution --------------------
$ Con = <
 
The price for Guangxi is 14-17.5 RMB
Retail price in Guangdong: 23.5 RMB
Sichuan retail price 13 yuan
Inner Mongolia retail price 0.14 yuan
Context;
$ Rep = preg_replace ('/([\ d \.-] +) RMB/I', '$', $ con );
Var_dump ($ rep );

------ Solution --------------------
You save a series of digital images in the image directory ....
Then
$ Text = preg_replace ('/\ d/', '', $ text );

------ Solution --------------------
Invalid characters are added.
Error 500 is reported because the error display function is not enabled.
$ Con = <
 
Wu Zheng: supply of goods is reduced, and the price is still relatively high. Currently, there are bulk goods on the market. The prices of medium-flower varieties are-52 yuan, and those of small flowers and big flowers are 37-42 yuan.
Gardenia: walking fast, the current Red Price is 28-32 yuan.
Jing Xi: wild products are reduced, family products are insufficient, and the prices of general products are relatively smooth recently. Currently, the price of general products is 6-yuan.
Coriander: in recent years, there have been few varieties of grass, and there are rare commodities in the market. in this period, there are sporadic moves, and the prices of goods are 7-11 yuan.
Andrographine: a large quantity of products, fast migration, and a transaction price of 7-8 yuan in batches. The inventory of Houttuynia cordata is adequate, sporadic fast, the price is stable, the goods are now 6-8 yuan.
Honeysuckle: there are plenty of goods in the city, goods are sporadic movements, the price is stable, the current price of real estate goods is 45-60 yuan.
Safflower: there is a small deal, the price is-97 yuan. The general price of the cake is-yuan. Lily does not move much, the price is stable at-45 yuan.
Xin Yi Hua: walking around in general, the price is stable, big flowers for 30-32 yuan, small flowers for 35-37 yuan.
Dilong: there are small batches of supply into the market, goods are mainly sold in sporadic cases, Guangdi Dragon grand open for-yuan, open for-yuan.
Beehive: the market price of soft goods is stable at-yuan.
Shuo: the supply is not much, and the movement is not fast, the price is stable, and the current clean water product is-yuan.
RMB 2.5-2.7 yuan, RMB 2.2-2.4 yuan, and RMB 0.9-1.1 yuan.
Sheep: The market is low, and the price is stable at-yuan.
Dangshen: The transaction volume is reduced and the price is stable. Currently, the price of white strip is 70-85 yuan, and the price of white strip is-60 yuan.
Xuanjicang: the planting area is reduced. due to the shortage of goods in the market, the trend has become smooth. The current price is 12-14 yuan.
Taized ginseng: the supply is sufficient, and the price is stable at 45-60 yuan in small batches.
Context;
$ Con = preg_replace ('/\ d/', '', $ con );
Var_dump ($ con );

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.