配置 '餅乾:: $鹽' 在Kohana的文檔的這一部分:(http://kohanaframework.org/3.1/guide/kohana/cookies),它說我可以找到如何Kohana的
Cookie::$salt = 'foobar';
在bootstrap.php中。
我沒有在那裏看到它。我只是變得厚重,還是有更好的方法?
配置 '餅乾:: $鹽' 在Kohana的文檔的這一部分:(http://kohanaframework.org/3.1/guide/kohana/cookies),它說我可以找到如何Kohana的
Cookie::$salt = 'foobar';
在bootstrap.php中。
我沒有在那裏看到它。我只是變得厚重,還是有更好的方法?
默認情況下,它不在bootstrap.php file中。我已將它添加到文件中,在Kohana::modules
之後和路線之前。
貌似配置的最新版本3.3.4(在寫作的時間)更新
134 /**
135 * Cookie Salt
136 * @see http://kohanaframework.org/3.3/guide/kohana/cookies
137 *
138 * If you have not defined a cookie salt in your Cookie class then
139 * uncomment the line below and define a preferrably long salt.
140 */
141 // Cookie::$salt = NULL;
142 Cookie::$salt = 'LOASWnL7A1WKQMk1JALCP1H5BMelyIPQNVdXiGsbEEVhVtyApGsFC6LyINUsDHl1';
補充說,到第90行。我改變了「foobar」如果東西真的fubared。防爆。 Cookie :: $ salt ='9urhkc74kws1 @ 3fdksyYDelsicdkeakducjlwadc9#0'; – ndasusers 2013-09-05 04:03:17