我正在使用 CakePHP 2.6.7。我想获得以下网址:
www.mydomain.com/OrderFromReseller/82BC1562-22F9-4326-8B4B-370129710E8C
我尝试如下:
$resellerURL = $this->webroot . 'OrderFromReseller/' . $this->request->data['Reseller']['api_key'];
但是当我回显它的值时$resellerURLechos http://orderfromreseller/82BC1562-22F9-4326-8B4B-370129710E8C。
有没有其他方法$this->webroot可以在 cakephp 中正确获取基本 URL?