如何更改 Zend Url 的分隔符? [英] How to change the separation character of Zend Url?
问题描述
我使用 Zend URL 视图助手来构建我的 url.Everythings 完全按照我的意愿工作,除了一件事:用于替换 url 中空格的字符是加号 (+).我希望它是一个分钟"(-).我该如何更改?
I use Zend URL view helper for building my urls. Everythings works exactly as I'd like to, except one thing: The character used for replacing spaces in the url is a plus (+). I'd like it to be a 'min' (-). How can I change this?
示例:现在:/nl/nieuws/bericht/3/title/nieuwe**+affiches愿望:/nl/nieuws/bericht/3/title/nieuwe-**affiches
Example: Now: /nl/nieuws/bericht/3/title/nieuwe**+affiches Wish: /nl/nieuws/bericht/3/title/nieuwe-**affiches
提前致谢!
推荐答案
这不在文档中的任何地方,但看起来 Zend URL 视图助手可以在它的 $urlOptions
中接受一个参数名为 chainNameSeparator
的数组.不能保证这就是您要找的东西,但请尝试使用它,看看它是否有任何改变.
This isn't in the documentation anywhere, but it appears that the Zend URL view helper can take a parameter in it's $urlOptions
array called chainNameSeparator
. No guarantee that's what you're looking for, but trying playing with that and see if it changes anything.
这篇关于如何更改 Zend Url 的分隔符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!