Php
Url Kısaltma Servisim
by Root on Nov.13, 2011, under Mysql, Php, smarty
Url Kısaltma servisleri eskiden çok revaçta değillerdi. Bir çok programcı bundan bir kaç yıl önce url servislerini yazıp bıraktılar.
Sefurl with Zend Framework
by Root on Apr.24, 2010, under Php, programlama, zend
Zend gerçekten çok güçlü frameworktür. Bir çok büyük projede kullanabiliriz. Ama bildiğiniz üzere artık internette projelerden daha çok oluşturulan projelerin bilinirliği gereklidir. Bunun en önemli yollarından biride bildiğiniz üzere SEO çalışmalarıdır.
Bu seo çalışmalarının en önemli ayaklarından biride sef link dediğimiz olaydır. Bu kısım zendde açıkçası biraz daha zordur. Zend’e ait standart link yönlendirmesi controller/action/var1/value1 şeklindedir.
Fakat bizim yapmak istediğimiz olay http://www.example.com/sef-url-with-zend.html
Evet koltuklarımıza sıkıca tutunalım. İşte nasıl yapacağımız.
index.php dosyamızı açın ve aşağıdaki kodu eklenyiniz.
How To Smarty Cache
by Root on Apr.14, 2009, under Php, smarty
Ok. If you use smarty and some part of your web site are no need to uptime any time, we can use the Smarty cache.
But smarty cache is not usefull for big project. But you can use in very simple let’s start.
First Prepare script for smarty.
require ‘kernel/libs/Smarty.class.php’; // This is my smarty class.
$smarty = new Smarty; //
$smarty->caching = true;
$smarty->cache_dir = "mycachedir/" where is cache?
Zend Cache with Zend Framework (Simple Function)
by Root on Feb.24, 2009, under Php, programlama, zend
Ok. In my new project we have a lot of dymanic part. This part actually not up-to-date every time. (maybe one or two times in a day). If we use html for this part , we are so tried to update it. If we use sql all time (daily 2k+ visitor and growing) system to slow. And hero is come Zend Cache.
Zend Cache is very good for our job. We can use for it some part to cache. And other parts is dynamic.
This is our site (Plan
) // Ok i know this is table
. But system is not.
| No Cache Needed (logo) | ||
| Cache for 2 hours | Cache for 10 minutes | No Cache Needed |
| Cache for 1 day | Cache for 1 Day | |
| No Cache Needed | Cache for 10 minutes | No Cache Needed |
| No Cache Needed (down link,address,telephones) | ||
Ok. There is very important. More user means more sql and more sql means more slow.
And answer is Zend: Here my function for zend cache.
Test on 1.7 framework.
Important PS: In my project (pls look) every work evalute in indexController class. You can write any where you needed.
Insert this code on your code. (i put this code indexController )