Özel bir PHP uygulaması için küresel ayar grubunu depolamak için en iyi yaklaşım nedir? Ben kişisel bir proje (gerçekten ilk büyük bir) üzerinde çalışan, ve uygulama için genel ayarları kaydetmek için anahtar-değer çiftlerini saklamak için bir yöntem ihtiyaç duyuyorum.
Olarak saklamak Şeyler ...
- Web sitemin Küresel adı.
- Tema (sadece bir değişken veya tema yol)
- vb
Ben sadece tek bir tabloda tutulması gerekir? Eğer öyleyse ne bir boostrap onları sorgulamak için en iyi yolu nedir? İstediğiniz her ayar için tek bir sorgu yapıyor yanı sıra.
UPDATE: Yes a .ini or parsing an include file would be nice, and I know how to do it that way. But I wanted to know what would be the best approach to storing them in MySQL with everything else.
UPDATE2: The reason I ask this also is I plan for a lot of these settings to be changeable through the Administrator interface. So if you were to change the Title of the site, it would be updated right away, which I figured would be best to do through SQL, thus needing setting inside the DB.