我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

Codeigniter在if语句中替换$ _POST

If I have an if statement currently using $_POST what would be the best way to do this using $this->input->post();?

Example:

if($_POST)
{
  Do This

}

According to the docs,

$this->input->post('value')

returns the value or false if it doesn't exist, so you should use this:

if ($this->input->post('value'))
{
    // 'value' can be safely used now, because we know it's there
}

近期文章

  • 有条件的条件......可能吗?
  • 使用composer / missing socket transport“ssl”安装ZFTool
  • 循环stdClass对象并获取变量中的内容
  • cakephp中的动态用户友好URL
  • 如何通过像素和js检测将用户重定向到正确的网站模板?
  • 在https重定向上显示消息
  • PHP:在唯一页面中显示博客页面[关闭]
  • 将秒转换为小时最小秒格式[重复]
  • 使用php for API 1.1读取Twitter JSON数据
  • 我的javascript函数不会重定向到其他页面
  • 将结果加载到缓冲区而不回显浏览器
  • Codeigniter引用表单助手中的MY_Controller
  • 调用成员函数bind_param() - 出了什么问题?
  • SQL,SELECT项目未预订特定日期
  • 如何通过PHP代码向API发出正确的HTTP POST请求? 我做错了什么
  • PHPUnit和VIM
  • PHP APNS一个令牌失败
  • PHP数组中的HTML表格中的组行
  • PHP图像显示[重复]
  • AJAX传递给PHP错误

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华