TypoScript是否有可能获得$ _COOKIE? [英] Is it possible to get $_COOKIE with TypoScript?

查看:89
本文介绍了TypoScript是否有可能获得$ _COOKIE?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

TypoScript中存在获取环境变量 HTTP_COOKIE_VARS 的可能性.已弃用):

In TypoScript exists the possibility to get the environment variable HTTP_COOKIE_VARS (which is deprecated):

10 = TEXT
10.data = global : HTTP_COOKIE_VARS | some_cookie

我从以下网址获得了文档.

但是在我的服务器(PHP 5.3)上,此变量为空!我想这是因为不赞成使用此环境变量.现在,我用光了所有选项,没有使用扩展名,用户功能或用户条件.

But on my server (PHP 5.3) this variable is empty! I suppose this is because this environment variable is deprecated. Now I am running out of options, without using an extension, user function or user condition.

也许您有个主意!预先感谢.

Maybe you have an idea! Thanks in advance.

推荐答案

这应该可以完成工作(至少使用TYPO3 4.5和PHP 5.3.8):

this should do the job (at least with TYPO3 4.5 and PHP 5.3.8):

10 = TEXT
10.data = global:_COOKIE|some_cookie
10.wrap = <h2>Cookie: |</h2>

这篇关于TypoScript是否有可能获得$ _COOKIE?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆