Php Ders 2 – Değişken Aktarımı

Bu ders sonunda temel seviyede “program okumayı” öğrenmiş olacaksınız.

Değişkenin ne olduğunu bilmiyorsanız öncelikle şu dersi okuyup gelin. Değişken nedir ?

 

Önemli: Bu ders program okuma açısından öğrenmeniz gerekli en önemli derstir. Nasıl ki okulda Alfabeyi veya sayıları öğrenmek önemliyse sizin için de program okumak o kadar önemlidir. Bu sebeple bu dersi en az 3 kere baştan sona okuma şartı var. yoksa devam etmeyin. smiley (Hoca ağır konuştu, dikkatinizi toplasanız iyi olur)

 

 

Değişkenler içersinde bilgi depolandığını öğrendik. Birde değişkenler arasında bilgi alış-verişi yapılabilir. fakat bu konu gerçek hayattaki alışverişten biraz farklıdır.

 

Şöyle ki: diyelim elimizde $oyuncak isimli bir değişken var. Bu değişken içine “Araba” konulmuş durumda.

Şimdi biz $oyuncak kutusuna başka birşey koymak istiyoruz ama elimizdeki Araba´yı da kaybetmek istemiyoruz. Bunun için “Araba”yı , $yenikutu isimli bir değişkene aktaracağız.

 

 

$oyuncak=”Araba”;

$yenikutu = $oyuncak ;

 

Şu durumda $yenikutu=”Araba” yazmakla aynı şeyi yaptık denebilir. Burada dikkat etmeniz gereken konu yenikutu=oyuncak olmuyor. yani içindeki bilgi aktarılmış oluyor.

Diğer bir önemli nokta ise $oyuncak isimli kutu boşalmıyor. yani bu işlem sonunda print $oyuncakşeklinde bir komut verirsek ekranımızda Araba ismini görürüz.

 

Şimdi olayı bir adım daha ilerletelim.

 

$oyuncak=”Araba”;

$yenikutu = $oyuncak ;

$yenikutu= “Bebek”;

Soru şu: Son durumda $yenikutu içinde ne var ?

cevap: Bebek

Program okuma sırasında her satıra tek tek bakıyoruz. ve hiçbir zaman yukarıdakilere dikkat etmiyoruz. Az önce içine başka birşey gelmiş olabilir ama son durumda yenikutu içine ne gelmişse o mevcuttur. Diğleri kaybolup gider. Yeni kutuya iki eşya konuldu diye düşünmüyorsunuz. Yeni bir eşya konulduğunda diğeri kaybolur.

 

 

Şimdi de matematiksel bir işlemle bir örnek yapalım.

 

$kutu= 5 ;

$kutu = 3 +1;

print $kutu ;

Soru şu: Son durumda kutu içinde kaç sayısı var ?

A- 5
B- 4
C- 9
D- Ördek
E- Tavuk

Tavuk diyenleri bir süpriz bekliyor. Diğerleri cevabını aşağıya yazsın.

smiley

Be the first to comment - What do you think?  Posted by trkodlama - 20/01/2013 at 02:50

Categories: PHP Dersleri   Tags: , , , ,

Php Ders 1 – Değişken Kavramı

Bilgisayarınızda php programı yoksa önce şu konuyu okuyun:
Php kurulumu resimli anlatım
Php kurulumu Videolu ders

Değişken Nedir ?

Bu ders sonunda değişkenin ne olduğunu ve nasıl kullanıldığını öğrenmiş olacaksınız.

 

Önemli: Php öğrenmek istiyorsanız değişken kavramını çok iyi anlamalısınız. Bu konu birçok derste kısaca birkaç cümle ile anlatılıp geçilmektedir. Fakat iyi bir programcı değişkenlere hakim olan kişidir. Özellikle diziler konusuna gelince beni daha iyi anlayacaksınız.

 

Php de her programlama dili gibi bilgisayar hafızasındaki bilgilerle çalışır. bunun sunucu makinelerde olması farketmez, durum aynıdır.

 

En basit hali ile değişkeni bir kutu olarak düşünebiliriz. Kutu ne işe yarar içine eşyalar koymaya yarar.

degisken1

Şimdi evinizde böyle bir kutu olduğunu düşünün. içersine eşyalar koyuyorsunuz. ve üzerindeki bu ismi değiştirebiliyorsunuz. Herhalde evinizde böyle bir kutu olsa üstüne “Değişken” yazmayacaktınız. Diyelim ki içine Oyuncaklarınızı koymak istediniz bu durumda kutunun üstüne ne yazardınız. şunlardan birini seçin.

  • Plastik ördek
  • Oyuncak
  • Gereksiz eşya

degisken2

Ben olsam Oyuncak yazardım. çünkü daha kısa ve içindekileri doğru temsil ediyor. Plastik ördek diyenler büyük hata yapmış oldu çünkü kutuya sadece ördek koymayacağız. Bu sebeple daha genel bir isim yazmamız gerekiyor. Gereksiz eşya yazabilirsiniz ama buradaki sorun da şu: kutuyu kapatırsanız içinde ne oldğunu hatırlamak zor olacaktır.

 

Eğer burdaki mantığı anladıysanız Php programlama da bundan daha karışık değil. Fakat ille de kutuya“Arabam” yazmak isteyenler okumayı bırakıp bir oto tamircisinde işe girebilir. daha kısa yoldan para kazanmış olurlar ve sevdikleri işi yapmış olurlar smiley

 

Şimdi gelelim işin Php kısmına. Php ile değişken yaparken başına harfi yazmak gerekiyor (bakıyorum paryı gördünüz gözünüz açıldı, işte php böyle birşey daha öğrenmeden paranın ucunu gösteriyor). yukarıdaki örneğe uygun olarak oyuncak isimli bir değişken yazarsak. $oyuncak şeklinde yazmamız gerekiyor.

ve işte ilk php kodumuz geliyor.

 

$oyuncak=“Ördek”;

 

 

Bunu açıklarsak, oyuncak isimli değişkene Ördek koymuş olduk. Yukarıdaki kutuda sadece ördek olduğunu düşünürseniz kolayca anlarsınız. üstünde Oyuncak yazan kutuya ördek koyduk.

Şimdi ördeğimizi biraz geliştiriyoruz. (pardon örneğimizi dicektim) smiley okuyormusunuz diye kontrol ettim. Programlama diyince korkanlar için ortamı yumuşatıyorum.

 

$oyuncak=“Araba”;

 

Şu anda kutuya Araba koyduk. burada dikkat edeceğiniz nokta artık kutuda ördek yok. peki ördek nereye gitti diyeceksiniz. ördek öldü. uçtu. kayboldu. Yani kutuya yeni birşey koyunca eskisi kaybolur. eskisi size lazımsa kendinize başka bir kutu yapmalısınız. şöyle ki:

 

$oyuncak1=“Ördek”;

$oyuncak2=“Araba”;

 

 

Gördünüz mü bilgisayarda kutu üretmek çok kolay (yani değişken) Ufak ufak sizi değişken demeye alıştıralım. kutu çocuklar için, sen büyüdün artık. kocaman oldun. Değişken de bakayım, D-e-ğ-i-ş-k-e-n… afferiiim. smiley

 

Şimdi gelelim bu değişkenle neler yapabileceğimize, tamam öğrendik ama bunu nasıl kullanacağız :

Örnek: Diyelim ki web sitemizde birsürü çocuk üyemiz var. ve bu üyelerin hangi tür oyuncak sevdiğini kaydettikleri bir bölüm yaptık. sonra biz bunları üye profili sayfasında göstermek istiyoruz. (Kaydet tuşuna falan kafayı taklayın. onları da kolayca öğretecem)

 

Örneğin: Ali diye bir üyemiz var. ve Araba seviyor. profili de şöyle görünmeli

üye adı: Ali
Ali, Araba ile oynamayı seviyor.

 

Alinin profiline giren herkes yukarıdaki gibi bir yazı görüyor. şimdi bu yazıyı kim hazırlayacak. tabii ki siz.

 

Bunu yazdırmak için şöyle bir kodlama yapmış olmamız gerekiyor.

 

print ” Üye adı $isim ”;

print “ $isim , $oyuncak ile oynamayı seviyor”

Burada print komutuna kafayı takmayın. sadece tırnak içindekileri gösteriyor, kendisi görünmüyor. yani siteye girenler Print kısmını görmüyor sadece tırnak içindekini görüyor. bakalım ne var tırnak içinde.

$isim ve $oyuncak diğerleri aynen ekranda görünüyor. bu ikisi ise bildiğiniz gibi hayali kutular. içinde ne varsa onu gösteriyor.

 

şimdi aşağıdaki kodları anlamaya çalışalım.

 

$isim=”Ayşe”;
$oyuncak=”Bebek”;
print

” Üye adı $isim ”;print “ $isim , $oyuncak ile oynamayı seviyor”

 

Bilin bakalım bu sayfaya biri girdiğinde ne görecek:

 

üye adı: Ayşe
Ayşe, Bebek ile oynamayı seviyor.

 

 

Peki şöyle bir sayfamız olsa, bu sayfaya girenler ne görecekti

$isim=”Necmi”;
$oyuncak=”Transformers”;
print

” Üye adı $isim ”;print “ $isim , $oyuncak ile oynamayı seviyor”

Bu ödeviniz olsun. bunu yapanlar aşağıya cevabını yazabilir. cevabı doğru yazanlar diğer derse geçebilir.

Ders okumaktan yorulduysanız bir ıslak kek tarifi okuyup kendinize gelebilirsiniz.
Dikkat: Değişken konusu çok önemlidir. Diğer konulara temel olacağı için bunu iyice öğrenmelisiniz.

Be the first to comment - What do you think?  Posted by trkodlama - at 02:45

Categories: PHP Dersleri   Tags: , , , , ,

Php Kurulumu – Video Ders

ilk video dersimiz hayırlı olsun. smiley Talep durumuna göre devamı gelecek.

Video Dosyasını bilgisayarına indir:

http://freakshare.com/files/s4mmq148/php-kurulum.mp4.html

 

Bu derste Php kurulumu Wamp programı ile anlatılmıştır.

Wamp indirmek için şu adresten web sayfasını ziyaret edebilirsiniz: Wamp indir

veya şu adresten direkt indirme linkine tıklayabilirsiniz: sourceforge

Be the first to comment - What do you think?  Posted by trkodlama - at 02:43

Categories: PHP Dersleri   Tags: , , ,

Php Kurulumu – Resimli Anlatım

Php işletim sistemine kurum sırasında Apache,Php ve Mysql olarak üç ayrı bölümde kurulur. Fakat Windows kullanıcıları için kolay kurulum paketleri vardır. Aşağıdaki yazılımları indirerek çok kısa sürede Php kurulumu yapabilirsiniz. Her bir program kendi setup paketine sahip olduğu için fazla uğraşmanıza gerek kalmaz. Özellikle php´yi yeni öğrenenler için çok faydalı olacaktır.

 

Dikkat: Bunların hepsini indirmeyin. Sadece Wamp yazanı indirin yeter.

 

  • WAMP Server

http://www.wampserver.com/en/download.php

  • EasyPHP Server

http://www.easyphp.org

  • PHPTriad Server (eski)

http://sourceforge.net/projects/phptriad/

  • Appser Server

http://www.appservnetwork.com/

  • XAMPP Server

http://sourceforge.net/projects/xampp/

  • Wos Portable

http://www.chsoftware.net/en/useware/mowes/mowes.htm

 

Windows için Wamp indirip server kurabilirsiniz. Php 5 kullanan oldukça güncel bir yazılımdır.Programı indirdikten sonra Next seçeneklerine tıklayıp kurulumu bitirin.

Kurulum bittiğinde C:/Wamp klasörünü açıp bakabilirsiniz. klasör içinde C:/Wamp/www klasörü bizim web sayfamızı temsil eden klasör olacaktır. yaptığınız Php dosyalarını denemek için buraya atmanız yeterli.

 

Wamp programını başlattan çalıştırdıktan sonra başlat çubuğunun sağında sistem ikonunda yeni bir işaret göreceksiniz. “Start All Services” diyerek Php sunucuyu başlatabilirsiniz.

wamp

buna tıklayınca Languages-Türkçe diyerek dilini değiştirebilirsiniz. 2-3 saniye sonra program türkçe olacaktır. Tekrar tıklayıp bütün servisleri başlat derseniz Php dosyalarınız denenmeye hazır demektir.

Be the first to comment - What do you think?  Posted by trkodlama - at 02:41

Categories: PHP Dersleri   Tags: , ,

Tutorial − News section

In the last section, we went over some basic concepts of the framework by writing a class that includes static pages. We cleaned up the URI by adding custom routing rules. Now it’s time to introduce dynamic content and start using a database.

Setting up your model

Instead of writing database operations right in the controller, queries should be placed in a model, so they can easily be reused later. Models are the place where you retrieve, insert, and update information in your database or other data stores. They represent your data.

Open up the application/models directory and create a new file called news_model.php and add the following code. Make sure you’ve configured your database properly as described here.

<?php
class News_model extends CI_Model {

	public function __construct()
	{
		$this->load->database();
	}
}

This code looks similar to the controller code that was used earlier. It creates a new model by extending CI_Model and loads the database library. This will make the database class available through the $this->db object.

Before querying the database, a database schema has to be created. Connect to your database and run the SQL command below. Also add some seed records.

CREATE TABLE news (
	id int(11) NOT NULL AUTO_INCREMENT,
	title varchar(128) NOT NULL,
	slug varchar(128) NOT NULL,
	text text NOT NULL,
	PRIMARY KEY (id),
	KEY slug (slug)
);

Now that the database and a model have been set up, you’ll need a method to get all of our posts from our database. To do this, the database abstraction layer that is included with CodeIgniter — Active Record — is used. This makes it possible to write your ‘queries’ once and make them work on all supported database systems. Add the following code to your model.

public function get_news($slug = FALSE)
{
	if ($slug === FALSE)
	{
		$query = $this->db->get('news');
		return $query->result_array();
	}

	$query = $this->db->get_where('news', array('slug' => $slug));
	return $query->row_array();
}

With this code you can perform two different queries. You can get all news records, or get a news item by its slug. You might have noticed that the $slug variable wasn’t sanitized before running the query; Active Record does this for you.

Display the news

Now that the queries are written, the model should be tied to the views that are going to display the news items to the user. This could be done in our pages controller created earlier, but for the sake of clarity, a new “news” controller is defined. Create the new controller at application/controllers/news.php.

<?php
class News extends CI_Controller {

	public function __construct()
	{
		parent::__construct();
		$this->load->model('news_model');
	}

	public function index()
	{
		$data['news'] = $this->news_model->get_news();
	}

	public function view($slug)
	{
		$data['news'] = $this->news_model->get_news($slug);
	}
}

Looking at the code, you may see some similarity with the files we created earlier. First, the “__construct” method: it calls the constructor of its parent class (CI_Controller) and loads the model, so it can be used in all other methods in this controller.

Next, there are two methods to view all news items and one for a specific news item. You can see that the $slug variable is passed to the model’s method in the second method. The model is using this slug to identify the news item to be returned.

Now the data is retrieved by the controller through our model, but nothing is displayed yet. The next thing to do is passing this data to the views.

public function index()
{
	$data['news'] = $this->news_model->get_news();
	$data['title'] = 'News archive';

	$this->load->view('templates/header', $data);
	$this->load->view('news/index', $data);
	$this->load->view('templates/footer');
}

The code above gets all news records from the model and assigns it to a variable. The value for the title is also assigned to the $data['title'] element and all data is passed to the views. You now need to create a view to render the news items. Create application/views/news/index.php and add the next piece of code.

<?php foreach ($news as $news_item): ?>

    <h2><?php echo $news_item['title'] ?></h2>
    <div id="main">
        <?php echo $news_item['text'] ?>
    </div>
    <p><a href="news/<?php echo $news_item['slug'] ?>">View article</a></p>

<?php endforeach ?>

Here, each news item is looped and displayed to the user. You can see we wrote our template in PHP mixed with HTML. If you prefer to use a template language, you can use CodeIgniter’s Template Parser class or a third party parser.

The news overview page is now done, but a page to display individual news items is still absent. The model created earlier is made in such way that it can easily be used for this functionality. You only need to add some code to the controller and create a new view. Go back to the news controller and add the following lines to the file.

public function view($slug)
{
	$data['news_item'] = $this->news_model->get_news($slug);

	if (empty($data['news_item']))
	{
		show_404();
	}

	$data['title'] = $data['news_item']['title'];

	$this->load->view('templates/header', $data);
	$this->load->view('news/view', $data);
	$this->load->view('templates/footer');
}

Instead of calling the get_news() method without a parameter, the $slug variable is passed, so it will return the specific news item. The only things left to do is create the corresponding view at application/views/news/view.php. Put the following code in this file.

<?php
echo '<h2>'.$news_item['title'].'</h2>';
echo $news_item['text'];

Routing

Because of the wildcard routing rule created earlier, you need need an extra route to view the controller that you just made. Modify your routing file (application/config/routes.php) so it looks as follows. This makes sure the requests reaches the news controller instead of going directly to the pages controller. The first line routes URI’s with a slug to the view method in the news controller.

$route['news/(:any)'] = 'news/view/$1';
$route['news'] = 'news';
$route['(:any)'] = 'pages/view/$1';
$route['default_controller'] = 'pages/view';

Point your browser to your document root, followed by index.php/news and watch your news page.

Be the first to comment - What do you think?  Posted by trkodlama - 04/12/2012 at 01:04

Categories: CodeIgniter Framework, CodeIgniter User Guide, PHP Frameworks   Tags:

Tutorial − Static pages

Note: This tutorial assumes you’ve downloaded CodeIgniter and installed the framework in your development environment.

The first thing you’re going to do is set up a controller to handle static pages. A controller is simply a class that helps delegate work. It is the glue of your web application.

For example, when a call is made to:http://example.com/news/latest/10We might imagine that there is a controller named “news”. The method being called on news would be “latest”. The news method’s job could be to grab 10 news items, and render them on the page. Very often in MVC, you’ll see URL patterns that match:http://example.com/[controller-class]/[controller-method]/[arguments]As URL schemes become more complex, this may change. But for now, this is all we will need to know.

Create a file at application/controllers/pages.php with the following code.

You have created a class named “pages”, with a view method that accepts one argument named $page. The pages class is extending the CI_Controller class. This means that the new pages class can access the methods and variables defined in the CI_Controller class (system/core/Controller.php).

The controller is what will become the center of every request to your web application. In very technical CodeIgniter discussions, it may be referred to as thesuper object. Like any php class, you refer to it within your controllers as $this. Referring to $this is how you will load libraries, views, and generally command the framework.

Now you’ve created your first method, it’s time to make some basic page templates. We will be creating two “views” (page templates) that act as our page footer and header.

Create the header at application/views/templates/header.php and add the following code.

The header contains the basic HTML code that you’ll want to display before loading the main view, together with a heading. It will also output the $title variable, which we’ll define later in the controller. Now create a footer at application/views/templates/footer.php that includes the following code:

Adding logic to the controller

Earlier you set up a controller with a view() method. The method accepts one parameter, which is the name of the page to be loaded. The static page templates will be located in the application/views/pages/ directory.

In that directory, create two files named home.php and about.php. Within those files, type some text − anything you’d like − and save them. If you like to be particularly un-original, try “Hello World!”.

In order to load those pages, you’ll have to check whether the requested page actually exists:

public function view($page = 'home')
{

	if ( ! file_exists('application/views/pages/'.$page.'.php'))
	{
		// Whoops, we don't have a page for that!
		show_404();
	}

	$data['title'] = ucfirst($page); // Capitalize the first letter

	$this->load->view('templates/header', $data);
	$this->load->view('pages/'.$page, $data);
	$this->load->view('templates/footer', $data);

}

Now, when the page does exist, it is loaded, including the header and footer, and displayed to the user. If the page doesn’t exist, a “404 Page not found” error is shown.

The first line in this method checks whether the page actually exists. PHP’s native file_exists() function is used to check whether the file is where it’s expected to be.show_404() is a built-in CodeIgniter function that renders the default error page.

In the header template, the $title variable was used to customize the page title. The value of title is defined in this method, but instead of assigning the value to a variable, it is assigned to the title element in the $data array.

The last thing that has to be done is loading the views in the order they should be displayed. The second parameter in the view() method is used to pass values to the view. Each value in the $data array is assigned to a variable with the name of its key. So the value of $data['title'] in the controller is equivalent to $title in the view.

 

Routing

The controller is now functioning! Point your browser to [your-site-url]index.php/pages/view to see your page. When you visit index.php/pages/view/aboutyou’ll see the about page, again including the header and footer.

Using custom routing rules, you have the power to map any URI to any controller and method, and break free from the normal convention:http://example.com/[controller-class]/[controller-method]/[arguments]

Let’s do that. Open the routing file located at application/config/routes.php and add the following two lines. Remove all other code that sets any element in the$route array.

$route['default_controller'] = 'pages/view';
$route['(:any)'] = 'pages/view/$1';

CodeIgniter reads its routing rules from top to bottom and routes the request to the first matching rule. Each rule is a regular expression (left-side) mapped to a controller and method name separated by slashes (right-side). When a request comes in, CodeIgniter looks for the first match, and calls the appropriate controller and method, possibly with arguments.

More information about routing can be found in the URI Routing documentation.

Here, the second rule in the $routes array matches any request using the wildcard string (:any). and passes the parameter to the view() method of the pages class.

Now visit index.php/about. Did it get routed correctly to the view() method in the pages controller? Awesome!

Be the first to comment - What do you think?  Posted by trkodlama - at 01:03

Categories: CodeIgniter Framework, CodeIgniter User Guide, PHP Frameworks   Tags:

Tutorial − Introduction

This tutorial is intended to introduce you to the CodeIgniter framework and the basic principles of MVC architecture. It will show you how a basic CodeIgniter application is constructed in step-by-step fashion.

In this tutorial, you will be creating a basic news application. You will begin by writing the code that can load static pages. Next, you will create a news section that reads news items from a database. Finally, you’ll add a form to create news items in the database.

This tutorial will primarily focus on:

  • Model-View-Controller basics
  • Routing basics
  • Form validation
  • Performing basic database queries using “Active Record”

The entire tutorial is split up over several pages, each explaining a small part of the functionality of the CodeIgniter framework. You’ll go through the following pages:

  • Introduction, this page, which gives you an overview of what to expect.
  • Static pages, which will teach you the basics of controllers, views and routing.
  • News section, where you’ll start using models and will be doing some basic database operations.
  • Create news items, which will introduce more advanced database operations and form validation.
  • Conclusion, which will give you some pointers on further reading and other resources.

Enjoy your exploration of the CodeIgniter framework.

Be the first to comment - What do you think?  Posted by trkodlama - at 01:03

Categories: CodeIgniter Framework, CodeIgniter User Guide, PHP Frameworks   Tags:

Design and Architectural Goals

Our goal for CodeIgniter is maximum performance, capability, and flexibility in the smallest, lightest possible package.

To meet this goal we are committed to benchmarking, re-factoring, and simplifying at every step of the development process, rejecting anything that doesn’t further the stated objective.

From a technical and architectural standpoint, CodeIgniter was created with the following objectives:

  • Dynamic Instantiation. In CodeIgniter, components are loaded and routines executed only when requested, rather than globally. No assumptions are made by the system regarding what may be needed beyond the minimal core resources, so the system is very light-weight by default. The events, as triggered by the HTTP request, and the controllers and views you design will determine what is invoked.
  • Loose Coupling. Coupling is the degree to which components of a system rely on each other. The less components depend on each other the more reusable and flexible the system becomes. Our goal was a very loosely coupled system.
  • Component Singularity. Singularity is the degree to which components have a narrowly focused purpose. In CodeIgniter, each class and its functions are highly autonomous in order to allow maximum usefulness.

CodeIgniter is a dynamically instantiated, loosely coupled system with high component singularity. It strives for simplicity, flexibility, and high performance in a small footprint package.

Be the first to comment - What do you think?  Posted by trkodlama - at 01:01

Categories: CodeIgniter Framework, CodeIgniter User Guide, PHP Frameworks   Tags:

Model-View-Controller

CodeIgniter is based on the Model-View-Controller development pattern. MVC is a software approach that separates application logic from presentation. In practice, it permits your web pages to contain minimal scripting since the presentation is separate from the PHP scripting.

  • The Model represents your data structures. Typically your model classes will contain functions that help you retrieve, insert, and update information in your database.
  • The View is the information that is being presented to a user. A View will normally be a web page, but in CodeIgniter, a view can also be a page fragment like a header or footer. It can also be an RSS page, or any other type of “page”.
  • The Controller serves as an intermediary between the Model, the View, and any other resources needed to process the HTTP request and generate a web page.

CodeIgniter has a fairly loose approach to MVC since Models are not required. If you don’t need the added separation, or find that maintaining models requires more complexity than you want, you can ignore them and build your application minimally using Controllers and Views. CodeIgniter also enables you to incorporate your own existing scripts, or even develop core libraries for the system, enabling you to work in a way that makes the most sense to you.

Be the first to comment - What do you think?  Posted by trkodlama - at 01:01

Categories: CodeIgniter Framework, CodeIgniter User Guide, PHP Frameworks   Tags:

Application Flow Chart

The following graphic illustrates how data flows throughout the system:

CodeIgniter application flow
  1. The index.php serves as the front controller, initializing the base resources needed to run CodeIgniter.
  2. The Router examines the HTTP request to determine what should be done with it.
  3. If a cache file exists, it is sent directly to the browser, bypassing the normal system execution.
  4. Security. Before the application controller is loaded, the HTTP request and any user submitted data is filtered for security.
  5. The Controller loads the model, core libraries, helpers, and any other resources needed to process the specific request.
  6. The finalized View is rendered then sent to the web browser to be seen. If caching is enabled, the view is cached first so that on subsequent requests it can be served.

Be the first to comment - What do you think?  Posted by trkodlama - at 01:01

Categories: CodeIgniter Framework, CodeIgniter User Guide, PHP Frameworks   Tags:

Next Page »