[英]session for sub-domain.example.com using PHP
我已经设置了.htaccess来将me.example.com重定向到example.com/fun/index.php。 此index.php有一个会话。 当用户在me.example.com/index.php上时,会话永远不会启用,但会在example.com/fun/index.php上启用。
如何在me.example.com/index.php路径上启用会话。
ini_set('session.cookie_domain', '.example.com' );
session_set_cookie_params(3600, '/', '.example.com');
session_start();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.