<legend id='9XaSi'><style id='9XaSi'><dir id='9XaSi'><q id='9XaSi'></q></dir></style></legend>
    • <bdo id='9XaSi'></bdo><ul id='9XaSi'></ul>
      <i id='9XaSi'><tr id='9XaSi'><dt id='9XaSi'><q id='9XaSi'><span id='9XaSi'><b id='9XaSi'><form id='9XaSi'><ins id='9XaSi'></ins><ul id='9XaSi'></ul><sub id='9XaSi'></sub></form><legend id='9XaSi'></legend><bdo id='9XaSi'><pre id='9XaSi'><center id='9XaSi'></center></pre></bdo></b><th id='9XaSi'></th></span></q></dt></tr></i><div id='9XaSi'><tfoot id='9XaSi'></tfoot><dl id='9XaSi'><fieldset id='9XaSi'></fieldset></dl></div>

      <small id='9XaSi'></small><noframes id='9XaSi'>

      <tfoot id='9XaSi'></tfoot>

      Joomla 获取 URL 中传递的变量

      Joomla getting Variables passed in URL(Joomla 获取 URL 中传递的变量)

        <bdo id='tBLfo'></bdo><ul id='tBLfo'></ul>
        • <small id='tBLfo'></small><noframes id='tBLfo'>

          <i id='tBLfo'><tr id='tBLfo'><dt id='tBLfo'><q id='tBLfo'><span id='tBLfo'><b id='tBLfo'><form id='tBLfo'><ins id='tBLfo'></ins><ul id='tBLfo'></ul><sub id='tBLfo'></sub></form><legend id='tBLfo'></legend><bdo id='tBLfo'><pre id='tBLfo'><center id='tBLfo'></center></pre></bdo></b><th id='tBLfo'></th></span></q></dt></tr></i><div id='tBLfo'><tfoot id='tBLfo'></tfoot><dl id='tBLfo'><fieldset id='tBLfo'></fieldset></dl></div>

            <tbody id='tBLfo'></tbody>
          <tfoot id='tBLfo'></tfoot>
          1. <legend id='tBLfo'><style id='tBLfo'><dir id='tBLfo'><q id='tBLfo'></q></dir></style></legend>

                本文介绍了Joomla 获取 URL 中传递的变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                当它们被传递到我们的网站时,我试图从 Joomla 中的 URL 字符串中提取值.一个例子是:

                ?source=SEARCH%20&utm_source=google&utm_medium=cpc&utm_term=&utm_content={creative}&utm_campaign=&cpao=111&cpca=&cpag=&kw=

                因此,我希望抓取 VAR=utm_source、抓取 utm_medium 等.

                我想在整个网站上携带这些值,并至少保留到访问者点击表单提交,这样这些值将与表单一起传递以跟踪这些区域以查看它们来自哪里,使用了哪些关键字等.

                任何帮助将不胜感激.

                解决方案

                要获取 URL(和 POST)值,您可以使用 JRequest 或 JInput.JRequest 已被 Joomla 3.0 弃用,因此最好使用 JInput :-)JRequest:http://docs.joomla.org/Retrieving_and_Filtering_GET_and_POST_requests_with_JRequest::getVarJInput:http://docs.joomla.org/Retrieving_request_data_using_JInput

                Joomla 还可以将值存储到用户会话中.如果您想在多个页面上跟踪某些内容,或者想要保留用户所做的某些设置(例如订购),这将非常方便.这些被称为 UserStates,文档在这里:http://docs.joomla.org/How_to_use_user_state_variables>

                I am trying to pull values from a URL string in Joomla when they are passed into our site. an example is:

                ?source=SEARCH%20&utm_source=google&utm_medium=cpc&utm_term=&utm_content={creative}&utm_campaign=&cpao=111&cpca=&cpag=&kw=

                so out of this I will want the VAR=utm_source grabbed, utm_medium grabbed etc.

                I want to carry these values across the sites and held at least until the visitor hits submit on a form so these values will be passed with the form to track these areas to see where they came from, what keywords were used etc.

                any help will be appreciated.

                解决方案

                To get URL (and POST) values you use either JRequest or JInput. JRequest is depreceated with Joomla 3.0 so better use JInput :-) JRequest: http://docs.joomla.org/Retrieving_and_Filtering_GET_and_POST_requests_with_JRequest::getVar JInput: http://docs.joomla.org/Retrieving_request_data_using_JInput

                Joomla also has the possibility to store values into the user session. This is handy if you want to track something over multiple pages, or want to preserver some settings (like ordering) a user made. These are called UserStates and the doc is here: http://docs.joomla.org/How_to_use_user_state_variables

                这篇关于Joomla 获取 URL 中传递的变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Appending GET parameters to URL from lt;formgt; action(将 GET 参数附加到来自 lt;formgt; 的 URL行动)
                Forcing quot;Save Asquot; dialog via jQuery GET(强制“另存为通过 jQuery GET 对话框)
                PHP - get certain word from string(PHP - 从字符串中获取某个单词)
                How to debug a get request in php using curl(如何使用 curl 在 php 中调试 get 请求)
                get a # from a url in php(从 php 中的 url 获取 #)
                PHP - include() file not working when variables are put in url?(PHP - 将变量放入 url 时,include() 文件不起作用?)
                    <legend id='NeYbw'><style id='NeYbw'><dir id='NeYbw'><q id='NeYbw'></q></dir></style></legend>

                      • <bdo id='NeYbw'></bdo><ul id='NeYbw'></ul>

                        <small id='NeYbw'></small><noframes id='NeYbw'>

                      • <i id='NeYbw'><tr id='NeYbw'><dt id='NeYbw'><q id='NeYbw'><span id='NeYbw'><b id='NeYbw'><form id='NeYbw'><ins id='NeYbw'></ins><ul id='NeYbw'></ul><sub id='NeYbw'></sub></form><legend id='NeYbw'></legend><bdo id='NeYbw'><pre id='NeYbw'><center id='NeYbw'></center></pre></bdo></b><th id='NeYbw'></th></span></q></dt></tr></i><div id='NeYbw'><tfoot id='NeYbw'></tfoot><dl id='NeYbw'><fieldset id='NeYbw'></fieldset></dl></div>

                            <tbody id='NeYbw'></tbody>

                          <tfoot id='NeYbw'></tfoot>