php - $html_string 中的高级 URL
问题描述
好的,所以现在我有这个 URL,它工作得很好:
$html_string = file_get_contents('https://www.123.com/' . $_GET["ticket"]);
我想要做的是在 URL 之间插入 $_GET 。
这就是我的意思:
('https://www.123.com/' . $_GET["ticket"] /url-continues-here);
我已经尝试了一切,但找不到任何解决方案如何在没有错误的情况下做到这一点。
解决方案
首先连接两个字符串,然后使用file_get_contents()
$html_string = 'https://www.123.com/' . $_GET["ticket"] . '/url-continues-here';
file_get_content($html_string);
推荐阅读
- wordpress-rest-api - WP REST API 的授权标头格式错误 WP JWT 身份验证
- c# - 使用命令行获取 ProcessId
- c++ - 在 Windows 用户模式驱动程序中使用 C++ 标准库
- scala - 使用预凝胶寻找循环
- javascript - 按字符串从对象中提取数据
- javascript - 带有 QueryString 的 URL 未命中 MVC 控制器方法
- sql - 解析第一个中间名和姓氏
- python - Django-REST-Framework:ForeignKey 实例未传递给 valid_data
- xamarin.android - 为面向 API 28 的 Xamarin.Android 项目构建管道
- bash - 如何创建安装程序 bash 脚本?