【发布时间】:2022-02-07 18:01:16
【问题描述】:
希望大家身体健康!
我尝试了str_replace,但根本没有成功..!
我想要的是从整个文本中删除所有这些",因为我不想弄乱脚本,而这些 HTML 特殊字符真的弄乱了它并且它现在不起作用,因为这些太多了,所以如何用 "" nothing 替换所有这些:
#!/usr/bin/perl
# This script is NOT written or modified by me, I only copy pasted it from the internet.
# It was First originally Written by chudy_fernandez@yahoo.com
# & Have been modified by various persons over the net to fix/add various functions.
# Like For Example modified by member of comstuff.net to satisfy common and dynamic content.
# th30nly @comstuff.net a.k.a invisible_theater , Syaifudin JW , Ucok Karnadi and possibly other people too.
# For more info, http://wiki.squid-cache.org/ConfigExamples/DynamicContent/YouTube
# Syed Jahanzaib / aacable@hotmail.com
# http://aacable.wordpress.com/2012/01/19/youtube-caching-with-squid-2-7-using-storeurl-pl/
#######################
# Special thanks to some indonesian friends who provided some updates,
## UPDATED on 20 January, 2014 / Syed Jahanzaib
#####################
#### REFERENCES ##### http://www2.fh-lausitz.de/launic/comp/misc/squid/projekt_youtube/
#####################
#####################
use IO::File;
$|=1;
STDOUT->autoflush(1);
$debug=1; ## recommended:0
$bypassallrules=0; ## recommended:0
$sucks=""; ## unused
$sucks="sucks" if ($debug>=1);
$timenow="";
$printtimenow=1; ## print timenow: 0|1
my $logfile = '/tmp/storeurl.log';
【问题讨论】:
-
哦,这么多文字很难阅读。
-
那么,
str_replace(array('&', 'amp;', 'quot;'), '', $s)没有用吗? ideone.com/8qEvXx -
我根本不相信这是 PHP。请删除此问题的 PHP 标记。
-
@Nitin :我只想删除所有这些 HTML 特殊字符,不管哪个有效..! :D
-
您不是在删除多个项目,而是在删除一个系列。另一个重复的 Srtubnexz 怎么样