您的位置:首页 > 编程语言 > PHP开发

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 ';' 这样的错误

呵呵,就项目没办法,只能按老办法写了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: