Read file problem.
Hi I want to make a white list for an antispam. The plugin reads fine the file but only read the last line.
Example of listablanca.cfg: "127.0.0.1" "200.0.0.1" PHP Code:
Anyone can help me? Thanks. |
Re: Read file problem.
Code:
This code is wrong. You loop already with the while() and for each line. Why do you loop again with the same string in the whole array ? The result is the array will be filled with the same string, the last. You should have only something : Code:
But since you have "" in your config file, you will get double "" ; you need to use remove_quotes() before : Code:
|
Re: Read file problem.
Thanks Arkshine but now only read the first line.
|
Re: Read file problem.
Show your code
|
Re: Read file problem.
PHP Code:
|
Re: Read file problem.
Remove szLine[0] == '^n'
|
Re: Read file problem.
Same problem, only read the first line.
PHP Code:
|
Re: Read file problem.
I see nothing wrong. Make sure you use the right code.
You can also debug your code by putting a log_amx() after trim() and to see the value of szLine. |
Re: Read file problem.
Quote:
|
Re: Read file problem.
So, it works fine. Each line is read without problems.
|
All times are GMT -4. The time now is 03:00. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.