php const常量 不能使用字符串连接符.链接
2017-03-09 14:41
183 查看
class jdpay extends pay { const BASE_URL = "https://mapi.jdpay.com/npp10/"; private $agreement_sign_url = self::BASE_URL . "agreement_sign"; //签约请求的url get访问 private $agreement_cancel_url = self::BASE_URL . "agreement_cancel"; //解约请求 private $agreement_pay_url = self::BASE_URL . "agreement_pay"; //支付请求 private $account_query_url = self::BASE_URL . "account_query"; //余额查询请求 }
这个问题在php5.6以及以上的版本不是问题, 不然会报
syntax error, unexpected '.', expecting ',' or ';' 这样的错误
呵呵,就项目没办法,只能按老办法写了相关文章推荐
- php链接mssql 不能使用ip的处理方法
- VS2005中使用字符串const char[12]不能转换为LPCTSTR的错误解决()
- php数字字符串排序输出不能使用任何php内置函数
- php把从数据库读取出来的数据存放到数组里,然后数组不能直接使用,要转为字符串
- PHP使用http_build_query()构造URL字符串的方法(可将POST参数组转换拼接成GET请求链接)
- const常量用extern声明定义的问题(extern变量不能在使用类里初始化)
- php 中静态变量static 全局常量const的使用注意事项
- php self,$this,const,static,->的使用
- php中self,$this,const,static,->的使用
- 2009年腾讯校园招聘笔试题! 不使用任何中间变量求一个const字符串长度
- DB2 v8.2,我真败了,sql语句居然不能把常量的字符串转换成char
- PHP中字符串的使用
- php面向对象全攻略 (十) final static const关键字的使用
- 抛开Cookie使用SESSION-PHP中SESSION不能跨页传递问题的解决办法(转载)
- php链接mysql数据库不能用localhost的解决方法
- 使用apache的mod_disk_cache做缓存,不能缓存开启了session的php页面
- php链接数据库时设置编码SET NAMES UTF8不能用UTF-8
- 不能修改常量字符串的内容
- ASP.NET 2.0中的数据库链接字符串的使用方法
- Const常量真的不能改变了么?