Home  >  Article  >  Backend Development  >  在同一个controller中想在不同action之间传递参数 去掉设cookie之外还有什么方法

在同一个controller中想在不同action之间传递参数 去掉设cookie之外还有什么方法

WBOY
WBOYOriginal
2016-06-13 12:05:25877browse

在同一个controller中想在不同action之间传递参数 除了设cookie之外还有什么方法
在同一个controller中想在不同action之间传递参数 除了设cookie之外还有什么方法。谢谢
------解决方案--------------------

引用:
Quote: 引用:

全局变量global,还可以URL传参,还可以采用数据库,各种方式都有,看你需求。


就是表单提交过来的数据,在一个action中接收的,然后在另一个action中也想得到,就要在action之间进行参数传递。我的这种情况用什么方法比较合适
数据库,静态文件
------解决方案--------------------
cookie / session
URL 参数

如果是在一个 action 中调用另一个 action 就直接传递就是了
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn