in reply to Re: Config files
in thread Config files
I don't think it's wise to give the users so much power. Not only would eval"" let them run whatever code they want inside the application (which may or may not matter much) but it can also easily break the app in ways that will not be aparent to the user.
Besides you will want them to be able to reuse whatever option they like, not just the "root". So they would either have to use
or something similar or you'd have to copy all the values into whatever package the eval""ed code runs in. Which is again not something you want to do.[path] root = C:\test code = $ini->val('path', 'root') . '\code1'
It's (IMnsHO) better to invent a special, more restricted syntax and parse it instead of eval""ing.
Jenda
|
We'd like to help you learn to help yourself Look around you, all you see are sympathetic eyes Stroll around the grounds until you feel at home -- P. Simon in Mrs. Robinson |
|
|---|