Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
当我使用直接链接时,PHP Include给了我错误_Php_File_Hyperlink_Get_Include - Fatal编程技术网

当我使用直接链接时,PHP Include给了我错误

当我使用直接链接时,PHP Include给了我错误,php,file,hyperlink,get,include,Php,File,Hyperlink,Get,Include,我正在尝试使用phpinclude包含一个php文件,问题是我需要在URL中使用变量。。。我知道我无法使用相对链接执行此操作,因此我使用直接链接,但出现以下错误: 我想知道是否有人能告诉我我做错了什么 这里是包含的代码: <?php include 'http://www.procapturemarketing.net/Scripts/PCMSSystemsOwned.php?ref=NMVT'; ?> <?php $systems = explode(', ',$ro

我正在尝试使用php
include
包含一个php文件,问题是我需要在URL中使用变量。。。我知道我无法使用相对链接执行此操作,因此我使用直接链接,但出现以下错误:

我想知道是否有人能告诉我我做错了什么

这里是包含的
代码:

<?php

include 'http://www.procapturemarketing.net/Scripts/PCMSSystemsOwned.php?ref=NMVT';

?>
<?php

$systems = explode(', ',$row_rsUsers['Systems']);

if (in_array("Empower", $systems) and $_GET['ref'] != "Empower") { ?>

<li onclick="location.href='nmvt/Home.php';" class="nmvtli"><a href="nmvt/Home.php">Empower System</a></li>

<?php } if (in_array("MCA", $systems) and $_GET['ref'] != "MCA") { ?>

<li onclick="location.href='nmvt/Home.php';" class="nmvtli"><a href="nmvt/Home.php">MCA System</a></li>

<?php } if (in_array("Neucopia", $systems) and $_GET['ref'] != "Neucopia") { ?>

<li onclick="location.href='nmvt/Home.php';" class="nmvtli"><a href="nmvt/Home.php">Neucopia System</a></li>

<?php } if (in_array("NMVT", $systems) and $_GET['ref'] != "NMVT") { ?>

<li onclick="location.href='nmvt/Home.php';" class="nmvtli"><a href="nmvt/Home.php">NMVT System</a></li>

<?php } ?>
$colname_rsUsers = "-1";
if (isset($_GET['MM_Username'])) {
  $colname_rsUsers = $_GET['MM_Username'];
}
mysql_select_db($database_myBackOfficeConn, $myBackOfficeConn);
$query_rsUsers = sprintf("SELECT * FROM Users WHERE Username = %s", GetSQLValueString($colname_rsUsers, "text"));
$rsUsers = mysql_query($query_rsUsers, $myBackOfficeConn) or die(mysql_error());
$row_rsUsers = mysql_fetch_assoc($rsUsers);

我留下了所有可能导致问题的东西。好吧,PHP清楚地告诉您出了什么问题:您试图在不允许的情况下包含远程文件(相应的
ini
规则被禁用)。因此,要么启用它,或者,更好的是,想想你为什么需要这个。我的.ini文件无法使它工作,我更新了allow\u url\u fopen,并且没有工作。我还使用了
ini\u集(allow\u url\u fopen,true);ini设置(允许url包含,true),但这也不起作用