仅从 url 获取所有可见文本
Get only all the visible text from a url
我想从 url 中获取所有可见文本。我需要清除所有 html 代码并获取纯文本。
过程不一定要完美,但我希望文字尽量干净
你知道有什么方法可以让它变得相对简单吗?
谢谢!
贾维.
看看 strip_tags 函数。
strip_tags — Strip HTML and PHP tags from a string
它可以完成这项工作。
您可以使用 $_GET['the names in there']
获得 url。
如果你想获得所有这些,只需重建你知道的 $_GET['name used in the url']
东西。
function get_url(){ return $_GET['name userd'];}
并使用类似这样的东西
我想从 url 中获取所有可见文本。我需要清除所有 html 代码并获取纯文本。
过程不一定要完美,但我希望文字尽量干净
你知道有什么方法可以让它变得相对简单吗?
谢谢! 贾维.
看看 strip_tags 函数。
strip_tags — Strip HTML and PHP tags from a string
它可以完成这项工作。
您可以使用 $_GET['the names in there']
获得 url。
如果你想获得所有这些,只需重建你知道的 $_GET['name used in the url']
东西。
function get_url(){ return $_GET['name userd'];}
并使用类似这样的东西