Bonjour a vous,
J'ai une problem quand j'assaie de faire passer un code html dans du php, les fameux salsh, je ne suis pas capable de les enlever, pouvez-vous m'aider ?

Voici mon code ;

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 
<?php
echo "copiage de fichier debut";
// your new data + newline
$new_line = $_POST['codesource']."\n\r";
 
// the filepath
$file = 'upload/aaatest.html';
// the old data as array
$old_lines = file($file);
// add new line to beginning of array
array_unshift($old_lines,$new_line);
// make string out of array
$new_content = join('',$old_lines);
$fp = fopen($file,'w');
// write string to file
$write = fwrite($fp, $new_content);
fclose($fp);
echo "copiage de fichier Fin";
echo "Redirection.....";
?>

Je suis avec php 4 et windows 2003 .

Merci !