Reply to Re: save file on server

Your name:

Reply:


Posted by Kim Andr Aker on 11/01/06 11:49

kirke wrote:

> [top posting fixed]
> Kim André Akerø wrote:
> > kirke wrote:
> >
> > > I want to save output file on server. (same folder)
> > > I have no idea how can I assign path.
> > > can i just use
> > >
> > > $book->saveas("/final.xls");
> >
> > Do you have any more sample code for this? Ie. what is the $book
> > variable?
>
> <?php
>
> $excel=new COM("Excel.Application") or Die ("Did not connect");
>
> $excel->sheetsinnewworkbook=1;
> $excel->Workbooks->Add();
>
> $book=$excel->Workbooks(1);
> $sheet=$book->Worksheets(1);
>
> $sheet->Name="Debug-Test";
> $book->saveas("/final.xls");
> ?>
>
> code is like this.
> what i want to know is, if i don't know exact path of directory where
> my index page is in, how can I set up saveas path?

In which case, it'll be something like this:

$book->saveas($_SERVER["DOCUMENT_ROOT"]."/final.xls");

--
Kim André Akerø
- kimandre@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация