简体   繁体   English

无法使用 $_GET 在服务器内加载文件

[英]Failed to load file inside server with $_GET

I've been trying to get inside of my folder a url but i'm getting a error like this i've tryed with file_get_contents but isn't working anymore我一直试图进入我的文件夹 url 但我遇到了这样的错误我已经尝试使用 file_get_contents 但不再工作了

Warning: include(/home/vol2_3/*****/*****/htdocs/new/td.php?r=8&ids=309834): failed to open stream: No such file or directory in /home/vol2_3/*****/*****/htdocs/new/test.php on line 146

I've been trying like this and with file_get_contents but isn't working我一直在尝试这样并使用 file_get_contents 但没有工作

include($_SERVER['DOCUMENT_ROOT']."/new/td.php?r=8&ids=".$info["id"]);

You cannot pass query string in the include() function.您不能在 include() function 中传递查询字符串。 This function requires the PHP file path to passed, not an URL.此 function 需要 PHP 文件路径才能通过,而不是 URL。 This will work:这将起作用:

include($_SERVER['DOCUMENT_ROOT']."/new/td.php");

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在服务器中获取或加载数据文件 - get or load data file in server 尝试在浏览器中的 html 文件中加载 functions.js 文件时出现 GET 404 错误(*使用节点 js 作为服务器) - GET 404 Error When Trying to Load a functions.js File Inside an html File in Browser (*using node js as server) 在服务器上加载资源失败? - Failed to load resource when on server? 无法获取本地html文件与本地Express Node.js服务器对话。 无法加载资源:net :: ERR_CONNECTION_REFUSED - Cannot get local html file to talk to local express Node.js server. Failed to load resource: net::ERR_CONNECTION_REFUSED 获取加载失败的网站的 URL - Get URL of the website that failed to load 尝试从我的节点服务器加载脚本文件-获取404 - Trying to load a script file from my node server - get 404 RequiredJS无法加载JS文件 - RequiredJS failed to Load a JS file JS文件无法在CPanel中加载 - JS file failed to load in CPanel 如何修复此错误:localhost/:1 加载资源失败:服务器响应状态为 404(未找到),无法获取 / - How do i fix this error: localhost/:1 Failed to load resource: the server responded with a status of 404 (Not Found), Cannot Get / 加载资源失败:查找文件时服务器响应状态为404(未找到) - Failed to load resource: the server responded with a status of 404 (Not Found) when locating a file
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM