Now open the folder and right click on the memcached.exe and run as administrator. As we are utilizing Windows you can easily find out that option when you right click on the memcached.exe.
How to Install Memcached in Windows 7 / WAMP ?
Now open the folder and right click on the memcached.exe and run as administrator. As we are utilizing Windows you can easily find out that option when you right click on the memcached.exe.
Which Framework to use Zend or Codeigniter ??
Introduction:
Hello! Performance is always matters a lot for modern applications where millions of users visit your website daily. I personally like to use MVC framework for web application development. It helps me to build faster, structured and modular application. I also believe unless building enterprise level development you don't require large scale fatty framework like Zend, Symfony etc. You may find many questions on the web like "Which is the best PHP Framework ? " etc. My personal opinion is nothing called "best", until you know to code well. Even using good framework you may code worst. In this article I will discuss why many people prefer CodeIgniter over Zend Framework.
I trust programming should be always clean, enjoyable, fun using latest tools, updated features etc. We use Framework to handle all basic task on ease. There are various reason why Codeigniter popular, also has disadvantage over other frameworks too. I will discuss below.
CodeIgniter Vs Zend
The main reason why I love CodeIgniter because of is its performance. CodeIgniter three times faster then the Zend framework. Also CodeIgniter is faster than other popular PHP MVC frameworks. Take a look at these Benchmark test done by Rasmus Lerdorf(creator of PHP programming), here , here. And also take a look at another benchmark test. So it’s clear that CI is faster than other Framework because of tiny library. Rasmus likewise told that he loved CodeIgniter on the grounds that it is quicker, lighter and the least like a structure.
Another primary purpose for suggestion, it has low expectation to learn and adapt. Downloads come with a tremendous user guide, which is a great documentation like PHP Manual to get started with. I have been using CodeIgniter for last 2 years for web projects as a beginner level, from my personal experience, CodeIgniter has very easy, understandable structure compared to CakePHP or Zend Framework. If you’re a beginner and want to kick start your development structured way with PHP frameworks than I recommend you to go with CodeIgniter for understanding how MVC works. And jump to some other framework when you are comfortable with.
CodeIgniter coding conventions are flexible and simple. Ironically, CakePHP, Zend has very strict coding conventions. So you should be very careful about such cases while coding.
Still question in mind "Why not Zend Framework and why CodeIgniter?" Yes! Zend is PHP company and strong supporter. Ok, So question goes here is "What is so good about Zend Framework ?" Eventually! answer is Zend contains huge set of libraries and classes compared to any other framework. But slow performer. Ok! here another great news is that You can use Zend Framework’s classes in the CodeIgniter using Hooks available in CI. So you can even use any libraries from ZEND as a component in CI. Is it not great! yes.
Conclusion:
Although there are many features may catch your eye to use CodeIgniter but as web development is grown up faster, modern development requires strong object oriented programming for implementing better, robust, modular application. Of course a OOP MVC Framework for the better development, New Framework For Fun, Enjoyable development. In such cases CodeIgniter still lacking. CodeIgniter is still backdated compare to other MVC frameworks in PHP world. Still legacy code into the core where PHP introduced next generation version as PHP7.
Read: 5 Best things you should know about PHP7
Personally, I have learned many things from CodeIgniter as a beginner and towards building easy to use, hugely powerful, Stunningly Fast and enormously efficient modular HMVC Framework as "Cygnite PHP Framework- The New Cool Kid". Version 2.0 is under active development. You may have a look into it for better experience. Some benchmark of v1.3 here, and here
You can use the below comment form to let us know your thoughts and opinion. If you like this article please do not forget to share with your friends. To receive regular updates from us, you can either follow us on Facebook, Twitter, Google+ or you can subscribe to our monthly email newsletter.
Have a good day!
How to populate a select box using jQuery ajax json, php?
Hello Friends! With the help of Ajax and PHP you can easily populate a select box without refreshing the page. You can also do it using only PHP script but requires you to refresh the page every time you change the select box value. Here is a very simple and useful example how you can populate a select box without refreshing page.
Prerequisites
1. Latest version of JQuery.
2. Very basis understanding of JSON.
3. A server side scripting knowledge to respond to Ajax request. In this tutorial I am going to use PHP as a scripting language.
Code:
There are 4 parts in this DEMO.
HTML page
The JQuery & Ajax (Client side code)
JSON structure
Server side code to populate dynamic page.
HTML:
<select id="category">
<option value=""> Select Job Type</option>
<option value="1">Technical </option>
<option value="2"> QA </option>
</select>
<select id="sub-category">
<option value=""> Select Area Lead</option>
</select>
JQUERY & AJAX REQUEST:
Include latest version of Jquery in your HTML page. Below ajax script will call server side script to get JSON data and populate select box. Add below script in your page.
$(function(){
$('#category').change(function() {
$.ajax({
type: "POST",
url: 'https://appsntechinfo.com/demo/list_ajax',
data: {'categoryID': $(this).val(),'isAjax':true},
dataType:'json',
success: function(data) {
var select = $("#sub-category"), options = '';
select.empty();
for(var i=0;i<data.length; i++) {
options += "<option value='"+data[i].id+"'>"+ data[i].name +"</option>";
}
select.append(options);
}
});
});
});
And now in your server side page you may write below to fetch data from database.
SERVER SIDE SCRIPT:
We will first validate the category id and fetch data from database then return JSON response to UI.
if (isset($_POST['categoryID'])) {
$id = trim($_POST['categoryID']);
$result = array();
$id = mysql_real_escape_string($id);
$res = mysql_query("SELECT * FROM sub_categories WHERE category_id = $id");
while ($row = mysql_fetch_array($res)) {
$result[] = array(
'id' => $row['subcatid'],
'name' => $row['description']
);
}
echo json_encode($result);
}
SAMPLE JSON:
[
{"id":10, "name": "Anderson"},
{"id":11, "name": "Shane"},
{"id":12, "name": "Shelly"}
]