Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it
    Registrato dal
    Jan 2004
    Messaggi
    855

    da echo su file di testo a echo su schermo

    Salve, come faccio a tramutare il seguente script per fargli scrivere a schermo invece che su file di testo?

    $string="abcd";
    $fp=fopen("./program.txt", "w+");

    for($a=0; $a<strlen($string); $a++) {
    for($b=0; $b<strlen($string); $b++) {
    for($c=0; $c<strlen($string); $c++) {
    for($d=0; $d<strlen($string); $d++) {
    fwrite($fp, $string{$a}.$string{$b}.$string{$c}.$string{$d}."\ r\n");
    }
    }
    }
    }
    fclose($fp);

    Grazie.

  2. #2

    ............

    Ciao.
    fwrite($fp, $string{$a}.$string{$b}.$string{$c}.$string{$d}."\ r\n");
    ad occhio e croce i valori sono in $string{$a}.$string{$b}.$string{$c}.$string{$d}
    quindi levi fwrite e fai un bel echo $string{$a}.$string{$b}.$string{$c}.$string{$d}."
    "."\r\n";
    Without faith, nothing is possible. With it, nothing is impossible
    http://ilwebdifabio.it

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