Friday, February 28, 2014

PHP Script Using Clickatell API for SMS Send

PHP Script Using Clickatell API for SMS Send


To use this API, you need to register at (http://www.clickatell.com). When you sign up for an HTTP/S account, you will be given a username, password and api_id: keep these at hand. Once you have registered and been activated you will receive 10 free credits with which to test our service. Messages sent with these credits contain a canned (pre-populated) message. You can test the API using these credits, and purchase credits to start sending your own, customized messages.

How To Use the Clickatell HTTP API To Send an SMS Message

How To Use the Clickatell HTTPAPI To Send an SMS Message-


Clickatell HTTP API  For SMS Send-

The HTTP API is the most popular API, because there are many ways to utilize it for message sending and it can be used for low or high-volume messaging. As HTTP is a means for relaying information, the HTTP API can be used with practically any web-service application. This is particularly useful for high-volume message sending.
To use this API, you need to register at (http://www.clickatell.com). When you sign up for an HTTP/S account, you will be given a username, password and api_id: keep these at hand. Once you have registered and been activated you will receive 10 free credits with which to test our service. Messages sent with these credits contain a canned (pre-populated) message. You can test the API using these credits, and purchase credits to start sending your own, customized messages.

After Signup, you will receive a mail with Client Id, User Id & Password. When you logon to the Clickatell web site you will see your API ID.



Send a message Using Clickatell-

Thursday, February 27, 2014

How to read a text file line by line using php??

How to read a text file line by line using php??


$handle = fopen(sample.txt”, "r");
if ($handle) {

while (($linetext= fgets($handle)) !== false) {
                     
echo $linetext;
}else{

            // Error Show while reading file
}

fclose($handle);

Thanks.

I hope that it will help you...

Tuesday, February 25, 2014

How to get a job at Google

Google will have to get a job in the test than GPA, not just the idea. GPA and test a number of very good job of getting Google to notice that there is no consequence. Because test results can be seen in the idea of someone's words in an interview with New York Times reports, Google's vice president of human resources according lajalo bakalajalora slowly than conventional academic degree as a university or institutional gugalakarmira rising. Some 14 percent of Google's team has completed an institutional staff. Many of the state institutions of formal education, the importance of Google if you do not ask how to match a job? We hear from the mouth of Google's job to get bakera lajalo sartaguloamake not misunderstand me 'lajalo Thus began. If someone is good or better grade of the test cases have no problem getting a job. However, to get a job at Google in mathematics and computing, especially emergency code writing skills. If someone truly educational experiments and show your skills to earn a good grade, they must apply for a job at Google can. For job seeker from the two skills in mathematics and the code could be an additional benefit. However, outside of these two skills, you can earn a lot more to get a job at Google explained habelajalo egret, respectively, for the job of five subjects are given importance. If you have any technical issues in terms of employment, however, is the emphasis on coding skills.Nearly half of all employment in the tech srenitei Google. Each job is to keep the main thing is that it considers the general knowledge skills. Aikiuyera this issue should not be confused with. Here refers to general knowledge, learning skills in any subject, quick learning ability and the skills to apply it ksamataei imponderable things, the ability to distinguish between. Behavioral interviews for jobs at Google every time you think things are very well observed hayalajalo egret, the second most important thing is to get a job at Google netrtbaguna. Instead of traditional leadership attributes leadership necessary to solve the problem at the moment focuses on Google. Bok also said, was the president of the chess club or the marketing department of a major were you? How quickly you hit the post, Google does not see the point; How to support the needs of the moment, but you gave your team and work out how much drag you have, see it. Considering the quality of leadership to solve the trouble Google. What is your role if the problem is complex, the possibility to get a job done by recording gugalagugale necessary to achieve a better quality of the two. Of the humility and the ability to embrace other things quickly. According to the Department of Human Resources lajalora Google, Google violent nature of man is difficult to get a job. Lajalo said, will be দায়িত্বজ্ঞানসম্পন্ন own work and the work of the organization to think, to think about their own institutions. Do not be afraid to get angry. If you can not work as a solution would be to leave it to others politely. Others would like to receive suggestions. Google all the time to achieve at the end of the job, he sees it. How can you solve problems together or in groups deyabaka highlight the importance of Google, Google employee and others perfectly organize your own responsibility to his job and other job opportunities deoyagugale Civility is not to say; Rather it is the intellectual humility. If you do not create this mentality of humility or respect others on behalf of the staff can not learn something new. Referring lajalo researchers said, can be seen in many of the higher digridharidera odds. If the failure rate is very low, most successful and talents, so that they learn how to take failure, can learn the idea nasiksaksetre who came to work better with the results of Google, they give good account of for the wrong cause. When found anything better from them, that they held themselves, is it because I have been tremendous. But worse, when they do not want to take responsibility of anything said in the experiments for obtaining better results lajalo bakagugale job candidates to apply, they argue their merits was unnecessary. They do not want to move their argument negligible. They are sort of orthodoxy. If new information is presented to them and they accepted it. So if you get a job at Google to be a man, or if necessary in the needs of small to contain two Examplism habelajalo Bok said, Google will have to find jobs is another skill that is no minimum work experience. If someone with experience to work with minimal interest in his learning, communication skills, leadership can be seen in the interest abbreviation thakebakera words, may be a different kind of intelligence, and this can be utilized in many ways beyond the traditional talent. Officer in charge of the employees as well as the organization and the employer just will not ever look at a reputable college and university. Because so many people drop out from school to find their way in the world was founded. Although they are considered exceptions. Find us on these exceptional people from ucitabaka said, there are many reputable educational institutions, but can not find out their promised graduates. They are the most important things in life are not taught. It is the task of the human kaisarakei karegugala simply delayed Common GPA or outside of formal education to try to medhaguloke. While most young people are now going to school and college education, despite their formal education, as well as the things that will be useful in the future to make a career of it in the original bisayabaka sekhatai said, you know, and you know what the scope of what can be utilized, highlight the importance of the current global The price you pay to merit karabebartamana innovative global leadership, humility, cooperation, and easy to take, better learn and learn again asking to be given the importance daksataguloke.Google is not just a job at all and has not been, there will be, why not go to work wherever. 
SOURCE: Prothom Alo

Monday, February 17, 2014

MSSQL Database Configuration using ODBC in CodeIgniter

MSSQL Database Configuration using ODBC in CodeIgniter

CodeIgniter has a config file that lets you store your database connection values (username, password, database name, etc.). The config file is located atapplication/config/database.php. You can also set database connection values for specific environments by placing database.php it the respective environment config folder.
The config settings are stored in a multi-dimensional array with this prototype:

/* Connect MSSQL Server*/
$db['mssql']['hostname'] = 'Driver={SQL Server};Server=192.168.202.20;Database=test_db;
$db['mssql']['username'] = 'sa';
$db['mssql']['password'] = '654321';
$db['mssql']['database'] = 'test_db';
$db['mssql']['dbdriver'] = 'odbc';
$db['mssql']['dbprefix'] = '';
$db['mssql']['pconnect'] = FALSE;
$db['mssql']['db_debug'] = TRUE;
$db['mssql']['cache_on'] = FALSE;
$db['mssql']['cachedir'] = '';
$db['mssql']['char_set'] = 'utf8';
$db['mssql']['dbcollat'] = 'utf8_general_ci';
$db['mssql']['swap_pre'] = '';
$db['mssql']['autoinit'] = TRUE;

$db['mssql']['stricton'] = FALSE;

Saturday, February 15, 2014

9 SEO Techniques All Top Web Sites Should Use

9 SEO Techniques All Top Web Sites Should Use
1. Title Tag

Near the very top of a web site’s source code you’ll find various meta tags — the standard ones being the Title, Description and Keyword tags. The title tag is technically not a meta tag, though it is commonly associated with them. The title tag plays such a large role in the indexing of your web site, that it is considered the most important of the three.
A page title is the first thing a search engine will look at when determining just what the particular page is about. It is also the first thing potential visitors will see when looking at your search engine listing.
It’s important to include a keyword or two in the title tag — but don’t go overboard – you don’t want to do what’s known as “keyword stuffing” which does nothing but make your web site look like spam. Most people will include either the company name, or title of the particular page here, as well.

2. Meta Tags


There are two primary meta tags in terms of SEO — the description and the keyword tag. It’s debatable whether the search engines use the description tag as far as ranking your results. However it is one of the more important tags because it is listed in your search result — it is what users read when your link comes up and what makes them decide whether or not to click on your link.
Be sure to include a few relevant keywords in this tag, but don’t stuff it with keywords either. The description tag should read like a sentence — not a keyword list.
Due to “keyword stuffing” many search engines now completely disregard the keyword tag. It is no longer nearly as important as it was years ago, however it doesn't hurt to include them in your source code.
When creating your keyword list, you’ll want to think of the specific terms people will type in when searching for a site like yours. Just don’t go overboard — too many duplicates are not a good thing (as in “web designer” “web designers” “custom web designer” “html web designer” “your state here web designer” – you get the idea). Those are all basically the same, so pick one or two variations at the most and move onto the next keyword.

3. Proper Use of Heading Tags

This is a very important element to consider when writing out your site copy. Use of heading tags helps users, web browsers and search engines alike know where the major key points of your copy are.
Your main page title should use the <h1> tag — this shows what your page is about. Use of additional tags, such as <h2> and <h3> are equally important by helping to break down your copy. For one, you’ll see a visual break in the text. But as far as the search engines are concerned, it will automatically know what your topics are on a page. The various heading tags give a priority to the content and help index your site properly.

4. Alt Attributes on Images

Putting alt attributes on your images actually serves two purposes. In terms of SEO, putting a brief yet descriptive alt attribute along with your image, places additional relevant text to your source code that the search engines can see when indexing your site. The more relevant text on your page the better chance you have of achieving higher search engine rankings.
In addition, including image alt attributes help the visually impaired who access web sites using a screen reader. They can’t see the image, but with a descriptive alt attribute, they will be able to know what your image is.

5. Title Attributes on Links

Including title attributes on links is another important step that any good web site will have. That’s the little “tool tip” that pops up when you place your mouse over a link. These are especially important for image links, but equally useful for text links.
As a note, you should use descriptive text for your links. “Click here” doesn’t really tell a person – or more importantly, the search engines — what the link is. At the very least put a title tag that will explain that “Click Here” really means “Web Design Portfolio” for example. Better yet – make the main link text something like “View my web design portfolio” — this will give some value to the link showing that the resulting page is relevant to searches for portfolio’s.

6. Relevant Content

Having content relevant to your main page or site topic is perhaps the most important SEO aspect of a page. You can put all the keywords you want in the meta tags and alt image tags, etc — but if the actual readable text on the page is not relevant to the target keywords, it ends up basically being a futile attempt.
While it is important to include as many keywords in your page copy as possible, it is equally as important for it to read well and make sense. I’m sure we’ve all seen keyword stuffed pages written by SEO companies that honestly don’t make much sense from the reader’s point of view.
When creating your site copy, just write naturally, explaining whatever information you’re discussing. The key is to make it relevant, and to have it make sense to the reader. Even if you trick the search engines into thinking your page is great — when a potential customer arrives at the site and can’t make heads or tails of your information and it just feels spammy to them — you can bet they’ll be clicking on the next web site within a matter of seconds.

7. Link Building



We’ve probably all heard of Google Page Rank — it seems to be every web site owner’s dream to have as high a page rank as possible. While the algorithm for determining page rank encompasses many elements, and is constantly changing, one item is the number of links pointing to your web site.
Now, you’ll want to steer clear of link farms and other spammy attempts at getting links to your site. However there are many reputable and niche directory sites that you can use to submit your web site, or specific blog articles to.
With genuine content — especially if you have a blog — you’ll be able to generate links with other web sites and blogs, as well. It’s somewhat of a give and take, in that if you link out to other sites, you’ll find sites linking back to you  — and hopefully see your page rank going up, as well!

8. Social Media

Although technically not SEO, Social Media is such a growing factor in getting your web site noticed, that it’s an important element to include in your plan.
Social media ranges from social networks like Twitter, Facebook and LinkedIn — to social bookmarking sites such as Delicious, Digg, StumbleUpon and many more. There is a lot of relationship building  involved, but as you build your own networks and build quality content on your web site or blog, you’ll see traffic to your web site increasing, as well.
As with any relationship, it is a give and take. Don’t just expect to join a site like Twitter for the pure sake of pushing your content. That just won’t fly — your true intentions will stick out like a sore thumb and do nothing but turn people off.
Even if you are on the site purely for networking reasons, the key is to make friends. Help out members of your network if they ask for a “retweet” or Digg, give helpful advice if asked, etc. You’ll see the same in return.
If you write a great post and have built meaningful relationships with peers in your  niche, you’ll often find that friends will submit your posts and give you votes on the social bookmarking sites. The more votes you receive, the more likely your post is to be noticed by others and shared around, often resulting in additional link backs from other blogs, etc.

9. A Few SEO Don’ts — Flash and Splash


Along with any list of Do’s come the Don’ts. As far as SEO is concerned, two of these items are splash pages (often consisting of a flash animation) and all flash web sites.
Yes, flash is pretty! Full flash web sites can actually be amazing to look at — their own bit of interactive artwork. But unfortunately the search engines don’t get along well with Flash. Although there is talk of possible advancement in this area, for the most part the search engines cannot read Flash.
All that great content that you wrote for your site will not be seen by the search engines if it’s embedded into a Flash web site. As far as the search engines are concerned, your all flash web site might as well be invisible. And if the search engines can’t see your site content, a good chunk of potential customers will miss out on what you have to offer, too.
Equally as “pointless” are splash pages. Once very popular, the splash page should no longer be an important feature of any site. While splash pages used to serve as an introduction into a web site (often with a flash animation), it is no longer seen as helpful, and often times might actually annoy visitors.
For one — it’s an extra click to get into your content. Worse is when you don’t give a “skip intro” option or set of links into your main site content — because you’re essentially forcing your visitors to sit through the full animation. If you’re lucky, this will only annoy them… if not — they’ll just leave without giving your main web site a shot. And without an html link pointing into your site, the search engines have no way to continue either (unless you made use of a sitemap.xml file — but still…)
A good alternative to both issues is to make use of a flash header. There’s no problem to include a flash animation at the top of your main site, or as a feature within the content area, etc. Because this is an addition to your web site, as opposed to a full separate element.


 I hope it will help you.

Thanks.

Friday, February 14, 2014

Sending Email in Codeigniter

Sending Email in Codeigniter


Create a controller email.php in '/application/controllers/' location
And paste following php code and change mail address.

$this->load->library('email');

$this->email->from('your@example.com', 'Your Name');
$this->email->to('someone@example.com');
$this->email->cc('another@another-example.com');
$this->email->bcc('them@their-example.com');

$this->email->subject('Email Test');
$this->email->message('Testing the email class.');

$this->email->send();

echo $this->email->print_debugger();


I hope that it will help you.

Thanks.

Thursday, February 13, 2014

PHP Code : convert string to hex and hex to string


PHP Code : convert string to hex and hex to string

<?php
function strToHex($string){
    $hex = '';
    for ($i=0; $i<strlen($string); $i++){
        $ord = ord($string[$i]);
        $hexCode = dechex($ord);
        $hex .= substr('0'.$hexCode, -2);
    }
    return strToUpper($hex);
}
function hexToStr($hex){
    $string='';
    for ($i=0; $i < strlen($hex)-1; $i+=2){
        $string .= chr(hexdec($hex[$i].$hex[$i+1]));
    }
    return $string;
}


Hope it will help you.
Thanks

Wednesday, February 12, 2014

How to Access WampServer from another Computer in A LAN

How to Access WampServer from another Computer in A LAN


In this tutorial, you will learn on how to access your web server from another computer in your Local Area Network. This is specific to WampServer. However, you can also use this tutorial on other application similar toWampServer. The point on this tutorial is on how to change the configuration of httpd.conf to allow other computer to connect to your localhost where Apache is being installed.
By default, Apache does not allow other computer to connect to the server where Apache is installed.
A “Forbidden - You don't have permission to access / on this server” is returned when you access your server from other computer.
To fix this problem, please follow the steps below:

Tuesday, February 11, 2014

CodeIgniter: First Application With Oracle(DB)

CodeIgniter: First Application With Oracle(DB)


For Detail step by step please click following URL

CodeIgniter: First Application With Oracle(DB)


MySQL interview questions

MySQL interview questions


  1. How do you start and stop MySQL on Windows? - net start MySQL, net stop MySQL
  2. How do you start MySQL on Linux? - /etc/init.d/mysql start
  3. Explain the difference between mysql and mysqli interfaces in PHP? - mysqli is the object-oriented version of mysql library functions.
  4. What’s the default port for MySQL Server? - 3306
  5. What does tee command do in MySQL? - tee followed by a filename turns on MySQL logging to a specified file. It can be stopped by command notee.
  6. Can you save your connection settings to a conf file? - Yes, and name it ~/.my.conf. You might want to change the permissions on the file to 600, so that it’s not readable by others.
  7. How do you change a password for an existing user via mysqladmin? - mysqladmin -u root -p password "newpassword"
  8. Use mysqldump to create a copy of the database? - mysqldump -h mysqlhost -u username -p mydatabasename > dbdump.sql
  9. Have you ever used MySQL Administrator and MySQL Query Browser? Describe the tasks you accomplished with these tools.
  10. What are some good ideas regarding user security in MySQL? - There is no user without a password. There is no user without a user name. There is no user whose Host column contains % (which here indicates that the user can log in from anywhere in the network or the Internet). There are as few users as possible (in the ideal case only root) who have unrestricted access.
  11. Explain the difference between MyISAM Static and MyISAM Dynamic. - In MyISAM static all the fields have fixed width. The Dynamic MyISAM table would include fields such as TEXT, BLOB, etc. to accommodate the data types with various lengths. MyISAM Static would be easier to restore in case of corruption, since even though you might lose some data, you know exactly where to look for the beginning of the next record.
  12. What does myisamchk do? - It compressed the MyISAM tables, which reduces their disk usage.
  13. Explain advantages of InnoDB over MyISAM? - Row-level locking, transactions, foreign key constraints and crash recovery.
  14. Explain advantages of MyISAM over InnoDB? - Much more conservative approach to disk space management - each MyISAM table is stored in a separate file, which could be compressed then with myisamchk if needed. With InnoDB the tables are stored in tablespace, and not much further optimization is possible. All data except for TEXT and BLOB can occupy 8,000 bytes at most. No full text indexing is available for InnoDB. TRhe COUNT(*)s execute slower than in MyISAM due to tablespace complexity.
  15. What are HEAP tables in MySQL? - HEAP tables are in-memory. They are usually used for high-speed temporary storage. No TEXT or BLOB fields are allowed within HEAP tables. You can only use the comparison operators = and <=>. HEAP tables do not support AUTO_INCREMENT. Indexes must be NOT NULL.
  16. How do you control the max size of a HEAP table? - MySQL config variable max_heap_table_size.
  17. What are CSV tables? - Those are the special tables, data for which is saved into comma-separated values files. They cannot be indexed.
  18. Explain federated tables. - Introduced in MySQL 5.0, federated tables allow access to the tables located on other databases on other servers.
  19. What is SERIAL data type in MySQL? - BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT
  20. What happens when the column is set to AUTO INCREMENT and you reach the maximum value for that table? - It stops incrementing. It does not overflow to 0 to prevent data losses, but further inserts are going to produce an error, since the key has been used already.
  21. Explain the difference between BOOL, TINYINT and BIT. - Prior to MySQL 5.0.3: those are all synonyms. After MySQL 5.0.3: BIT data type can store 8 bytes of data and should be used for binary data.
  22. Explain the difference between FLOAT, DOUBLE and REAL. - FLOATs store floating point numbers with 8 place accuracy and take up 4 bytes. DOUBLEs store floating point numbers with 16 place accuracy and take up 8 bytes. REAL is a synonym of FLOAT for now.
  23. If you specify the data type as DECIMAL (5,2), what’s the range of values that can go in this table? - 999.99 to -99.99. Note that with the negative number the minus sign is considered one of the digits.
  24. What happens if a table has one column defined as TIMESTAMP? - That field gets the current timestamp whenever the row gets altered.
  25. But what if you really want to store the timestamp data, such as the publication date of the article? - Create two columns of type TIMESTAMP and use the second one for your real data.
  26. Explain data type TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP - The column exhibits the same behavior as a single timestamp column in a table with no other timestamp columns.
  27. What does TIMESTAMP ON UPDATE CURRENT_TIMESTAMP data type do? - On initialization places a zero in that column, on future updates puts the current value of the timestamp in.
  28. Explain TIMESTAMP DEFAULT ‘2006:09:02 17:38:44′ ON UPDATE CURRENT_TIMESTAMP. - A default value is used on initialization, a current timestamp is inserted on update of the row.
  29. If I created a column with data type VARCHAR(3), what would I expect to see in MySQL table? - CHAR(3), since MySQL automatically adjusted the data type.


Monday, February 10, 2014

Using Oracle with PHP and CodeIgniter

Using Oracle with PHP and CodeIgniter



Step 1:

Install OCI & enable OCI8 in WAMP(Please click How to Install & enable oci8 in WAMP)


Step 2: Configuration database.php


CodeIgniter has a config file that lets you store your database connection values (username, password, database name, etc.). The config file is located atapplication/config/database.php. You can also set database connection values for specific environments by placing database.php it the respective environment config folder.
The config settings are stored in a multi-dimensional array with this prototype:


$db['pblmig']['hostname'] = '(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.200.200)(PORT = 1521)))(CONNECT_DATA =(SERVICE_NAME =pblmig )))';
$db['pblmig']['username'] = 'cib';
$db['pblmig']['password'] = 'cib';
$db['pblmig']['database'] = 'pblmig';
$db['pblmig']['dbdriver'] = 'oci8';
$db['pblmig']['dbprefix'] = '';
$db['pblmig']['pconnect'] = FALSE;
$db['pblmig']['db_debug'] = TRUE;
$db['pblmig']['cache_on'] = FALSE;
$db['pblmig']['cachedir'] = '';
$db['pblmig']['char_set'] = 'utf8';
$db['pblmig']['dbcollat'] = 'utf8_general_ci';
$db['pblmig']['swap_pre'] = '';
$db['pblmig']['autoinit'] = TRUE;
$db['pblmig']['stricton'] = FALSE;


Step 3: Data Fetch from Oracle & Show

Controllers


Create a controller db_controller.php file which in CI/application/controllers location

<?php

class db_controller extends CI_Controller{
   
   function __construct(){
        parent::__construct();
    }


public function db_data(){
       
$this->load->model('db_model');
                                                               
$data[dtl]=$this->db_model->get_data( );
$data[row]=$this->db_model->get_tot_data();
$this->load->view('pages/show_data', $data);
                               

 
}


}

?>

Model

Create a  model db_model.php file which in CI/application/models  location


<?php

class db_model extends CI_Controller{
   
   function __construct(){
        parent::__construct();
    }


public function get_data(){

$this->pblmig_db = $this->load->database('pblmig', true);

 $sql="SELECT  CUST_NAME FROM CUSTOMER “;

$stmt = oci_parse($this->pblmig_db->conn_id, $sql);

oci_execute($stmt);
$row = oci_fetch_all($stmt, $result);
oci_free_statement($stmt);
oci_close($this->pblmig_db->conn_id);
return $result;
   }      
                       
// Return no of row
public function get_tot_data(){
 $this->pblmig_db = $this->load->database('pblmig', true);

 $sql="SELECT  CUST_NAME FROM CUSTOMER “;

$stmt = oci_parse($this->pblmig_db->conn_id, $sql);

oci_execute($stmt);
$row = oci_fetch_all($stmt, $result);
oci_free_statement($stmt);
oci_close($this->pblmig_db->conn_id);
return $row;
   }      

           

}

?>


VIEW

Create a page show_data.php file which in CI/application/views/pages location

<table>
                                                           
<tr>
<td style="FONT-SIZE: 12px;text-align:center">
</td>
</tr>
<?
for ($i = 0; $i <$row; $i++) {
?>
<tr>
<td style="FONT-SIZE: 12px;text-align:left">                                                  
</td>
<?        foreach ($dtl as $key=>$data) {           ?>
            <td style="FONT-SIZE: 12px;text-align:left">
            <?
               echo $data[$i];
            ?>
</td>
            <?       
            }
            ?>
</tr>   
                                                                                                 
<?
}
                                   
?>
</table>


 Now, test your application. Point your browser using this URL

http://localhost/CI/index.php/db_data / get_data                                   

Sunday, February 9, 2014

How to enable oci8 in WAMP


This post help you to enable OCI for connecting Oracle Database from PHP.








MYSQL Database Configuration in CodeIgniter

MYSQL Database Configuration

CodeIgniter has a config file that lets you store your database connection values (username, password, database name, etc.). The config file is located atapplication/config/database.php. You can also set database connection values for specific environments by placing database.php it the respective environment config folder.
The config settings are stored in a multi-dimensional array with this prototype:
$db['default']['hostname'] = "localhost";
$db['default']['username'] = "root";
$db['default']['password'] = "";
$db['default']['database'] = "database_name";
$db['default']['dbdriver'] = "mysql";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = FALSE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";
$db['default']['swap_pre'] = "";
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;


Friday, February 7, 2014

CodeIgniter - PHP Frameworks


What is CodeIgniter?

CodeIgniter is a powerful PHP framework with a very small footprint, built for PHP coders who need a simple and elegant toolkit to create full-featured web applications. If you're a developer who lives in the real world of shared hosting accounts and clients with deadlines, and if you're tired of ponderously large and thoroughly undocumented frameworks, then CodeIgniter might be a good fit.