Monday 15 February 2010

php - Change string in an array from file read and rewrite -



What I basically want to do is read a file and then at the moment with another Change the string I have written:

  $ pap = file ('../papier.js'); $ = Counting count ($ pap); ($ I = 0; $ i & lt; $ count; $ i ++) {If (stropos ($ Pap [$ i], "url: 'php / function.php'")) {$ url = dirname ( Dirname (curPageURL). ())) '/ Php / function.php'; Str_replace ("url: 'php / function.php'", $ url, $ pap [$ i]); }} $ Fs = fopen ('../papier.js', 'w +'); For ($ i = 0; $ i & lt; $ count; $ i ++) FILIT ($ FS, $ PAP [$ i]); Fclose ($ FS);   

This gets the right key, but I do not see any changes in the file ... this is the part of the file that should be changed:

 < Code> (function ($) {$ .fn.papier = function (book, params) {var id = $ (this); var request = $ .ajax ({type: 'POST', url: 'php / function: (Data: 'getOpt', book: book}, datatype: 'jason', preceded by: function () {id.append ('& lt; img id = "papierloadinggifimage" src = "css / images / loader.gif" / & Gt; ');}, success: function (opt) {if (opt [0]! = False) {var request = $ .ajax ({type:' POST ', url:' php /function.php ' date : {Act: 'getbook', book: book},    

You "str_replace" But you are not using the result at all.

No comments:

Post a Comment