Raiviic Posted November 8, 2005 Report Share Posted November 8, 2005 nezinu kaa shitadu sameklet tapec jautaaju - ja kads zin var iedot ari man linku - jautajums sekojosh - ja tiek rakstits faila tad rakstaas pec kaartas attieciigi : 1 2 3 4 man vajadzetu lai tas viss rakstas taa : 4 3 2 1 attieicigi nevis beigas pedejam bet pirms peedeejaa, varbut kads var kautkaa izliidzet? ieprieksh jau paldies Link to comment Share on other sites More sharing options...
[Ya] Posted November 8, 2005 Report Share Posted November 8, 2005 (edited) http://lv.php.net/fopen http://lv.php.net/fwrite vai fputs viens un tas pats ..... fopen($filename,'x+');'x+' Create and open for reading and writing; place the file pointer at the beginning of the file. If the file already exists, the fopen() call will fail by returning FALSE and generating an error of level E_WARNING. If the file does not exist, attempt to create it. This is equivalent to specifying O_EXCL|O_CREAT flags for the underlying open(2) system call. This option is supported in PHP 4.3.2 and later, and only works for local files. tulkosim.. lietojot "x+" priekš atvēršanas, mēs atveram read+write modē un noliekam kursoru sākumā lietojot "x" priekš atvēršanas, mēs atveram write modē un noliekam kursoru sākumā Edited November 8, 2005 by [Ya] Link to comment Share on other sites More sharing options...
Blitz Posted November 8, 2005 Report Share Posted November 8, 2005 ja atver failu ar fopen("file", "r+"); tad pointers ir saakuma... fopen("file", "r+") fwrite ieraksta 1 fopen("file", "r+") fwrite ieraksta 2 fopen("file", "r+") fwrite ieraksta 3 fopen("file", "r+") fwrite ieraksta 4 beigas vajadzetu iznakt ka ierakstits ir 4 3 2 1 :) Link to comment Share on other sites More sharing options...
Raiviic Posted November 8, 2005 Author Report Share Posted November 8, 2005 dzeki paldies :) Link to comment Share on other sites More sharing options...
Raiviic Posted November 8, 2005 Author Report Share Posted November 8, 2005 ui dzeki situacija tada - vinsh paraksti pari iepriekshejam kas jau bija failaa - kaa var uztaisit lai tas kas bija paiet rindinju uz leju ??? Link to comment Share on other sites More sharing options...
vladimirs Posted November 8, 2005 Report Share Posted November 8, 2005 (edited) es to domu biju uztaisijis pats diezgan sen.. kad nomainiju hdd tad padirsu savus suuri gruuti ceptos skriptus un pasutiju dirst php.. reali izbesija. bet tagad pamazam censhos iejusties php aarees. nu man doma bij taada: 1. nolasa failu kuram pievienos, piem. baaze.txt 2. saturu pieskir kaukadam mainigajam .. $baaze 3. izdzess faila baaze.txt saturu 4. ieraksta jauno informaaciju 5. pievieno atpakalj $baaze i viss straadaa kaa smeereets.. palasot paaris funkcijas shito var viegli uztaisit, neznu, bet ganjau var ari vienkarsak, bet man sen aizmirsies par funkcijaam kas te vaidzigas. Edited November 8, 2005 by vladimirs Link to comment Share on other sites More sharing options...
Raiviic Posted November 8, 2005 Author Report Share Posted November 8, 2005 ok, meeginashu Link to comment Share on other sites More sharing options...
blackhalt Posted November 8, 2005 Report Share Posted November 8, 2005 bija Link to comment Share on other sites More sharing options...
Raiviic Posted November 8, 2005 Author Report Share Posted November 8, 2005 nu vsjo viss sanaca :) paldies Link to comment Share on other sites More sharing options...
nemec Posted November 8, 2005 Report Share Posted November 8, 2005 a labaak mysql laid, ato taads chakars ar tiem .txt to es tev nopietni saku Link to comment Share on other sites More sharing options...
Raiviic Posted November 8, 2005 Author Report Share Posted November 8, 2005 par mysql ticu - es pagaidam ar plain text gribu visaa iebraukt - kad bus laiks un vajadziba apgushu ari db - pagaidam nokrukjiishu visu ar txt failiem :P Link to comment Share on other sites More sharing options...
nemec Posted November 8, 2005 Report Share Posted November 8, 2005 ko tur krutiit, mysqlaa tu aatraak iebrauksi, nekaa kaadu meeslu taisii ar .txt vietaaa, tur probleema peec probleemas tikai galvu jauc un visss Link to comment Share on other sites More sharing options...
Recommended Posts