| | 229 | sub getphpstyleconfig{ |
|---|
| | 230 | my $key = $_[0]; |
|---|
| | 231 | my $phpconfigpath = ""; |
|---|
| | 232 | my $configline = ""; |
|---|
| | 233 | # read |
|---|
| | 234 | if (-e "$phptoolpath/php/foltia_config2.php"){ |
|---|
| | 235 | $phpconfigpath = "$phptoolpath/php/foltia_config2.php"; |
|---|
| | 236 | }elsif(-e "$toolpath/php/foltia_config2.php"){ |
|---|
| | 237 | $phpconfigpath = "$toolpath/php/foltia_config2.php"; |
|---|
| | 238 | }else{ |
|---|
| | 239 | $phpconfigpath = `locate foltia_config2.php | head -1`; |
|---|
| | 240 | chomp($phpconfigpath); |
|---|
| | 241 | } |
|---|
| | 242 | |
|---|
| | 243 | |
|---|
| | 244 | if (-r $phpconfigpath ){ |
|---|
| | 245 | open (CONFIG ,"$phpconfigpath") || die "File canot read.$!"; |
|---|
| | 246 | while(<CONFIG>){ |
|---|
| | 247 | if (/$key/){ |
|---|
| | 248 | $configline = $_; |
|---|
| | 249 | $configline =~ s/\/\/.*$//; |
|---|
| | 250 | $configline =~ s/\/\*.*\*\///; |
|---|
| | 251 | }else{ |
|---|
| | 252 | } |
|---|
| | 253 | } |
|---|
| | 254 | close(CONFIG); |
|---|
| | 255 | }#end if -r $phpconfigpath |
|---|
| | 256 | return ($configline); |
|---|
| | 257 | }#end sub getphpstyleconfig |
|---|
| | 258 | |
|---|