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

网址丢失加号

I realize that in a URL, the + symbol represents a space, however I need to keep the plus sign. How can I do this? My URL and code are as follows:

http://www.example.com/path/test.php?test=2+2

<?php
$test = $_GET['test'];

echo $test;
?>

This prints out 2 2

  • is intepreted as a space in a URL. To use a + you need %2B.

http://example.com/path/test.php?test=2%2B2

近期文章

  • PHP不打印整个表
  • MySQL插入错误
  • Laravel 5.0 file_put_contents错误
  • CodeIgniter:form_input为readonly
  • 几个类的PHP相同的命名空间
  • Laravel 5.2在@foreach中形成
  • 通过$ _GET [duplicate]传递变量时SQL中的错误查询
  • HTTPS登录HTTP站点
  • 需要找到另一种在Laravel / PHP中查询搜索结果的方法
  • 将尾随零添加到字符串
  • 为什么我的行应该循环170次时循环12000次?
  • php每个字母到图像
  • PHP:数组转换问题
  • 从字符串中删除€符号[重复]
  • Silex控制器依赖注入
  • 关于外键的SQL语法错误
  • 在数据库中保存带单引号的字符串,不带mysqli_real_escape_string [duplicate]
  • PHP date()没有返回正确的时间?
  • 使用join语句,但如果table为空
  • 无法在php中添加当前时间

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

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

友情链接:代码精华