düz bir dosya veritabanı + ajax - artım tarafından tanımlanan dize dizisi sayısını değiştirmek

0 Cevap php

Ben php öğreniyorum. Acemi. Bu purpouse için ben düz bir dosya açıklama sistemi ile başlamaya karar verdim.

I'm using ajax to post to php that writes data to a flat-file database. Similar to: 12.01.2011¦¦the name¦¦the comment¦¦md5email¦¦0 Where '0' is the start number of comment 'likes'...thumbs-up. Everything is working fine with ajax. Even the comment delete.

At page load jquery counts the comments (starting from 0) and assigns to each's comment-'like' an numbered id. That number is than posted via ajax to php, resulting the file line number to modify. That system works great for identifying the line to delete. And it deletes the right line!

Now, having the line (or string?) number. How to: Search the file for that line. (foreach...?!...) Finded the line - split it into arrays. (Explode...?) And increment by 1 the defined array value. Limit maximum likes to 99. (1 per user session). Write file, close and so on. - I just can't start count the 'like' clicks. Please help.

Any ideas? Thanks in advance!

0 Cevap