Zouhair
Zouhair

Reputation: 151

How to Escape "%" in parameters.yml symfony2

I would like escape a character % in file : parameters.yml, because my password begin by %

database_driver3: pdo_sqlsrv
database_host3: 192.168.10.10
database_port3: 1455
database_name3: MyDB
database_user3: sa
database_password3: %ABC$Admin_2012%

What I really should be doing ?

Upvotes: 15

Views: 9439

Answers (1)

Mantas
Mantas

Reputation: 3249

The easiest way is to simply add quotes to the values you want to escape

database_password3: "%ABC$Admin_2012%"

OR by using double % credit - skowron-line

database_password3: %%ABC$Admin_2012%%

Upvotes: 20

Related Questions