PHP尝试获取http:// getURL,而不是将$ _ ['getURL']分配给的内容

问题描述 投票:-1回答:1
$_['getURL'] = 'http://example.com/hello';
$anothervariable = $this->language->get('getURL');

API错误格式:无法解析主机:getURL

为什么要去http://getURL/而不是http://example.com/hello

任何线索? TIA

php opencart
1个回答
0
投票

->get('getURL')中,'getUrl'只是一个静态硬编码字符串,它没有引用任何其他变量。而且我不确定$_['getURL']应该是什么。

此:

$url = 'http://example.com/hello';
$anothervariable = $this->language->get($url);

可能更有意义-声明一个变量,然后将其传递给“ get”函数。 (我假设“ get”功能是尝试访问URL的功能。)

© www.soinside.com 2019 - 2024. All rights reserved.