<body> <form id = "form1" name = "form1" method = "post" action = ""> <p> <label for = "body"> </ label> <textarea name = "body" id = "body" cols = "45" rows = "5"> </ textarea> </ p> <p> <input type = "submit" name = "button" id = "button" value = "Submit" /> </ p> </ form> </ body> </ html> <? if ($ _post) { $ body = $ _post ['body']; preg_match_all (/ src | src) = ["| '|] {0,} ((. *). (gif | jpg | jpeg | png | bmp)) / isu", $ body, $ array); if ($ array) { echo 'get the picture address'; print_r ($ array); } else { echo 'article content does not exist in the effective image address'; } }
/ * Test input
Here is www.jzread.com to provide you with a regular access to the contents of the article in the picture address code is as follows <img src = / get_pic / 2010/03 / 20100811004403298.gif /> fdsafdsafsa result: Get image address array ( [0] => array ( [0] => src = / get_pic / 2010/03 / 20100811004403298.gif )
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.