PHP Classes

fopen

Recommend this page to a friend!

      MS-Excel Stream Handler  >  All threads  >  fopen  >  (Un) Subscribe thread alerts  
Subject:fopen
Summary:fopen problem
Messages:3
Author:hakan cs
Date:2005-06-06 16:04:54
Update:2005-06-29 14:58:20
 

  1. fopen   Reply   Report abuse  
Picture of hakan cs hakan cs - 2005-06-06 16:04:54
Hello, i just have downloaded the excel.php and tried to open
an excel file. There is no error but it doesnt write in the file
safe mode is off.

Is there a documentation for this file?

please help me!

<?
require_once("excel.php");

$export_file = "xlsfile://tmp/example.xls";
$fp = fopen($export_file, "wb");
$data = array(0 => array(
"column1" => "value1",
"column2" => "value2",
"column3" => "value3",
"column4" => "value4",
"column5" => "value5",
),

1 => array(
"column1" => "value6",
"column2" => "value7",
"column3" => "value8",
"column4" => "value9",
"column5" => "value10",
),
);
fwrite($fp, $data);
fclose($fp);
?>

  2. Re: fopen   Reply   Report abuse  
Picture of Joćo Joćo - 2005-06-21 17:53:46 - In reply to message 1 from hakan cs
Try this:
fwrite($fp, serialize($data));

Instead:
fwrite($fp, $data);


I hope this could help.

  3. Re: fopen   Reply   Report abuse  
Picture of Slowhand Slowhand - 2005-06-29 14:58:20 - In reply to message 1 from hakan cs
it sure did!!! :D

Thx Joćo