Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 11
  1. #1

    sostituire a capo in un file di testo

    devo leggere un file di testo da altro server diverso da mio. e questo non è un problema. il problema è che voglio sostituire i caratti fine riga e accapo con i caratteri "..." ma non riesco. come faccio?
    io ho provato con:

    Codice PHP:
    pagetxt CStr(replace(xmlhttp.ResponseText,vbCrLf,"...")) 
    ma non funziona...
    ci sono idee?
    Rey
    La vita è un panaro, non sai mai quello che ti esce!
    photorealistic 3D rendering and animations and WEB Design

  2. #2
    prova con

    codice:
    oldPage = CStr(xmlhttp.ResponseText)
    pagetxt = replace(oldPage,vbCrLf,"...")
    prova anche ad usare

    pagetxt = replace(oldPage,chr(13)+chr(10),"...")

  3. #3
    no... non viene...
    ho provato anche
    Codice PHP:
               pagetxt replace(pagetxt,chr(13)&chr(10),"..."
    ma non viene.... altre soluzioni?
    Rey
    La vita è un panaro, non sai mai quello che ti esce!
    photorealistic 3D rendering and animations and WEB Design

  4. #4
    comunque il file da cui sto provando a leggere è:
    http://www.iplists.com/nw/msn.txt e a me lo legge tutto in una riga.
    Rey
    La vita è un panaro, non sai mai quello che ti esce!
    photorealistic 3D rendering and animations and WEB Design

  5. #5
    Originariamente inviato da reybluk
    comunque il file da cui sto provando a leggere è:
    http://www.iplists.com/nw/msn.txt e a me lo legge tutto in una riga.
    dal link arriva un file con HEX 0D-0A, quindi chr(13)+chr(10)... prova a salvare in locale il file e ad aprirlo con un editor esadecimale

  6. #6
    sicuro? Questo è quello che c'è nel file:
    Codice PHP:
    # MSN
    # UA "MSNBOT/0.1 ([url]http://search.msn.com/msnbot.htm[/url])"
    # UA "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT; MS Search 4.0 Robot)"
    # UA "lanshanbot/1.0 ( [url]http://search.msn.com/msnbot.htm[/url])"
    # UA "msnbot-Products/1.0 (+[url]http://search.msn.com/msnbot.htm[/url])"
    # UA "msnbot-media/1.0 (+[url]http://search.msn.com/msnbot.htm[/url])"
    # UA "msnbot/0.11 (+[url]http://search.msn.com/msnbot.htm[/url])"
    # UA "msnbot/0.3 (+[url]http://search.msn.com/msnbot.htm[/url])"
    # UA "msnbot/0.9 (+[url]http://search.msn.com/msnbot.htm[/url])"
    # UA "msnbot/1.0 (+[url]http://search.msn.com/msnbot.htm[/url])"
    131.107.0
    131.107.137.165
    131.107.137.166
    131.107.137.37
    131.107.137.47
    131.107.163.47
    131.107.163.48
    131.107.163.49
    131.107.163.57
    131.107.163.58
    131.107.76.139
    (etc..) 
    tra l'altro ho fatto copia incolla e vedo che sull'editor del forum mi va giustamente accapo...
    Rey
    La vita è un panaro, non sai mai quello che ti esce!
    photorealistic 3D rendering and animations and WEB Design

  7. #7
    rey, 0D-0A è il delimitatore di riga... mica il contenuto

  8. #8
    ah! scisa... sono un po' indietro... ora provo...
    Rey
    La vita è un panaro, non sai mai quello che ti esce!
    photorealistic 3D rendering and animations and WEB Design

  9. #9
    c'è solo OA... quindi provo solo chr(10)...
    Rey
    La vita è un panaro, non sai mai quello che ti esce!
    photorealistic 3D rendering and animations and WEB Design

  10. #10
    FUNGE!!! Grazie!!
    Rey
    La vita è un panaro, non sai mai quello che ti esce!
    photorealistic 3D rendering and animations and WEB Design

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.