0
我试图在php var中替换一个单词,但它并不按我尝试的方式工作。在php中替换word var
这里是我的代码:
iframe.src = '<?php echo $app->url("Widget:iframeContent") ?>&domain=' + document.domain;
它会返回此:
http://127.0.0.1/livechat/php/app.php?widget-iframe-content&domain=' + document.domain
这里是我的尝试:
iframe.src = '<?php echo str_replace("http", "https", $app->url)("Widget:iframeContent") ?>&domain=' + document.domain;
我想要做的就是更换HTTP与https,但我找不到办法。
你找不到'str_replace()'函数? – Barmar
什么是“我尝试的方式”?我没有看到任何试图替换一个字。 – Barmar