''''的问题 [英] A problem with '"'
问题描述
我编写了一段代码并且无法确定哪里出了问题,代码将
读取文件内容并剪切所有电子邮件,然后回复它们,>
但我对'''''charecter有疑问我认为..
看看:
******** ********************
<?php
$ url =" http:// www .bihstudenti.com / kontakt.php" ;;
$ lines = file_get_contents($ url);
$ done = explode(" @",$ lines);
for($ i = 0; $ i< count($ done)+1; $ i ++)
{
$ j = $ i + 1;
$ a = strrpos($ done [$ i],":");
$ b = strrpos($ done [$ i] ,">");
$ c = strpos($ done [$ j],chr(34));
$ d = strpos($ done [$ j],"<");
$ front = $ done [$ i];
$ back = $ done [$ j];
if($ a> $ b){
if($ c< $ d){
echo" Line $ i
" .substr($ front,strrpos($ front,":")+ 1)。" @" .substr($ back,0,strpos($ back,chr( 34)))。< br>" ;;
} else {
echo" Line $ i
"。 substr($ front,strrpos($ front,":")+ 1)。" @" .substr($ back,0,strpos($ back,"<"))。"< ; br>" ;;
}
}否则{
if($ c< $ d){
echoLine $ i
.substr($ front,strrpos($ front,">")+ 1)。" @" .substr($ back, 0,strpos($ back,chr(34)))。" br>" ;;
} else {
echo" Line $ i
" .substr($ front,strrpos($ front,">")+ 1)。" @" .substr($ back,0,strpos($ back," <"))。< br>" ;;
}
}
}
?>
****************************
我是查看 www.bihstudenti.com/kontakt.php 内容..
请帮忙,做任何一个有线索有什么问题..
I have written a code and can''t figure what is wrong, the code will
read a content of a file and cut all the emails from it,then echo them,
but I have a problem with ''"'' charecter I think..
Take a look:
****************************
<?php
$url="http://www.bihstudenti.com/kontakt.php";
$lines = file_get_contents($url);
$done=explode("@",$lines);
for($i=0;$i<count($done)+1;$i++)
{
$j=$i+1;
$a=strrpos($done[$i],":");
$b=strrpos($done[$i],">");
$c=strpos($done[$j],chr(34));
$d=strpos($done[$j],"<");
$front=$done[$i];
$back=$done[$j];
if($a>$b){
if($c<$d){
echo "Line $i
".substr($front,strrpos($front,":")+1)."@".substr( $back,0,strpos($back,chr(34)))."<br>";
}else{
echo "Line $i
".substr($front,strrpos($front,":")+1)."@".substr( $back,0,strpos($back,"<"))."<br>";
}
}else{
if($c<$d){
echo "Line $i
".substr($front,strrpos($front,">")+1)."@".substr( $back,0,strpos($back,chr(34)))."<br>";
}else{
echo "Line $i
".substr($front,strrpos($front,">")+1)."@".substr( $back,0,strpos($back,"<"))."<br>";
}
}
}
?>
****************************
I am looking at www.bihstudenti.com/kontakt.php content..
Please help, do any one have a clue what is wrong..
推荐答案
url =" http://www.bihstudenti.com/kontakt.php" ;;
url="http://www.bihstudenti.com/kontakt.php";
lines = file_get_contents (
lines = file_get_contents(
url);
url);
这篇关于''''的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!