+ 1

php, append file

while appending (a)names to txt file how to prevent duplicates.. kindly help..

15th Aug 2016, 3:42 AM
Krupendra VS
Krupendra VS - avatar
3 Respuestas
+ 1
before appending you can read file and check if name already in it. If file does not contain name then add it.
18th Aug 2016, 12:51 PM
Bekir Uzun
Bekir Uzun - avatar
0
first check with a condition, if there is already a file with the same name, then if the condition is true change the name to something else
18th Aug 2016, 4:56 AM
Vijay Vimal
Vijay Vimal - avatar
- 1
thanks guys.. can you pls send me the codes to read file and check if name exist in file.
18th Aug 2016, 1:18 PM
Krupendra VS
Krupendra VS - avatar