<?php
$html ='
<section class="v-content-wrap full-page has_banner">
<iframe src="//localhost/ho-sua.com/content/game-generator-ho-sua/user_files/2189/index.html" width="100%" height="100%" frameBorder="0"></iframe>
</section>
';
$html = preg_replace('/<iframe(.*)src="(.*)"(.*)>/isU','<iframe$1src="https://google.com"$3>',$page_html,1);
echo $html;
參考
https://stackoverflow.com/questions/9058158/using-php-preg-replace-to-change-html-links-href-attribute
如果文章對您很有幫助
請我喝杯咖啡吧
Bitcoin 比特幣錢包:
38ieWXhURt27br9XrDoCeo4eruzKyi8QKs
Post Views: 363