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

获取查询字符串的值

http://www.example.com/ci_admin_jaspud/index.php/admin/add_member/id/7/created_sort/asc

how can i get the value of multiple query strings in above url using codeigniter?

URI class is loaded automatically and you can use the segment() method to retrieve the data

$this->uri->segment(4)

to get the 7

More info: http://ellislab.com/codeigniter/user-guide/libraries/uri.html

Try:

$this->load->library('uri');
echo $this->uri->segment(4);

The URI Class provides functions that help you retrieve information from your URI strings.

Codeigniter URI class

近期文章

  • 基于Web的零件库存设计
  • PHP或MySql不会更新数据库
  • Php循环$ a =新的ShipPackage('UPS');
  • 我的“if语句”语法错误[关闭]
  • PHP:在非对象上调用成员函数GetUserCollection()[关闭]
  • php glob不读取垂直图像[关闭]
  • 包含何时调用函数[关闭]
  • 基本搜索引擎无法正常工作
  • 使用属性运行PHP
  • 如何在php中查询excel文件?
  • 查询和回声解决方案? [关闭]
  • Android中的动态数据[关闭]
  • 如何从iPad发送数据到php页面? [关闭]
  • PHP文本框阻止特殊字符
  • 如何使用PHP [重复]将HTML转换为PDF格式
  • 用html总结html [关闭]
  • PHP和MySQL:远程访问MySQL服务器?
  • 如何使用正则表达式保存电子邮件的一部分[关闭]
  • 如何在php页面中定期显示结果?
  • 如何通过php中的电子邮件发送文件附件(我的代码有什么问题)[关闭]

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

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

友情链接:代码精华