Visualizzazione dei risultati da 1 a 4 su 4
  1. #1

    [php, file] troncare txt da un certo punto in poi

    Ho un file di testo strutturato in questo modo:
    codice:
    <--Mex-->
    bla
    bla
    
    <--Mex-->
    gugu
    
    <--Mex-->
    gogogo
    ggoog
    goog
    Posso dire di vuotare il file dopo il secondo <--Mex-->?
    Che funzione devo guardare?

    Grazie.
    GdR Online - http://lenar.it/
    Yesterday is history. Tomorrow is mystery.
    Today is a gift. That's why it's called the present

  2. #2
    se vuoi prendere solo il primo potresti fare

    $arr_mex = explode("<--Mex-->",$file_content);

    $primo_mex = $arr_mex[0];
    debian:~$ uname -r
    2.6.18-1-686
    debian:~$

    Il quiz manager è nato!!! visitate http://shenk.altervista.org !!

  3. #3
    Io pensavo almeno 3...
    GdR Online - http://lenar.it/
    Yesterday is history. Tomorrow is mystery.
    Today is a gift. That's why it's called the present

  4. #4
    up
    GdR Online - http://lenar.it/
    Yesterday is history. Tomorrow is mystery.
    Today is a gift. That's why it's called the present

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 © 2025 vBulletin Solutions, Inc. All rights reserved.