如何从httpd.conf获取ServerAdmin电子邮件变量


How to get ServerAdmin email variable from httpd.conf

如何从examplep中的httpd.conf获取ServerAdmin电子邮件我已经设置了

ServerAdmin test@gmail.com

D:'xampp'apache'conf'httpd.conf中;但我不知道如何在php中访问ServerAdmin。

我想在我的邮件中使用ServerAdmin电子邮件

$this->load->library('tes_email');
$this->test_email->from("test@gmail.com");
$this->test_email->to();//i don't know how to pass serverAdmin email in to
$this->test_email->subject("test test");
$this->test_email->message("test subject");
$this->test_email->send();

请帮帮我。

它列在附加到密钥SERVER_ADMIN的服务器环境变量下。

来自$_SERVER全局变量的文档:

'SERVER_ADMIN'

中的SERVER_ADMIN(对于Apache)指令给定的值web服务器配置文件。如果脚本在虚拟机上运行主机,这将是为该虚拟主机定义的值。