J'écris dans un fichier txt pour sauvegarder certains messages. Voici mon code simpleCodeigniter Write_file Question
$this->path = APPPATH . "post_backups/";
$string = $this->input->post('post');
$post_title = $this->input->post('post_title');
$this->file = $this->path . $post_title."txt";
write_file($this->file, $string);
$this->index();
Tout fonctionne bien, sauf ce
$this->file = $this->path . $post_title."txt";
Je suis en train de nommer mon dossier avec le titre du poste IE: title.txt.
Ce que je reçois c'est ce "titletxt". Comment devrait le $ post_title. "txt" être écrit pour fournir txt comme une extension?
Merci
Parfait! les choses les plus simples sont toujours les plus difficiles à voir. Merci beaucoup – Brad