dot Posted March 9, 2006 Report Share Posted March 9, 2006 chau. man ir textarea, tajā raxtu kodiņu, postēju un viss tiek saglabāts (kaut kāds html kods) vienā failā. Saglabats viņš tiek ar visiem \n, bet kā sadzīt visu kodu viena vienīgā rindā? un vēl, piemeram, ja es kodiņam gribu pievienot vēl kādu gabalu klāt izmantojot fopen a+ klāt tiek pievienots gabals jaunā rindā, bet vajadzētu lai pievieno 1mas rindas beigās :) vārdu sakot failiņam visa informācija ir vienā rindā sadzīta. paldies jau iepriekš :) Link to comment Share on other sites More sharing options...
GedroX Posted March 9, 2006 Report Share Posted March 9, 2006 (edited) Man liekās, ka $text = str_replace(Array("\n", "\r"), ' ', $text); palīdzēs. Edited March 9, 2006 by GedroX Link to comment Share on other sites More sharing options...
Stopp Posted March 9, 2006 Report Share Posted March 9, 2006 (edited) str_replace("\n", "", $v); ? Edited March 9, 2006 by Stopp Link to comment Share on other sites More sharing options...
Kavacky Posted March 9, 2006 Report Share Posted March 9, 2006 Stopp, par īsu. Windowsā rindiņas beigās ir \n\r. Link to comment Share on other sites More sharing options...
Klez Posted March 10, 2006 Report Share Posted March 10, 2006 manuaali pie pregiem kkur bija fcija, kas izvaac visus tabus un line breikus Link to comment Share on other sites More sharing options...
Stopp Posted March 10, 2006 Report Share Posted March 10, 2006 ā, pareizi, no textarea nāca \r\n.. a vai tad linux utt. dod vienk \n ? Link to comment Share on other sites More sharing options...
bubu Posted March 10, 2006 Report Share Posted March 10, 2006 Jā. Link to comment Share on other sites More sharing options...
Recommended Posts