Neden) bu gibi davranıyor (fopen edilir?

0 Cevap php

Şu anda dinamik olarak dizin adını karar bir işlevi yapmak için beni gerektiren bu proje üzerinde çalışan ve daha sonra bu dizinde basit. Txt dosyası oluşturur duyuyorum.

my code is as follows: ($destinatario is a string)

     $diretorio="../messages/".$destinatario;
if (is_dir($diretorio)) {
    ;
}else{
    mkdir($diretorio);
}
$path=$diretorio."/".$data.",".$assunto.",".$remetente.".txt";
$handle=fopen($path,'w+');

fwrite($handle, $corpo);

fclose($handle);

nevermind the portuguese, but the bottom line is that it should create a .txt file using the naming guidelines i've provided. The funny thing is that when i do this, php creates this weird file whose filename is "01.09.2010 04" (with no extension at all) which amounts to the first few characters of the actual filename i'd like to create...

edit (:) $ ​​veri aslında bugüne kadar bir çağrı çıktı ("i dmY H" dir)

0 Cevap