Kadir Özdemir

  • Ben Kimim
  • PHP
  • Sencha Touch
  • Home/
  • PHP /
  • Smarty kullanimi

Smarty kullanimi

Skorp 01.02.2008 1 Comment

Herkeze Merhaba,
burda yazdigimiz konuda smarty yi nasil kurcanizi söylemistik.
Simdi ise Smartyde her sayfada
$smarty->template_dir
$smarty->config_dir
$smarty->cache_dir
$smarty->compile_dir
bu degiskenleri yeniden doldurmamak icin basit bir sinif olusturup buna Smarty den miras almasini sagliyacagiz.
Böylelikle yeni yapmis oldugumuz Smarty sinifindan bir Instance (kopya) alip islemlerimize devam ede biliriz.

bunu SmartyTest.php adinda kaydedin

require_once('Smarty/libs/Smarty.class.php');
class SmartyTest extends Smarty{
function SmartyTest()
{
$this->Smarty();
$this->template_dir = 'Smarty/templates';
$this->compile_dir = 'Smarty/templates_c';
$this->config_dir = 'Smarty/configs';
$this->cache_dir = 'Smarty/cache';
}
}
böylelikle $this->template_dir,$this->compile_dir,$this->config_dir,$this->cache_dir
hepsi root klasörümüzde (html) Smarty klasörü icini gösteriyor.kullanim cok basit
require_once("SmartyTest.php");
$smarty = new SmartyTest;
...

Kolay gelsin sorunuz sora bilirsiniz.

Skorp
2008-02-01
Tags:
PHP Smarty
Share story:
← PreviousTarih degisme
Next →slashle biten adresler

Written by Skorp

View all articles by Skorp

Website: http://www.skorp.eu

Related Articles

  • Silverstripe snippetler

  • Silverstripe login sorunu

  • Silverstripe: Sorgulari Cachleme

  • Php 5.4 yayinlandi

  • Silverstripe yeni sayfa tipleri

Leave a Comment Cancel Reply

Your email address will not be published. Required fields are marked *

Social networks

Etiket Bulutu

Android Bilgisayar & Internet C# Cms css diger Kodlar featured Genel Java Javascript Linux Mobile PHP Silverstripe typo3 Veritabani Windows Zend Framework

Links

  • H E R K O N U
  • Hüseyin Koyun
  • Urban23k

Son Yorumlar

  • Primary Key – Unique ve Index nedir? için Onur
  • Centos de apache, php ve mysql kurulumu için sezer fidancı
  • React Native – Kurulum için React Native | Kadir Özdemir
  • React Native için React Native – Kurulum | Kadir Özdemir
  • Ben Kimim için serkan

Twitter

Follow @skorp54
There is an error in twitter widget, please make sure that you have set up the Twitter API settings
  • Ben Kimim
  • PHP
  • Sencha Touch

Arsivler

Kategoriler

Copyright © 2014 webberz.at