You are here: Re: application-wide shared data/object « PHP « IT news, forums, messages
Re: application-wide shared data/object

Posted by Aaron Greenspan on 10/21/15 11:22

Hi,

Not sure if everyone would agree, but I think the best way to go about
doing this is just to make a table in a relational database. You can
restrict access permissions using MySQL if that's something you're
really concerned about, but there's basically no disadvantage to just
storing your data in a MyISAM table instead of a shared object. You can
index, sort, etc. very quickly that way. You can even load the result of
the query into your $_SESSION variable after the first time so that you
essentially have the result set cached. If indexing isn't a big deal,
I'd just say store the data in a flat file. You can always move it
outside of the web-accessible directory if you're worried about people
accessing it directly.

Alternately, you could just store the data in a PHP file and include it
in your scripts. Either way works, I think.

Aaron

Aaron Greenspan
President & CEO
Think Computer Corporation

http://www.thinkcomputer.com

 

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

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