You are here: Re: How do I creat temp file in php? « All PHP « IT news, forums, messages
Re: How do I creat temp file in php?

Posted by Dave (from the UK) on 05/20/06 20:22

Sorry about the multiple posting.

I was looking on alt.php for my reply to Chris, but found it did not
appear. So I tried again, and then realised he had put a followup to
uk.net.web.authoring. Not sure why really, as it seems quite relavant to
a php newgroup, so I have posted back there this time!

I can see the point of changing the followup if a message is sent to an
inappropiate group, but I don't feel it was in this case.

> If you need it to persist across multiple pages, use PHP's sessions

I don't need that.

> If you don't, then just store it in memory unless it's incredibly large.
> Or do you need a physical temporary file for some reason? If so, why?
>


In principle memory would do, but I've not had a lot of luck with it. I
am using an external program and that is reading from a file.

someprog -batchinput < /tmp/foo -batchoutput > /tmp/results

When that reads from a pipe, the program behaves a little differently
and a bit of an inconsistent way.

I assume I can do something with a random number or time to get a unique
name.

In a shell script, I could do /tmp/foo.$$ and know that $$ will be the
PID which will be unique. I would have thought php would have supported
something like that.


--
Dave K MCSE.

MCSE = Minefield Consultant and Solitaire Expert.

Please note my email address changes periodically to avoid spam.
It is always of the form: month-year@domain. Hitting reply will work
for a couple of months only. Later set it manually.

 

Navigation:

[Reply to this 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

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