i would like the command to pick up with no case sensitivity. Right now if the file is not exactly in the case it will not find it.
ex: parse_ini_file('file.ini')
parse_ini_file('FiLe.INI')
how can i do this?
also, would like it to do the same with the parse
$id=$ini['id'];
$id=$ini['ID'];
parse_ini_file() case sensitive problem.
Moderator: General Moderators
File names are case sensitive on *nix based systems, and I believe that's how it should be (tell that to the guys on M$
).
Edit: strtolower() *might* be of interest (based on your specific needs - which you didn't tell us).
Edit: strtolower() *might* be of interest (based on your specific needs - which you didn't tell us).
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Or use glob() to find all ini files.
Code: Select all
<?php
$iniFiles = glob('*.{i,I}{n,N}{i,I}', GLOB_BRACE);
print_r($iniFiles);- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
how would i use that withvolka wrote:Or use glob() to find all ini files.Code: Select all
<?php $iniFiles = glob('*.{i,I}{n,N}{i,I}', GLOB_BRACE); print_r($iniFiles);
$ini = parse_ini_file("$id/file.ini");