PS :
There is my phpinfo() :
fopen now works( i used a relative path and it works....) : $Id_file_xls = fopen ("../file/$FileName","w+");
but I have the same problem when I want to write into the file with fputs. There is my code :
$FileName = "xcel_test.xls";
2$Id_file_xls = fopen ("../file/$FileName","w+");
3
4
5 function XlsEcho($Value)
6 {
7 //echo $Value; // Affiche la chaine
8 $Temp=str_replace("[[TR]]","
",$Value);
9 $Temp=str_replace("[[TD]]"," ",$Temp);
10 global $Id_file_xls;
11 fputs($Id_file_xls,$Temp);
12 }
13 function XlsAddColonne()
14 {
15 global $Id_file_xls;
16 fputs($Id_file_xls," ");
17 }
18 function XlsAddLigne()
19 {
20 global $Id_file_xls;
21 fputs($Id_file_xls,"
");
22 }
23
24 function XlsPrint($Value)
25 {
26 global $Id_file_xls;
27 fputs($Id_file_xls,$Value);
28 }
29 function XlsClose()
30 {
31 global $Id_file_xls;
32 global $FileName;
33 fclose($Id_file_xls);
34 echo "[[TABLE CLASS='fond' WIDTH='90%']][[TR]][[TD]]";
35 echo"Export : ";
36 echo "[[A href='file/$FileName.xls']] Cliquez ici[[/A]]";
37 echo "[[/TD]][[/TR]]";
38 echo"[[/TABLE]]";
39 }
40 if(file_exists("../file/$FileName.xls"))
41 {
42 echo"file alredy exist";
43 unlink ("../file/$FileName.xls");
44 echo"file deleted";
45 }
48
49
50 XlsEcho("Section");;
I keep trying