0

I am trying to pass variable in the url but without success.

In Drupal I have a page with:

require_once 'uploaded_files/individual_funds.php?id=8';

But I get an error: Fatal error: require_once() [function.require]: Failed opening required 'uploaded_files/individual_funds.php?id=8

I understand that Drupal is looking specifically for this url and that why it's not working. But I need to pass the variable into that page. Is there a work around.

4

1 回答 1

1

您只能包含文件。您不能通过 调用它们require,但可以执行以下操作:

$_GET['id'] = 8';
require_once 'uploaded_files/individual_funds.php';

这将为所需文件中的函数设置 getid参数。

于 2012-11-28T15:38:54.120 回答