GithubHelp home page GithubHelp logo

Comments (6)

zxcvdavid avatar zxcvdavid commented on July 2, 2024

如果你拿不到$_GET,和yaf应该没有关系,尝试在参数里加上?xx=xxx,并且在响应的controller里var_dump($_GET);

from yaf.

stenote avatar stenote commented on July 2, 2024

@lpisces 我在controller中可正常使用$_GET进行获取

from yaf.

fifsky avatar fifsky commented on July 2, 2024

如果在程序里面手动定义如$_GET['test'] = 1 或者$_POST['test'] = 1 然后程序里面使用getQuery和getPost都是获取不到的,经过我测试,getQuery和getPost只能得到表单或者URL传递过来的数据,我估计是框架在收到请求的最开始就已经把$_GET $_POST赋值给类变量了,后面对$_GET $_POST的任何增加删除修改对类变量无效,不是十分理解这样的设计,我原本以为getQuery和getPost应该是这样的设计如
function getQuery($name){
return $_GET['name'];
}
这样的话后来对$_GET的数据设置的值时可以得到的,另外URL的段如/module/controller/action/a/1是通过getParam获取的如getParam('a')

from yaf.

Senorsen avatar Senorsen commented on July 2, 2024

@fifsky 这个特性文档里有写,是为了性能和只读原则。(凭印象记忆的,链接不记得了,官网找)。另外文档也提到可以在debug模式中暂时关闭这种特性

from yaf.

fifsky avatar fifsky commented on July 2, 2024

@Senorsen 谢谢,我找到文档解释的链接了,http://yaf.laruence.com/manual/yaf.install.html

from yaf.

picasso250 avatar picasso250 commented on July 2, 2024

这个issue该关闭了.

from yaf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.