gpt4 book ai didi

带有密码保护 url 的 php simplexml_load_file()

转载 作者:塔克拉玛干 更新时间:2023-11-03 06:04:14 26 4
gpt4 key购买 nike

知道答案的人的简单问题...

$xml = simplexml_load_file("http://url/path/file.xml");

此 url 受 .htaccess 保护,如何将登录名/密码作为参数传递给函数?

最佳答案

$xml = simplexml_load_file("http://username:password@url/path/file.xml");

试试看 :)

关于带有密码保护 url 的 php simplexml_load_file(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2958766/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com