<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_51095"> 这个类可以比较两个网址,类忽略查询参数的顺序,所以它能够确定的URL<br> <div class="blockcode"> <div id="code_foT"><ol> <li>$obj = new UrlDiffer("http://www.codepearl.com/?foo=bar&cake=lie&you=monster&beer=good&speech=free&breaking=bad&task=edit","http://www.codepearl.com/?&speech=free&beer=good&aperture=science&task=add&foo=bar&you=here&breaking=over",true);</li> <li>$obj->getDifference();</li> </ol></div> <em onclick="copycode($('code_foT'));">复制代码</em> </div> <img src="http://img.it-home.org/data/attachment/forum/2015pic/25115025_DKGT.jpg" alt="PHP比較兩個網址的差異" > </td></tr></table> <div id="comment_51095" class="cm"> </div> <div id="post_rate_div_51095"></div> <br><br>