I'm using
simplexml_load_file($url)
to read an rss feed.
Sample: 'If you start with nothing and end up with nothing, there's nothing lost.
When rss item contains single quote it will display as ’ , when I output to screen.
How will be a good way to sanitize rss feed input?
我能够通过首先发送此标头和输出来解决上述问题:
header('Content-Type:text/html; charset=UTF-8');
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.