[英]How to setup base url in zend framework 2?
In my application there I need to send mail, which contains my application's link, so that user will click the link and navigate to the application directly. 在我的应用程序中,我需要发送包含应用程序链接的邮件,以便用户单击该链接并直接导航到该应用程序。
I want to use something in global configuration so that, for development and production I only need to change the configuration file. 我想在全局配置中使用某些东西,这样,对于开发和生产,我只需要更改配置文件。
You can put file in global config directory 您可以将文件放在全局配置目录中
return array(
'url' => 'your_url'
);
And then 接着
$config = new Zend\Config\Config(include 'config/yourConfig.php');
$config->url;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.