请教各位大神改版后的四六级总分怎么用正则表达式获取(旧版的我会获取)
这是四六级网站
<table border="0" align="center" cellpadding="0" cellspacing="6" class="cetTable"><br /> <tr><br /> <th>姓名:</th><br /> <td>赵阳</td><br /> </tr><br /> <tr><br /> <th>学校:</th><br /> <td>长春中医药大学</td><br /> </tr><br /> <tr><br /> <th>考试类别:</th><br /> <td>英语四级</td><br /> </tr><br /> <tr><br /> <th>准考证号:</th><br /> <td>220090132112529</td><br /> </tr><br /> <tr><br /> <th>考试时间:</th><br /> <td>2013年12月</td><br /> </tr><br /> <tr><br /> <th valign="top">总分:</th><br /> <td valign="top" class="fontBold"><br /> <span class="colorRed"><br /> <br /> 0<br /> <br /> </span><br /> <br /> <br /><span class="color666">听力:</span><br /> <br /> 000<br /> <br /> <br /><span class="color666">阅读:</span><br /> <br /> 000<br /> <br /> <br /> <br /><span class="color666">写作与翻译:</span><br /> <br /> 000<br /> <br /> </td><br /> </tr><br /></table>
这是我的代码
$a = curl_exec($ch);<br /> $match="#<td>(.*)</td>#";<br /> //$match="#<span>(.*)</span>#";<br />preg_match_all($match,$a,$b);<br />$yourname= $b[1][0];<br />$school= $b[1][1];<br />$cet= $b[1][2];<br />$c= $b[1][5];//分数<br />$score=strip_tags($c);<br />$score=str_replace(" ","",$score); <br /> return array('school'=>$school,'name'=>$yourname,'cet'=>$cet,'score'=>$score);
其他的都能获取到 就总分那里获取不到
------解决方案--------------------
$a =<<< TXT<br /><table border="0" align="center" cellpadding="0" cellspacing="6" class="cetTable"><br /> <tr><br /> <th>姓名:</th><br /> <td>赵阳</td><br /> </tr><br /> <tr><br /> <th>学校:</th><br /> <td>长春中医药大学</td><br /> </tr><br /> <tr><br /> <th>考试类别:</th><br /> <td>英语四级</td><br /> </tr><br /> <tr><br /> <th>准考证号:</th><br /> <td>220090132112529</td><br /> </tr><br /> <tr><br /> <th>考试时间:</th><br /> <td>2013年12月</td><br /> </tr><br /> <tr><br /> <th valign="top">总分:</th><br /> <td valign="top" class="fontBold"><br /> <span class="colorRed"><br /> <br /> 0<br /> <br /> </span><br /> <br /> <br /><span class="color666">听力:</span><br /> <br /> 000<br /> <br /> <br /><span class="color666">阅读:</span><br /> <br /> 000<br /> <br /> <br /> <br /><span class="color666">写作与翻译:</span><br /> <br /> 000<br /> <br /> </td><br /> </tr><br /></table><br />TXT;<br />$match="#<t[hd].*?>(.*?)</t[hd]>#is";<br />preg_match_all($match,$a,$b);<br />$b[1][11] = preg_replace('/\s/', '', strip_tags($b[1][11]));<br />print_r($b[1]);Array
(
[0] => 姓名:
[1] => 赵阳

thesecrettokeepingaphp-poweredwebsterunningsmootlyunderheavyloadinvolvesseveralkeystrategies:1)emform opcodecoduceSciptionexecutiontime、2)aatabasequerycachingwithiThing withiThistolessendavasoload、

コードをより明確かつ維持しやすくするため、依存関係が関心(DI)に注意する必要があります。 1)DIは、クラスを切り離すことにより、よりモジュール化されます。2)テストとコードの柔軟性の利便性を向上させ、3)DIコンテナを使用して複雑な依存関係を管理しますが、パフォーマンスの影響と円形の依存関係に注意してください。

はい、最適化されたAphPossibleandessention.1)CachingingusapCutoredatedAtabaseload.2)最適化、効率的なQueries、およびConnectionPooling.3)EnhcodeCodewithBultinctions、Avoididingglobalbariables、およびUsingopcodeching

keyStrategIestsoSificlyvoostphpappliceperformanceare:1)useopcodecachinglikeToreexecutiontime、2)最適化abaseの相互作用とプロペラインデックス、3)3)構成

aphpDependencyInjectionContaineriSATOULTAINATINAGECLASSDEPTINCIES、強化測定性、テスト可能性、および維持可能性。

SELECT DEPENTENCINGINOFCENT(DI)大規模なアプリケーションの場合、ServicElocatorは小さなプロジェクトまたはプロトタイプに適しています。 1)DIは、コンストラクターインジェクションを通じてコードのテスト可能性とモジュール性を改善します。 2)ServiceLocatorは、センター登録を通じてサービスを取得します。これは便利ですが、コードカップリングの増加につながる可能性があります。

phpapplicationscanbeoptimizedforspeedandEfficiencyby:1)enabingopcacheinphp.ini、2)PreparedStatementswithpordatabasequeriesを使用して、3)LoopswithArray_filterandarray_mapfordataprocessing、4)の構成ngincasaSearverseproxy、5)

PHPemailvalidationinvolvesthreesteps:1)Formatvalidationusingregularexpressionstochecktheemailformat;2)DNSvalidationtoensurethedomainhasavalidMXrecord;3)SMTPvalidation,themostthoroughmethod,whichchecksifthemailboxexistsbyconnectingtotheSMTPserver.Impl


ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

Video Face Swap
完全無料の AI 顔交換ツールを使用して、あらゆるビデオの顔を簡単に交換できます。

人気の記事

ホットツール

Dreamweaver Mac版
ビジュアル Web 開発ツール

SublimeText3 英語版
推奨: Win バージョン、コードプロンプトをサポート!

ZendStudio 13.5.1 Mac
強力な PHP 統合開発環境

ゼンドスタジオ 13.0.1
強力な PHP 統合開発環境

ドリームウィーバー CS6
ビジュアル Web 開発ツール
