<?xml version="1.0" encoding="UTF-8" standalone="no"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:georss="http://www.georss.org/georss" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-8423573573498626078</atom:id><lastBuildDate>Fri, 23 Oct 2026 14:06:24 +0000</lastBuildDate><category>PHP interview questions</category><category>MVC framework</category><category>Codeigniter</category><category>C type comments in PHP</category><category>CMS</category><category>Configuaration</category><category>Download</category><category>HTACCESS</category><category>HTML form submit</category><category>Java script redirect</category><category>Joomla</category><category>Multiple Line Comments in PHP</category><category>Oneline Comments in PHP</category><category>PHP Comments</category><category>PHP error</category><category>PHP frameworks</category><category>PHP functions</category><category>PHP headers</category><category>PHP include functions</category><category>PHP methods</category><category>PHP redirect</category><category>PHP session</category><category>array_slice</category><category>array_splice</category><category>define</category><category>header function</category><category>include</category><category>is_header</category><category>method get</category><category>method post</category><category>move_uploaded_file</category><category>multi language websites</category><category>mysql functions in PHP</category><category>require</category><category>session destroy</category><category>unlink</category><category>unset</category><category>upload files in php</category><category>urldecode</category><category>urlencode</category><title>PHP Tutorials</title><description>Hi, My name is Prasad. I am a Zend certified PHP programmer. I am working as a project lead. In this blog I am clarifying the doubts asked by my team members. And also I will be posting the articles for PHP,MVC Frameworks, Drupal,Joomla etc.., My focus is to write articles that will either teach you or help you resolve a problem.</description><link>http://phpsyntax.blogspot.com/</link><managingEditor>noreply@blogger.com (Anonymous)</managingEditor><generator>Blogger</generator><openSearch:totalResults>27</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:subtitle>Hi, My name is Prasad. I am a Zend certified PHP programmer. I am working as a project lead. In this blog I am clarifying the doubts asked by my team members. And also I will be posting the articles for PHP,MVC Frameworks, Drupal,Joomla etc.., My focus is</itunes:subtitle><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8423573573498626078.post-1941094081804296859</guid><pubDate>Mon, 20 Aug 2012 07:37:00 +0000</pubDate><atom:updated>2012-08-20T00:55:31.764-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Codeigniter</category><category domain="http://www.blogger.com/atom/ns#">Configuaration</category><category domain="http://www.blogger.com/atom/ns#">MVC framework</category><title>Codeigniter Initial Configuration</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
&lt;div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;"&gt;
&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-bidi-font-family: Palatino-Roman;"&gt;In
this section, you learn the ins and outs of the files inside the application/config/
folder. Four of them are important for your project and they are :&lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;

&lt;span style="font-family: Symbol; font-size: 12.0pt; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-bidi-font-family: Palatino-Roman;"&gt;config.php&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; mso-bidi-font-family: Palatino-Roman;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Palatino-Roman;"&gt;database.php&lt;/span&gt;&lt;span style="font-size: 12.0pt; line-height: 115%;"&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Palatino-Roman;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Palatino-Roman;"&gt;autoload.php&lt;/span&gt;&lt;span style="font-size: 12.0pt; line-height: 115%;"&gt;&lt;/span&gt;&lt;span style="font-family: Symbol; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-family: Symbol; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;"&gt;&lt;span style="mso-list: Ignore;"&gt;&lt;span style="font: 7.0pt &amp;quot;Times New Roman&amp;quot;;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;routes.php&amp;nbsp;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Palatino-Roman;"&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style="text-align: left;"&gt;
&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Palatino-Roman;"&gt;&amp;nbsp;Config.php&lt;/span&gt;&lt;/h2&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Palatino-Roman;"&gt;&amp;nbsp;The config.php file contains a series of configuration options (all of them stored in a PHP array called,appropriately enough, $config ) that &lt;a href="http://www.codeigniter.com/" target="_blank"&gt;CodeIgniter &lt;/a&gt;uses to keep track of your application ’ s information and settings. The first configuration option you need to set inside config.php is the base URL of your application. You do that by setting the absolute URL (including the http:// part) for $config[ ‘ base_url ’ ] , like so:&lt;/span&gt;&lt;/div&gt;
&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Palatino-Roman;"&gt;&lt;br /&gt;&lt;span style="background-color: white; color: blue;"&gt;$config[‘base_url’] = “http://www.example.com/test/”;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Palatino-Roman;"&gt;&lt;span style="background-color: white; color: blue;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Palatino-Roman;"&gt;Once you ’ ve set this configuration option, you can recall it whenever you want using the CodeIgniter base_url() function, which can be a very handy thing to know. This one feature keeps you from having to&amp;nbsp; rewrite hard - coded URLs in your application, when you migrate from development to test or from test to production.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Palatino-Roman;"&gt;The second thing you need to do is set a value for your home page by editing the $config[ ‘ index_page ’ ] configuration option. &lt;a href="http://www.codeigniter.com/" target="_blank"&gt;CodeIgniter &lt;/a&gt;ships with a value of “ index.php ” for this option, which means that index.php will appear in all of your URLs. Many &lt;a href="http://www.codeigniter.com/" target="_blank"&gt;CodeIgniter &lt;/a&gt;developers prefer to keep this value blank, like so:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Palatino-Roman;"&gt;&lt;br /&gt;&lt;span style="background-color: white; color: blue;"&gt;$config[‘index_page’] = ‘’;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Palatino-Roman;"&gt;&lt;br /&gt;To make this work, you need to include an .htaccess file to the &lt;a href="http://www.codeigniter.com/" target="_blank"&gt;CodeIgniter &lt;/a&gt;root directory, After you ’ ve set this option value, there ’ s very little to do. For now, leave all the other values at their default settings:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Palatino-Roman;"&gt;&lt;br /&gt;&lt;span style="background-color: white; color: blue;"&gt;$config[‘uri_protocol’] = “AUTO”;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;$config[‘url_suffix’] = “”;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;br /&gt;$config[‘language’] = “english”;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;$config[‘charset’] = “UTF-8”;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;$config[‘enable_hooks’] = FALSE; &lt;br /&gt;$config[‘subclass_prefix’] = ‘MY_’;&lt;br /&gt;$config[‘permitted_uri_chars’] = ‘a-z 0-9~%.:_-’;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;$config[‘enable_query_strings’] = FALSE;&lt;br /&gt;$config[‘controller_trigger’] = ‘c’;&lt;br /&gt;$config[‘function_trigger’] = ‘m’;&lt;br /&gt;$config[‘log_threshold’] = 0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;$config[‘log_path’] = ‘’;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;$config[‘log_date_format’] = ‘Y-m-d H:i:s’;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Palatino-Roman;"&gt;&lt;span style="background-color: #cccccc;"&gt;&lt;span style="background-color: white; color: blue;"&gt;$config[‘cache_path’] = ‘’;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style="background-color: white; color: blue;" /&gt;&lt;span style="background-color: white; color: blue;"&gt;$config[‘encryption_key’] = “enter_a_32_character_string_here”;&lt;/span&gt;&lt;br style="background-color: white; color: blue;" /&gt;&lt;span style="background-color: white; color: blue;"&gt;$config[‘sess_cookie_name’] = ‘ci_session’;&lt;/span&gt;&lt;br style="background-color: white; color: blue;" /&gt;&lt;span style="background-color: white; color: blue;"&gt;$config[‘sess_expiration’] = 7200;&lt;/span&gt;&lt;br style="background-color: white; color: blue;" /&gt;&lt;span style="background-color: white; color: blue;"&gt;$config[‘sess_encrypt_cookie’] = TRUE;&lt;/span&gt;&lt;br style="background-color: white; color: blue;" /&gt;&lt;span style="background-color: white; color: blue;"&gt;$config[‘sess_use_database’] = FALSE;&lt;/span&gt;&lt;br style="background-color: white; color: blue;" /&gt;&lt;span style="background-color: white; color: blue;"&gt;$config[‘sess_table_name’] = ‘ci_sessions’;&lt;/span&gt;&lt;br style="background-color: white; color: blue;" /&gt;&lt;span style="background-color: white; color: blue;"&gt;$config[‘sess_match_ip’] = FALSE;&lt;/span&gt;&lt;br style="background-color: white; color: blue;" /&gt;&lt;span style="background-color: white; color: blue;"&gt;$config[‘sess_match_useragent’] = TRUE;&lt;/span&gt;&lt;br style="background-color: white; color: blue;" /&gt;&lt;span style="background-color: white; color: blue;"&gt;$config[‘cookie_prefix’] = “”;&lt;/span&gt;&lt;br style="background-color: white; color: blue;" /&gt;&lt;span style="background-color: white; color: blue;"&gt;$config[‘cookie_domain’] = “”;&lt;/span&gt;&lt;br style="background-color: white; color: blue;" /&gt;&lt;span style="background-color: white; color: blue;"&gt;$config[‘cookie_path’] = “/”;&lt;/span&gt;&lt;br style="background-color: white; color: blue;" /&gt;&lt;span style="background-color: white; color: blue;"&gt;$config[‘global_xss_filtering’] = TRUE;&lt;/span&gt;&lt;br style="background-color: white; color: blue;" /&gt;&lt;span style="background-color: white; color: blue;"&gt;$config[‘compress_output’] = FALSE;&lt;/span&gt;&lt;br style="background-color: white; color: blue;" /&gt;&lt;span style="background-color: white; color: blue;"&gt;$config[‘time_reference’] = ‘local’;&lt;/span&gt;&lt;br style="background-color: white; color: blue;" /&gt;&lt;span style="background-color: white; color: blue;"&gt;$config[‘rewrite_short_tags’] = FALSE&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Palatino-Roman;"&gt;&lt;b&gt;&lt;span style="background-color: #cccccc;"&gt;&lt;span style="background-color: white; color: blue;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;span style="background-color: #cccccc;"&gt;&lt;span style="background-color: white;"&gt;For more details on each of these configuration options, simply read the comments embedded in /&lt;/span&gt;&lt;span style="background-color: white;"&gt;system/application/config/config.php. You will also get more detail on certain settings as you work &lt;/span&gt;&lt;span style="background-color: white;"&gt;through the sections of the book and tweak the configuration as needed. For example, at some point, you &lt;/span&gt;&lt;span style="background-color: white;"&gt;will want to use encryption for security purposes or set your logging threshold for debugging, and they &lt;/span&gt;&lt;span style="background-color: white;"&gt;both require making changes to this file.&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style="background-color: #cccccc;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style="text-align: left;"&gt;
&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Palatino-Roman;"&gt;&amp;nbsp;database.php&lt;/span&gt;&lt;/h2&gt;
&lt;div style="text-align: justify;"&gt;
&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Palatino-Roman;"&gt;&amp;nbsp;The database.php file contains all the information required to connect to a database. Currently, CodeIgniter supports mysql, mysqli, postgres, odbc, and mssql connections. To connect to your database, simply enter valid information for your hostname, username, password, database name, and database driver. Each of these is stored in the $db array under the “ default ” group, which means you could have numerous connection groups, each with their own unique name. For example, you could have one set of connection variables for your development environment and another for your production environment. As long as you ’ ve set the $active_group variable correctly, your application will keep connected.&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Palatino-Roman;"&gt;&lt;span style="color: blue;"&gt;$active_record = TRUE;&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;$active_group = “default”;&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;$db[‘default’][‘hostname’] = “localhost”;&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;$db[‘default’][‘username’] = “db_username”;&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;$db[‘default’][‘password’] = “db_password”;&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;$db[‘default’][‘database’] = “db_name”;&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;$db[‘default’][‘dbdriver’] = “mysql”;&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;$db[‘default’][‘dbprefix’] = “”;&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;$db[‘default’][‘pconnect’] = TRUE;&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;$db[‘default’][‘db_debug’] = TRUE;&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;$db[‘default’][‘cache_on’] = FALSE;&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;$db[‘default’][‘cachedir’] = “”;&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;$db[‘default’][‘char_set’] = “utf8”;&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;$db[‘default’][‘dbcollat’] = “utf8_general_ci”;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="text-align: left;"&gt;
&lt;br /&gt;
&lt;h2 style="text-align: left;"&gt;
&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;;"&gt;autoload.php&lt;/span&gt;&lt;/h2&gt;
&lt;/div&gt;
&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Palatino-Roman;"&gt;The autoload.php file specifies which systems are automatically loaded by CodeIgniter. There ’ s one school of thought that maintains that the autoloader should be kept as minimal as possible to keep the framework lightweight and nimble, but another school of thought maintains that certain frequently used systems should be autoloaded instead of called at the local level repeatedly. You ’ ll find your own balance as experience and local project needs warrant, but for now, set your options like this:&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Palatino-Roman;"&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;$autoload[‘libraries’] = array(‘database’,’session’,’email’,’validation’);&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;$autoload[‘helper’] = array(‘url’,’form’,’text’,’date’,’security’);&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;$autoload[‘plugin’] = array(‘captcha’);&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;$autoload[‘model’] = array();&lt;/span&gt;&lt;br style="color: blue;" /&gt;&lt;span style="color: blue;"&gt;$autoload[‘config’] = array();&lt;/span&gt;&lt;br /&gt;The first $autoload option, libraries , is a list of libraries that should be loaded. You ’ re going to be using the database, session, e - mail, and form validation libraries a lot in this (and many other) CodeIgniter project(s), thus loading them now makes a good deal of sense. You learn more about these libraries later. The second $autoload option, helper , is a list of helper collections that you will need to get work done. Almost every CodeIgniter project uses the URL, form, and text helpers frequently; it ’ s not a bad idea to have date and security autoloaded as well, particularly as you ’ ll need them to help you parse dates and handle security features. For the time being, keep the third $autoload option, plugin , either blank or filled in with the CAPTCHA plugin, as you may have a need to use CAPTCHA devices in forms for your application for extra security. The fourth $autoload option, model , allows you to autoload models. This is a new feature ofCodeIgniter 1.6. You are going to create two basic models for Claudia ’ s Kids below, one that handles product data and the other that handles category data. When you create those two models, you ’ ll have the opportunity to come back to this file and autoload them. Finally, the fifth $autoload option, config , is where you would list any custom configuration files. As it ’ s unlikely that you ’ ve created any of those at this point, leave it blank.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;h2 style="text-align: left;"&gt;
&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Palatino-Roman;"&gt;routes.php&amp;nbsp;&lt;/span&gt;&lt;/h2&gt;
&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Palatino-Roman;"&gt;The routes.php file lets you remap URI requests to specific controller functions. For example, you may have&amp;nbsp; a controller named site with a function named index . The URI for this controller/function combination might be :&lt;br /&gt;&lt;span style="color: blue;"&gt;http://www.example.com/site/index&lt;/span&gt;&lt;br /&gt;Furthermore, if your site controller had a pages function that accepted a numeric ID for database lookup, the URI might look like this:&lt;br /&gt;&lt;span style="color: blue;"&gt;http://www.example.com/site/pages/4&lt;/span&gt;&lt;br /&gt;In some cases, you might want to remap one or more of these default routes. For example, the second&lt;br /&gt;example might be better displayed as this:&lt;br /&gt;&lt;span style="color: blue;"&gt;http://www.example.com/about_us/&lt;/span&gt;&lt;br /&gt;In that case, your routes.php file would contain a rule like this:&lt;br /&gt;&lt;span style="color: blue;"&gt;$route[‘about_us’] = “site/pages/4”;&lt;/span&gt;&lt;br /&gt;For right now, though, this kind of manipulation falls under “ advanced usage, ” so don ’ t worry too much&lt;br /&gt;about it. However, please do note that this kind of thing is possible. Also, be aware that two “ reserved&lt;br /&gt;routes ” exist: default_controller and scaffolding_trigger.&lt;br /&gt;&lt;span style="color: blue;"&gt;$route[‘default_controller’] = “welcome”;&lt;/span&gt;&lt;br /&gt;The default_controller route tells CodeIgniter which controller should be loaded if no controller is&lt;br /&gt;identified. For simplicity ’ s sake, keep this setting at welcome, because you ’ re going to create a welcome&lt;br /&gt;controller for the project associated with this book.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Palatino-Roman;"&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Palatino-Roman;"&gt;For more information visit the official website of &lt;a href="http://www.codeigniter.com/" target="_blank"&gt;codeigniter &lt;/a&gt;see the &lt;a href="http://codeigniter.com/user_guide/" target="_blank"&gt;userguide&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style="font-family: &amp;quot;Palatino-Roman&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 12.0pt; line-height: 115%; mso-bidi-font-family: Palatino-Roman;"&gt;&amp;nbsp;&lt;/span&gt;







&lt;/div&gt;
</description><link>http://phpsyntax.blogspot.com/2012/08/codeigniter-initial-configuration.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8423573573498626078.post-294623779623641951</guid><pubDate>Sun, 19 Aug 2012 17:26:00 +0000</pubDate><atom:updated>2012-08-20T00:41:13.010-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Codeigniter</category><category domain="http://www.blogger.com/atom/ns#">MVC framework</category><title>Codeigniter Directory Structure</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Now that you have CodeIgniter downloaded and unzipped, take a minute to look at the file structure. Below illustrates the initial folder structure you ’ ll see.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD2_9AYVFhILPWavu9-Bq3gVeFLWxkYPqfY9HdDTAk6PJL33S78JmV_f4WawIolvnfIYIlRxDIp7kp8MEqWaatijueDoy9zTCjvyAiXBaGO-FIhn10oXe5VFQCtWggYMVwWwMYP9W4sTgp/s1600/codeigniter_directory.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD2_9AYVFhILPWavu9-Bq3gVeFLWxkYPqfY9HdDTAk6PJL33S78JmV_f4WawIolvnfIYIlRxDIp7kp8MEqWaatijueDoy9zTCjvyAiXBaGO-FIhn10oXe5VFQCtWggYMVwWwMYP9W4sTgp/s400/codeigniter_directory.png" width="332" /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
You can see three folders and two files in the codeigniter folder. The three folders are application, system and &lt;a href="http://codeigniter.com/user_guide/" target="_blank"&gt;Codeigniter user guide &lt;/a&gt;and the files are index.php and license.txt.Below is the detailed description about the directories.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;The application Folder&lt;/b&gt;— The application folder contains the application you ’ re building. Basically, this&lt;/div&gt;
folder contains your models, views, controllers, and other code (like helpers and class&lt;br /&gt;
extensions). In other words, this folder is where you will work for the project development.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;cache &lt;/b&gt;— The cache folder contains all cached pages for your application. In Chapter 9 , you learn&lt;/div&gt;
more about caching and how to turn your super - speedy development application into a&lt;br /&gt;
blazingly fast live application.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;Config&lt;/b&gt;— The &lt;a href="http://www.phpsyntax.blogspot.in/2012/08/codeigniter-initial-configuration.html"&gt;Know more about config folder&lt;/a&gt;folder is the area where you set the configuration for your application.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;Controllers&lt;/b&gt;— In this folder you will place your class files developed for your application&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;core&lt;/b&gt;— In this folder you will place your base class files of your application&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;errors&lt;/b&gt;— In this folder you will place your application specific error logs&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;helpers&lt;/b&gt;— In this folder you will place the include files use full for your application &lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;hooks&lt;/b&gt;— In this folder you will place the support files use full for your application&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;language&lt;/b&gt;— In this folder you will place language&lt;b&gt;&amp;nbsp; &lt;/b&gt;macros/ define constants.&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;libraries&lt;/b&gt;— In this folder you will place your own developed libraries useful for your application &lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;logs &lt;/b&gt;— The logs folder is the folder CodeIgniter uses to write error and other logs to. &lt;/div&gt;
&lt;b&gt;models&lt;/b&gt;— In this folder you will place your data base fetching logic in&lt;br /&gt;
&lt;b&gt;thirdparty&lt;/b&gt;— In this folder you can place any plugins used for your application&lt;br /&gt;
&lt;b&gt;views—&lt;/b&gt; Most of your work will be in this folder, you will place your html template files.&amp;nbsp;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;b&gt;The system/ Folder&lt;/b&gt;&lt;/div&gt;
The system/ folder is where all the action happens. This folder contains all the CodeIgniter code of&lt;br /&gt;
consequence, organized into various folders:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;core &lt;/b&gt;— The core folder is where CodeIgniter ’ s core classes live. You have almost no&lt;br /&gt;
reason to go in here. All of your work will occur in the application folder. Even if your intent is&lt;br /&gt;
to extend the CodeIgniter core, you would do it with hooks, and hooks live in the application&lt;br /&gt;
folder.&lt;br /&gt;
&lt;b&gt;database &lt;/b&gt;— The database folder contains core database drivers and other database utilities. Again,&lt;br /&gt;
there ’ s no good reason for you to be in this folder.&lt;br /&gt;
&lt;b&gt;fonts &lt;/b&gt;— The fonts folder contains font - related information and utilities. Again, there ’ s no reason&lt;br /&gt;
to spend any time here.&lt;br /&gt;
&lt;b&gt;helpers &lt;/b&gt;— The helpers folder contains standard CodeIgniter helpers (such as date, cookie, and&lt;br /&gt;
URL helpers). You ’ ll make frequent use of helpers in your CodeIgniter career and can even&lt;br /&gt;
extend helpers thanks to improvements introduced in CodeIgniter version 1.6.&lt;br /&gt;
&lt;b&gt;language &lt;/b&gt;— The language folder contains language files. You can ignore it for now.&lt;br /&gt;
&lt;b&gt;libraries &lt;/b&gt;— The libraries folder contains standard CodeIgniter libraries (to help you with e - mail,&lt;br /&gt;
calendars, file uploads, and more). You can create your own libraries or extend (and even&lt;br /&gt;
replace) standard ones, but those will be saved in the application/libraries directory to keep&lt;br /&gt;
them separate from the standard CodeIgniter libraries saved in this particular folder.&lt;br /&gt;
&lt;br /&gt;
For more info visit codeigniter site at &lt;a href="http://www.codeigniter.com/"&gt;www.codeigniter.com&lt;/a&gt; &lt;/div&gt;
</description><link>http://phpsyntax.blogspot.com/2012/08/codeigniter-directory-structure.html</link><author>noreply@blogger.com (Anonymous)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD2_9AYVFhILPWavu9-Bq3gVeFLWxkYPqfY9HdDTAk6PJL33S78JmV_f4WawIolvnfIYIlRxDIp7kp8MEqWaatijueDoy9zTCjvyAiXBaGO-FIhn10oXe5VFQCtWggYMVwWwMYP9W4sTgp/s72-c/codeigniter_directory.png" width="72"/><thr:total>29</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8423573573498626078.post-2157790292973559346</guid><pubDate>Thu, 16 Aug 2012 07:55:00 +0000</pubDate><atom:updated>2012-08-16T00:56:46.256-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Codeigniter</category><category domain="http://www.blogger.com/atom/ns#">Download</category><category domain="http://www.blogger.com/atom/ns#">MVC framework</category><title>Downloading CodeIgniter</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
You can download the latest version of CodeIgniter by going to &lt;a href="http://www.codeigniter.com/"&gt;www.codeigniter.com&lt;/a&gt; and clicking the Download CodeIgniter button on the home page as shown in the below figure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjY7D8xX8MQK-F-FuNbjlgI8sW9HMePiBQYsfQDFNfGw2JeS130qvKRVi4qrxPnGGjk5N1wLscXC0utV7a-bEZ6hwaCJtC-TRvCmqQ9Y9gywxHyiIDVMP8qGnH4wjRoC0MqkgxQxoGn0VEX/s1600/ci.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="193" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjY7D8xX8MQK-F-FuNbjlgI8sW9HMePiBQYsfQDFNfGw2JeS130qvKRVi4qrxPnGGjk5N1wLscXC0utV7a-bEZ6hwaCJtC-TRvCmqQ9Y9gywxHyiIDVMP8qGnH4wjRoC0MqkgxQxoGn0VEX/s320/ci.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
When you click the button, you ' ll get a dialog for downloading a ZIP archive. Either open it in your unzip utility or save it to your hard drive and then open it. &lt;/div&gt;
</description><link>http://phpsyntax.blogspot.com/2012/08/downloading-codeigniter.html</link><author>noreply@blogger.com (Anonymous)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjY7D8xX8MQK-F-FuNbjlgI8sW9HMePiBQYsfQDFNfGw2JeS130qvKRVi4qrxPnGGjk5N1wLscXC0utV7a-bEZ6hwaCJtC-TRvCmqQ9Y9gywxHyiIDVMP8qGnH4wjRoC0MqkgxQxoGn0VEX/s72-c/ci.png" width="72"/><thr:total>3</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8423573573498626078.post-8197040574549128258</guid><pubDate>Mon, 13 Aug 2012 06:13:00 +0000</pubDate><atom:updated>2012-08-12T23:13:45.660-07:00</atom:updated><title>URI routing in Codeigniter</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
The routes.php file lets you remap URI requests to specific controller functions. For example, you may&lt;br /&gt;have a controller named site with a function named index . The URI for this controller/function&lt;br /&gt;combination might be :&lt;br /&gt;
&lt;br /&gt;&lt;span style="background-color: #cccccc;"&gt;http://www.example.com/site/index&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;Furthermore, if your site controller had a pages function that accepted a numeric ID for database&lt;br /&gt;lookup, the URI might look like this:&lt;br /&gt;
&lt;br /&gt;&lt;span style="background-color: #cccccc;"&gt;http://www.example.com/site/pages/4&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;In some cases, you might want to remap one or more of these default routes. For example, the second&lt;br /&gt;example might be better displayed as this:&lt;br /&gt;
&lt;br /&gt;&lt;span style="background-color: #cccccc;"&gt;http://www.example.com/about_us/&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;In that case, your routes.php file would contain a rule like this:&lt;br /&gt;
&lt;br /&gt;&lt;span style="background-color: #cccccc;"&gt;$route[‘about_us’] = “site/pages/4”;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;For right now, though, this kind of manipulation falls under “ advanced usage, ” so don ’ t worry too much&lt;br /&gt;about it. However, please do note that this kind of thing is possible. Also, be aware that two “ reserved&lt;br /&gt;routes ” exist: default_controller and scaffolding_trigger.&lt;br /&gt;
&lt;br /&gt;&lt;span style="background-color: #cccccc;"&gt;$route[‘default_controller’] = “welcome”;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;The default_controller route tells CodeIgniter which controller should be loaded if no controller is&lt;br /&gt;identified. For simplicity ’ s sake, keep this setting at welcome, because you ’ re going to create a welcome&lt;br /&gt;controller for the project associated with this book.&lt;br /&gt;
&lt;br /&gt;
To know more about URI routing Please visit the below link&lt;br /&gt;
&lt;a href="http://codeigniter.com/user_guide/general/routing.html"&gt;http://codeigniter.com/user_guide/general/routing.html&lt;/a&gt;&lt;/div&gt;
</description><link>http://phpsyntax.blogspot.com/2012/08/uri-routing-in-codeigniter.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>30</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8423573573498626078.post-6810588525845756569</guid><pubDate>Sun, 06 Nov 2011 15:05:00 +0000</pubDate><atom:updated>2011-11-06T07:05:08.007-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">PHP functions</category><category domain="http://www.blogger.com/atom/ns#">PHP interview questions</category><category domain="http://www.blogger.com/atom/ns#">urldecode</category><category domain="http://www.blogger.com/atom/ns#">urlencode</category><title>What is the difference between urlencode and urldecode ?</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;The difference between urlencode and urldecode is&lt;br /&gt;
&lt;b&gt;URLencode &lt;/b&gt;is used to encode a string to be passed through URL to a web page. URLencode replaces unsafe ASCII characters with  a "%" followed by two hexadecimal digits.&lt;br /&gt;
&lt;br /&gt;
Use this link to get more stuff on Urlencode &lt;a href="http://www.w3schools.com/tags/ref_urlencode.asp"&gt;http://www.w3schools.com/tags/ref_urlencode.asp&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;URLdecode &lt;/b&gt;is used to decode the encoded URL string . Decodes any &lt;var&gt;%&lt;em class="replaceable"&gt;&lt;code&gt;##&lt;/code&gt;&lt;/em&gt;&lt;/var&gt; encoding in  the given string&lt;/div&gt;</description><link>http://phpsyntax.blogspot.com/2011/11/what-is-difference-between-urlencode.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8423573573498626078.post-3699018596108840061</guid><pubDate>Sun, 06 Nov 2011 14:48:00 +0000</pubDate><atom:updated>2011-11-06T06:48:33.627-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">array_slice</category><category domain="http://www.blogger.com/atom/ns#">array_splice</category><category domain="http://www.blogger.com/atom/ns#">PHP interview questions</category><title>What is the difference between array_slice() and array_splice()?</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;The difference between array_slice() and array_splice()&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;array_splice()&lt;/b&gt; is used to remove some elements from an array and replace with specified elements.&lt;br /&gt;
Below are some code examples:&lt;br /&gt;
&lt;div style="background-color: #eeeeee;"&gt;&amp;lt;?php&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;$input = array("red", "green", "blue", "yellow");&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;array_splice($input, 2);&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;// $input is now array("red", "green")&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;$input = array("red", "green", "blue", "yellow");&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;array_splice($input, 1, -1);&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;// $input is now array("red", "yellow")&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;$input = array("red", "green", "blue", "yellow");&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;array_splice($input, 1, count($input), "orange");&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;// $input is now array("red", "orange")&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;$input = array("red", "green", "blue", "yellow");&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;array_splice($input, -1, 1, array("black", "maroon"));&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;// $input is now array("red", "green",&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;//          "blue", "black", "maroon")&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;$input = array("red", "green", "blue", "yellow");&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;array_splice($input, 3, 0, "purple");&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;// $input is now array("red", "green",&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;//          "blue", "purple", "yellow");&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;?&amp;gt;&lt;/div&gt;&lt;br /&gt;
&amp;nbsp;&lt;b&gt;array_slice()&lt;/b&gt; is used to extract a slice of the array. Below are some example codes:&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #eeeeee;"&gt;&amp;lt;?php&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;$input = array("a", "b", "c", "d", "e");&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;$output = array_slice($input, 2);      // returns "c", "d", and "e"&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;$output = array_slice($input, -2, 1);  // returns "d"&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;$output = array_slice($input, 0, 3);   // returns "a", "b", and "c"&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;// note the differences in the array keys&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;print_r(array_slice($input, 2, -1));&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;print_r(array_slice($input, 2, -1, true));&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;?&amp;gt;&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;The above example will output:&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;Array&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;(&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;[0] =&amp;gt; c&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;[1] =&amp;gt; d&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;)&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;Array&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;(&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;[2] =&amp;gt; c&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;[3] =&amp;gt; d&lt;/div&gt;&lt;div style="background-color: #eeeeee;"&gt;)&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</description><link>http://phpsyntax.blogspot.com/2011/11/what-is-difference-between-arrayslice.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8423573573498626078.post-2457950052241542340</guid><pubDate>Sun, 06 Nov 2011 14:31:00 +0000</pubDate><atom:updated>2011-11-06T06:31:49.425-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">PHP interview questions</category><category domain="http://www.blogger.com/atom/ns#">unlink</category><category domain="http://www.blogger.com/atom/ns#">unset</category><title>What is the difference between unlink and unset ?</title><description>The difference between unlink and unset is given below:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Unlink&lt;/b&gt; is used to delete a file for a given path. &lt;br /&gt;
where as&lt;br /&gt;
&lt;b&gt;Unset&lt;/b&gt; is used to delete a value of a variable.</description><link>http://phpsyntax.blogspot.com/2011/11/what-is-difference-between-unlink-and.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>6</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8423573573498626078.post-5719430651199668491</guid><pubDate>Sun, 06 Nov 2011 14:07:00 +0000</pubDate><atom:updated>2011-11-06T06:12:17.294-08:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Codeigniter</category><category domain="http://www.blogger.com/atom/ns#">MVC framework</category><category domain="http://www.blogger.com/atom/ns#">PHP frameworks</category><category domain="http://www.blogger.com/atom/ns#">PHP interview questions</category><title>What is Codeigniter?</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Codeigniter is a PHP framework and follows MVC architecture. It is an open source. It provides a great flexibility to PHP coders with its built in functions. This framework is used to develop full featured web applications. This framework is easy to learn and there are no coding restrictions to follow, we can use core PHP also. There is no need of learning a new template language for this framework. Below image illustrates the flow of logic in the codeigniter system.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXqC9DAxocM8l6UUs0Zs-LJAAVnEHDjyiRl4pBUFZKiB9VAejt-P1xN_ancvpeDALJXtTx9OVJB4kiz69FbqL81AHr5MuRGoziV6hTztatWA8idzGJTLcbNWCZyyFwSGV32IDzfFtvEn0F/s1600/appflowchart.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXqC9DAxocM8l6UUs0Zs-LJAAVnEHDjyiRl4pBUFZKiB9VAejt-P1xN_ancvpeDALJXtTx9OVJB4kiz69FbqL81AHr5MuRGoziV6hTztatWA8idzGJTLcbNWCZyyFwSGV32IDzfFtvEn0F/s320/appflowchart.gif" width="100%" height="150" /&gt;&lt;/a&gt;&lt;/div&gt;Follow this URL to know more about codeigniter &lt;a href="http://codeigniter.com/"&gt;http://codeigniter.com/&lt;/a&gt;&lt;br /&gt;
Download the latest version here &lt;a href="http://codeigniter.com/download.php"&gt;http://codeigniter.com/download.php&lt;/a&gt;&lt;br /&gt;
Follow this link to view User guide &lt;a href="http://codeigniter.com/user_guide/"&gt;http://codeigniter.com/user_guide/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</description><link>http://phpsyntax.blogspot.com/2011/11/what-is-codeigniter.html</link><author>noreply@blogger.com (Anonymous)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" height="72" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXqC9DAxocM8l6UUs0Zs-LJAAVnEHDjyiRl4pBUFZKiB9VAejt-P1xN_ancvpeDALJXtTx9OVJB4kiz69FbqL81AHr5MuRGoziV6hTztatWA8idzGJTLcbNWCZyyFwSGV32IDzfFtvEn0F/s72-c/appflowchart.gif" width="72"/><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8423573573498626078.post-2355113708774123860</guid><pubDate>Sat, 05 Nov 2011 18:10:00 +0000</pubDate><atom:updated>2011-11-05T11:27:30.267-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">CMS</category><category domain="http://www.blogger.com/atom/ns#">Joomla</category><category domain="http://www.blogger.com/atom/ns#">MVC framework</category><category domain="http://www.blogger.com/atom/ns#">PHP interview questions</category><title>What is Joomla in PHP?</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Joomla is a Content Management System. It is an Open Source CMS framework programmed with PHP. The main advantahe of CMS is, there is no need of making your websites from scratch. Many functionalities like : forum, calendar, mail etc. are built in - as extensions.&lt;br /&gt;
&lt;br /&gt;
Joomla! is one of the most powerful and an award-winning Open Source Content Management System (CMS) that will help you build everything from simple websites to complex corporate applications. Joomla! is easy to install, simple to manage. The MVC architecture is implemented in Joomla latest versions. It is a rapid action development tool of websites.&lt;br /&gt;
&lt;br /&gt;
To know more about joomla visit the website &lt;a href="http://www.joomla.org/"&gt;www.joomla.org&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
To download joomla go to &lt;a href="http://www.joomla.org/download"&gt;www.joomla.org/download&lt;/a&gt;&lt;/div&gt;</description><link>http://phpsyntax.blogspot.com/2011/11/what-is-joomla-in-php.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8423573573498626078.post-7771997681822670115</guid><pubDate>Sat, 05 Nov 2011 18:05:00 +0000</pubDate><atom:updated>2011-11-05T11:05:31.306-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">mysql functions in PHP</category><category domain="http://www.blogger.com/atom/ns#">PHP interview questions</category><title>What is the difference between "mysql_fetch_array" and "mysql_fetch_object"</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;The difference between "mysql_fetch_array" and "mysql_fetch_object" is&lt;br /&gt;
"mysql_fetch_array" function will take the result set as input and returns an associative array with data fetched from database table row. Where as,&lt;br /&gt;
"mysql_fetch_object" function will take the result set as input and  returns an object with data fetched from database table row. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</description><link>http://phpsyntax.blogspot.com/2011/11/what-is-difference-between.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8423573573498626078.post-8135603774204592945</guid><pubDate>Sat, 05 Nov 2011 17:58:00 +0000</pubDate><atom:updated>2011-11-05T10:58:32.812-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">PHP interview questions</category><category domain="http://www.blogger.com/atom/ns#">PHP session</category><category domain="http://www.blogger.com/atom/ns#">session destroy</category><title>How many ways you can delete a session variable ?</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Below are some possibilities for deleting a PHP session,&lt;br /&gt;
&lt;br /&gt;
&lt;ol style="text-align: left;"&gt;&lt;li&gt;By using session_destroy() function&lt;/li&gt;
&lt;li&gt; By deleting browsers temporary files.&lt;/li&gt;
&lt;li&gt;By closing the browser&lt;/li&gt;
&lt;li&gt;Security firewalls may terminate the session varibles&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</description><link>http://phpsyntax.blogspot.com/2011/11/how-many-ways-you-can-delete-session.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8423573573498626078.post-2387407348840960794</guid><pubDate>Sat, 05 Nov 2011 17:53:00 +0000</pubDate><atom:updated>2011-11-05T10:53:12.792-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">define</category><category domain="http://www.blogger.com/atom/ns#">multi language websites</category><category domain="http://www.blogger.com/atom/ns#">PHP interview questions</category><title>How will you create a bi-lingual site (multiple languages) ?</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;By using define constant construct we can create bi-lingual sites. We will create a PHP file with define constants&amp;nbsp; for each language and will include the file in our main pages where the actual content is displayed &lt;/div&gt;</description><link>http://phpsyntax.blogspot.com/2011/11/how-will-you-create-bi-lingual-site.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8423573573498626078.post-6154545176592669336</guid><pubDate>Mon, 24 Oct 2011 11:55:00 +0000</pubDate><atom:updated>2011-10-24T04:57:33.935-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">move_uploaded_file</category><category domain="http://www.blogger.com/atom/ns#">PHP interview questions</category><category domain="http://www.blogger.com/atom/ns#">upload files in php</category><title>How do you upload files in PHP ?</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;We can upload files by using move_uploaded_file(). There are two parameters for the move_uploaded_file function. One is to specify uploaded file details and other is to specify new file details to be created.&lt;br /&gt;
The steps to follow are&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 1) Include enctype="multipart/formdata" in the form tag.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 2) Using method post is recommended.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 3) We use $_FILES super global array to get the uploaded file details.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; 4) By using $_FILES we can validate the file for size, file type. &lt;/div&gt;</description><link>http://phpsyntax.blogspot.com/2011/10/how-do-you-upload-files-in-php.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8423573573498626078.post-8297673843466248850</guid><pubDate>Wed, 19 Oct 2011 09:09:00 +0000</pubDate><atom:updated>2011-10-19T02:09:10.664-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">HTACCESS</category><category domain="http://www.blogger.com/atom/ns#">Java script redirect</category><category domain="http://www.blogger.com/atom/ns#">PHP redirect</category><title>How will you redirect to a page without header function?</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;By using Javascript we can redirect the page to another page. And also there are htaccess redirection techniques.&lt;/div&gt;</description><link>http://phpsyntax.blogspot.com/2011/10/how-will-you-redirect-to-page-without.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8423573573498626078.post-2472497442123635765</guid><pubDate>Wed, 19 Oct 2011 09:08:00 +0000</pubDate><atom:updated>2011-10-19T02:08:02.150-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">header function</category><category domain="http://www.blogger.com/atom/ns#">PHP error</category><title>What is a common error caused with header function?</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;headers already sent output started at some x line is the error. This error occurs when there is an out put generated before the header function.&lt;/div&gt;</description><link>http://phpsyntax.blogspot.com/2011/10/what-is-common-error-caused-with-header.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8423573573498626078.post-882214829990879573</guid><pubDate>Wed, 19 Oct 2011 09:06:00 +0000</pubDate><atom:updated>2011-10-19T02:06:21.855-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">is_header</category><category domain="http://www.blogger.com/atom/ns#">PHP headers</category><title>How do you know whether the headers are sent or not?</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;We have a function headers_sent(). This function is used to check whether the headers are already sent.&lt;/div&gt;</description><link>http://phpsyntax.blogspot.com/2011/10/how-do-you-know-whether-headers-are.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8423573573498626078.post-5166345157282408883</guid><pubDate>Wed, 19 Oct 2011 08:57:00 +0000</pubDate><atom:updated>2011-10-19T01:57:27.384-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">HTML form submit</category><category domain="http://www.blogger.com/atom/ns#">method get</category><category domain="http://www.blogger.com/atom/ns#">method post</category><category domain="http://www.blogger.com/atom/ns#">PHP methods</category><title>What is the difference between method get and method post?</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;The first difference is, method get is faster in performance than post. Because, by using post method the data posted is encrypted to cipher data and sent to the server. Where in get the encryption does not happens and it is faster.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Get method can carry limited amount of data and it is less than post method.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Post method is secure than get as the data submitted is not visible to the real world. Where as in the get method some one may see the data submitted in the URL bar.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; Using post method We can submit the data to the server only with the help of an HTML form. Where as a get method can send the data to server with a form and also with a HTML hyperlink.&lt;/div&gt;</description><link>http://phpsyntax.blogspot.com/2011/10/what-is-difference-between-method-get.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8423573573498626078.post-5286846097015325022</guid><pubDate>Wed, 19 Oct 2011 08:52:00 +0000</pubDate><atom:updated>2011-10-19T01:52:19.950-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">include</category><category domain="http://www.blogger.com/atom/ns#">PHP include functions</category><category domain="http://www.blogger.com/atom/ns#">require</category><title>What is difference between include() function and require() function?</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Both the functions are used to include a PHP file in other PHP file. Generally if we have a block of source code usefull in multiple instances, then we place the block of source code in one file and will include the file in other files. The difference between include() and require() function are as follows:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (i) If the file path mentioned with the include function is not found then it shows a warning message and continues the execution of the script. Where as require function results a fatal error and stops the execution of the script.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; (ii) The second difference is include function is faster in execution than require function. Because with the require function the parser will check whether the file exists or not. Where as the include function does not bothere about the file is there or not. &lt;br /&gt;
&lt;/div&gt;</description><link>http://phpsyntax.blogspot.com/2011/10/what-is-difference-between-include.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8423573573498626078.post-1662084591062493336</guid><pubDate>Mon, 10 Oct 2011 15:00:00 +0000</pubDate><atom:updated>2011-10-10T08:07:11.951-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">C type comments in PHP</category><category domain="http://www.blogger.com/atom/ns#">Multiple Line Comments in PHP</category><category domain="http://www.blogger.com/atom/ns#">Oneline Comments in PHP</category><category domain="http://www.blogger.com/atom/ns#">PHP Comments</category><title>How many types of comments are there in PHP?</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;There are two types of comments in PHP. They are&lt;br /&gt;
&lt;ol style="text-align: left;"&gt;&lt;li&gt;One Line comments (// or #)&lt;/li&gt;
&lt;li&gt; Multiple Line comments (/* */)&lt;/li&gt;
&lt;/ol&gt;The "one-line" comment styles only comment to the end of the line or the current  block of PHP code, whichever comes first.&lt;br /&gt;
Eg: &lt;span style="color: blue;"&gt; &lt;/span&gt;&lt;br /&gt;
&lt;div style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/div&gt;&lt;div style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?&lt;/div&gt;&lt;div style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // echo 'Your code upto end of the line';&amp;nbsp;&lt;/div&gt;&lt;div style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt; &lt;/div&gt;&lt;div style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;?&lt;/div&gt;&lt;div style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # echo 'Your code upto end of the line';&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;gt;&amp;nbsp;&lt;/div&gt;&lt;br /&gt;
Multiple Line comments (/* */) are used to comment a large block of PHP code.&lt;br /&gt;
Ex: &amp;lt;?&lt;br /&gt;
&lt;div class="informalexample" style="color: blue;"&gt;&lt;code&gt;&amp;nbsp;/*&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;echo&amp;nbsp;'This&amp;nbsp;is&amp;nbsp;a&amp;nbsp;test'; &lt;/code&gt;&lt;/div&gt;&lt;div class="informalexample" style="color: blue;"&gt;&lt;code&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;code&gt;echo&amp;nbsp;'This&amp;nbsp;is&amp;nbsp;a&amp;nbsp;test line2';&lt;/code&gt;&lt;/div&gt;&lt;div class="informalexample" style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;code&gt;echo&amp;nbsp;'This&amp;nbsp;is&amp;nbsp;a&amp;nbsp;test line 3';&lt;/code&gt;&lt;br /&gt;
&lt;code&gt;&amp;nbsp;*/&lt;br /&gt;
?&amp;gt;  &lt;/code&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</description><link>http://phpsyntax.blogspot.com/2011/10/how-many-types-of-comments-are-there-in.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8423573573498626078.post-7920768185205104696</guid><pubDate>Wed, 05 Oct 2011 12:05:00 +0000</pubDate><atom:updated>2011-10-05T05:05:53.032-07:00</atom:updated><title>What is the difference between displaying a string in single quotes and double quotes in PHP?</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;1) With Single Quotes the performance is faster than double quotes because the PHP parser does not checks for any variables or special characters. Whatever is there it will display that.&lt;br /&gt;
2) With double quotes the parser will search for the variables embedded in the string.&lt;br /&gt;
3) Performance wise it is always better to use single quotes. And we can use the concatenation between the strings and the variables.&lt;br /&gt;
4) Double quotes recognizes the new line charactes like '\n','\t' etc.., where as single quotes does not.&lt;/div&gt;</description><link>http://phpsyntax.blogspot.com/2011/10/what-is-difference-between-displaying.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8423573573498626078.post-8437274862407418672</guid><pubDate>Wed, 05 Oct 2011 10:26:00 +0000</pubDate><atom:updated>2011-10-05T03:26:49.840-07:00</atom:updated><title>Top 10 PHP MVC frameworks</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;A good framework is easy to learn, simple to use, intuitive to work  with, easy to extend or to modify, rapid to build (maintain)  applications with and of course stable.&lt;br /&gt;
&lt;br /&gt;
Having said that, here is my top 10 PHP MVC Frameworks:&lt;br /&gt;
&lt;br /&gt;
10- &lt;a href="http://amb.sourceforge.net/"&gt;Ambivalence&lt;/a&gt;: A Java-Maverick Port&lt;br /&gt;
9- &lt;a href="http://www.phpwact.org/php/znf"&gt;WACT&lt;/a&gt;:  Web Application Component Toolkit&lt;br /&gt;
8- &lt;a href="http://www.achievo.org/atk"&gt;Achievo&lt;/a&gt;: A good RAD framework&lt;br /&gt;
7- &lt;a href="http://www.phpwact.org/php/phrame"&gt;Phrame&lt;/a&gt;: A Java-Struts port&lt;br /&gt;
6- &lt;a href="http://www.mojavelinux.com/projects/studs/"&gt;Studs&lt;/a&gt;: A Java-Struts port to PHP&lt;br /&gt;
5- &lt;a href="http://www.xisc.com/"&gt;Prado&lt;/a&gt;: The winner of Zend coding contest &lt;br /&gt;
4- &lt;a href="http://phpontrax.com/"&gt;PHPOnTrax&lt;/a&gt;: a Rails port - PHP5 Only&lt;br /&gt;
3- &lt;a href="http://www.cakephp.org/"&gt;CakePHP&lt;/a&gt;: Inspired by Rails PHP4/5&lt;br /&gt;
2- &lt;a href="http://www.phpwact.org/php/mojavi"&gt;Mojavi&lt;/a&gt;: The first MVC framework I fell in love with&lt;br /&gt;
&lt;br /&gt;
and the winner is:&lt;br /&gt;
&lt;br /&gt;
1- &lt;a href="http://www.symfony-project.com/"&gt;Symfony&lt;/a&gt;: Based on Mojavi and inspired by Rails&lt;br /&gt;
&lt;br /&gt;
This list is based on my personal tests and use. I have tested and  played with many others, but I think these are the best frameworks out  there.&lt;br /&gt;
- The first framework I fell in love with was Mojavi because of its elegant way to implement the MVC model. &lt;br /&gt;
- Symfony corrected some problems in Mojavi and improved it by taking the good sides of RubyOnRails and Propel. &lt;br /&gt;
- CakePHP is very promising, the only problem - really, I don't know if  it is a problem - is: the development process is very slow. &lt;/div&gt;</description><link>http://phpsyntax.blogspot.com/2011/10/top-10-php-mvc-frameworks.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8423573573498626078.post-5626018033729758151</guid><pubDate>Wed, 05 Oct 2011 10:16:00 +0000</pubDate><atom:updated>2011-10-05T03:16:34.116-07:00</atom:updated><title>Redirecting a Web Page Using a 301 Redirect with HTACCESS file</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Below is the steps involved in redirecting a web page usinh HTACCESS file.&lt;br /&gt;
&lt;b&gt;Know about .htaccess file&lt;/b&gt;&lt;br /&gt;
When a visitor/spider requests a web page, your web serverchecks for a .htaccess file. The .htaccess file containsspecific instructions for certain requests, includingsecurity, redirection issues and how to handle certainerrors.&lt;br /&gt;
&lt;b&gt;Know about 301 redirect&lt;/b&gt;&lt;br /&gt;
301 redirect is the best method to preserve your currentsearch engine rankings when redirecting web pages or a website. The code "301" is interpreted as "moved permanently".After the code, the URL of the missing or renamed page isnoted, followed by a space, then followed by the newlocation or file name. You implement the 301 redirect bycreating a .htaccess file.&lt;br /&gt;
&lt;b&gt;How to implement the 301 Redirect&lt;/b&gt;&lt;br /&gt;
1. To create a .htaccess file, open notepad, name and savethe file as .htaccess (there is no extension).&lt;br /&gt;
2. If you already have a .htaccess file on your server,download it to your desktop for editing.&lt;br /&gt;
3. Place this code in your .htaccess file:redirect 301 /old/old.htm http://www.you.com/new.htm&lt;br /&gt;
4. If the .htaccess file already has lines of code in it,skip a line, then add the above code.&lt;br /&gt;
5. Save the .htaccess file&lt;br /&gt;
6. Upload this file to the root folder of your server.&lt;br /&gt;
7. Test it by typing in the old address to the page you'vechanged. You should be immediately taken to the newlocation.&lt;br /&gt;
&lt;b&gt;Notes:&lt;/b&gt; Don't add "http://www" to the first part of thestatement - place the path from the top level of your siteto the page. Also ensure that you leave a single spacebetween these elements:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;redirect 301 (the instruction that the page has moved)&lt;/span&gt;&lt;br /&gt;
&lt;div style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /old/old.htm (the original folder path and file name)&lt;/div&gt;&lt;div style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://www.you.com/new.htm (new path and file name)&lt;/div&gt;When the search engines spider your site again they willfollow the rule you have created in your .htaccess file.The search engine spider doesn't actually read the .htaccess file, but recognizes the response from the server as valid.&lt;br /&gt;
During the next update, the old file name and path will bedropped and replaced with the new one. Sometimes you maysee alternating old/new file names during the transitionperiod, plus some fluctuations in rankings. According toGoogle it will take 6-8 weeks to see the changes reflectedon your pages.&lt;br /&gt;
&lt;b&gt;Other ways to implement the 301 redirect:&lt;/b&gt;&lt;br /&gt;
1. To redirect ALL files on your domain use this in your.htaccess file if you are on a unix web server:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt; redirectMatch 301 ^(.*)$ http://www.domain.com &lt;/span&gt;&lt;br /&gt;
&lt;div style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; redirectMatch permanent ^(.*)$ http://www.domain.com&lt;/div&gt;You can also use one of these in your .htaccess file:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: blue;"&gt;&amp;nbsp; redirect 301 /index.html http://www.domain.com/index.html &lt;/span&gt;&lt;br /&gt;
&lt;div style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; redirect permanent /index.html http://www.domain.com/index.html &lt;/div&gt;&lt;div style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; redirectpermanent /index.html http://www.domain.com/index.html &lt;/div&gt;This will redirect "index.html" to another domain using a301-Moved permanently redirect.&lt;br /&gt;
2. If you need to redirect http://mysite.com tohttp://www.mysite.com and you've got mod_rewrite enabled                         onyour server you can put this in your .htaccess file:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Options +FollowSymLinks&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RewriteEngine on&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RewriteCond %{HTTP_HOST} ^example\.com&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RewriteRule ^(.*)$ http://www.example.com/$1 [R=permanent,L]&lt;br /&gt;
or this:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;Options +FollowSymLinks&lt;/span&gt;&lt;br /&gt;
&lt;div style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RewriteEngine &lt;/div&gt;&lt;div style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OnRewriteCond %{HTTP_HOST} ^domain\.com$ [NC]&lt;/div&gt;&lt;div style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]&lt;/div&gt;Tip: Use your full URL (ie http://www.domain.com) whenobtaining incoming links to your site. Also use your fullURL for the internal linking of your site.&lt;br /&gt;
3. If you want to redirect your .htm pages to .php pagesandd you've got mod_rewrite enabled on your server you canput this in your .htaccess file:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;RewriteEngine on &lt;/span&gt;&lt;br /&gt;
&lt;div style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RewriteBase / &lt;/div&gt;&lt;div style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RewriteRule (.*).htm$ /$1.php &lt;/div&gt;4. If you wish to redirect your .html or .htm pages to.shtml pages because you are using Server Side Includes(SSI) add this code to your .htaccess file:&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style="color: blue;"&gt;AddType text/html .shtml &lt;/span&gt;&lt;br /&gt;
&lt;div style="color: blue;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AddHandler server-parsed .shtml .html .htm&lt;/div&gt;Options Indexes FollowSymLinks Includes &lt;br /&gt;
DirectoryIndex index.shtml index.html&lt;br /&gt;
&lt;/div&gt;</description><link>http://phpsyntax.blogspot.com/2011/10/redirecting-web-page-using-301-redirect.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8423573573498626078.post-5017234433205055611</guid><pubDate>Wed, 16 Jun 2010 16:30:00 +0000</pubDate><atom:updated>2010-06-16T09:31:23.075-07:00</atom:updated><title>Segmentation fault when accessing a PHP page</title><description>&lt;div class="post-text"&gt;                 &lt;p&gt;Sometimes when one of our Apache web servers is restarted, we experience segmentation faults when any PHP page is subsequently accessed. The following line is printed in the httpd error_log:&lt;/p&gt;  &lt;p&gt;[Wed Jun 16 10:59:33 2010] [notice] child pid 31513 exit signal Segmentation fault (11)&lt;/p&gt;  &lt;p&gt;There will be one of these lines for each PHP page that is accessed. This appears to happen randomly - the "workaround" to-date is to restart httpd, which eventually fixes the problem (almost always after a single restart). Although we only see this happen rarely, it still happens frequently enough to be of concern.&lt;/p&gt;  &lt;p&gt;So my question is, why is this happening in the first place? Is this a known bug with the version of Apache / PHP / Linux / etc that we are using? Any ideas?&lt;/p&gt;  &lt;p&gt;The environment is:&lt;/p&gt;  &lt;ul&gt;&lt;li&gt;Fedora 11&lt;/li&gt;&lt;li&gt;Apache 2.2.15 (Default settings)&lt;/li&gt;&lt;li&gt;PHP 5.2.13&lt;/li&gt;&lt;/ul&gt;  &lt;p&gt;I can provide more information if that would help narrow things down, since this error message is rather generic...&lt;/p&gt;  &lt;p&gt;Any help is appreciated.&lt;/p&gt;              &lt;/div&gt;</description><link>http://phpsyntax.blogspot.com/2010/06/segmentation-fault-when-accessing-php.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8423573573498626078.post-14463478417819706</guid><pubDate>Wed, 16 Jun 2010 16:29:00 +0000</pubDate><atom:updated>2010-06-16T09:30:01.462-07:00</atom:updated><title>When it is necessary to use Classes in PHP</title><description>&lt;div class="post-text"&gt;                 &lt;p&gt;Hello,&lt;/p&gt;  &lt;p&gt;I am a wordpress plugin developer. I saw the source of many pluginsand many plugin use "classes" in them and some without classes. &lt;/p&gt;  &lt;p&gt;Many huge coded plugins like "wp-postratings" does not use Classes and some small plugins use Classes.&lt;/p&gt;  &lt;p&gt;edit:  Since classes have private, public and protected access specifiers, i feel a taste of security Does it increase security?&lt;/p&gt;  &lt;p&gt;Other than PHP does other languages require classes ?&lt;/p&gt;  &lt;p&gt;Is it compulsory to use Classes ? &lt;/p&gt;  &lt;p&gt;I need some suggestions.&lt;/p&gt;              &lt;/div&gt;</description><link>http://phpsyntax.blogspot.com/2010/06/when-it-is-necessary-to-use-classes-in.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-8423573573498626078.post-3469182399141150530</guid><pubDate>Wed, 16 Jun 2010 16:25:00 +0000</pubDate><atom:updated>2010-06-16T09:29:10.185-07:00</atom:updated><title>Get reply mail to my server for a mail sent through php mail function</title><description>&lt;div class="post-text"&gt;                 &lt;p&gt;Hi, I am developing a system to send mail to all of our clients. If they reply to that mail, I want to retrieve the reply mails to my server. There is a way to connect through the IMAP/POP3 server, But it is taking a long time to load the mails. Is there any way to get the reply mails directly to my server. or ay other alternate way to get the mails fastly through IMAP &lt;/p&gt;  &lt;p&gt;Please Help me in solving this issue&lt;/p&gt;              &lt;/div&gt;</description><link>http://phpsyntax.blogspot.com/2010/06/get-reply-mail-to-my-server-for-mail.html</link><author>noreply@blogger.com (Anonymous)</author><thr:total>0</thr:total></item></channel></rss>