27 Mar
Posted by Ganesh H S , Bangalore, India as zend framework
Zend_Search_Lucene_Search_Query::highlightMatches() method allows the developer to highlight HTML document terms in the context of a search query.
In the previous article Zend Lucene Search - part3 - retrieving the indexed data i talked about retrieving the search results. When we search, highlighting […]
17 Mar
Posted by Ganesh H S , Bangalore, India as zend framework
Once the index is created, we are ready use zend lucene search to search the website. In the following example, php is the search keyword used to fetch the relevant search results in the already indexed data.
<?php
require_once ‘Zend/Search/Lucene.php’;$query = “php”;
$index = Zend_Search_Lucene::open(”/var/www/lucene-data/blog-index”);
$results = $index->find($query);
echo “Index contains “.$index->count().” documents.\n\n”;
if($index->count())
{
$count = 0;
foreach ($results as $result)
{
$data[$count][”article_url”] […]
17 Mar
Posted by Ganesh H S , Bangalore, India as zend framework
For creating the index from the existing data, we need to create the index. Isn’t it a better idea to index each data when its created, to index the real time data we need to open the index which was created earlier, rest of the other things remains same as discussed in the Zend lucene […]
17 Mar
Posted by Ganesh H S , Bangalore, India as zend framework
In this article i will be discussing about creating index using zend lucene search .
Conventionally most of the site search are powered by database driven.
Lets consider my blog site, if anyone comes to my site and wants to search for any keyword, if i have to give search results i may have to look into […]
08 Jan
Posted by Ganesh H S , Bangalore, India as zend framework
I started with PHP in my graduation 7th semester B.E, i liked PHP most because of its simplicity. It takes less than 24 hours to learn and develop web applications using PHP , for complex projects we need frameworks with mvc architecture php mvc , cake php, symfony, code igniter and etc […]
08 Jan
Posted by Ganesh H S , Bangalore, India as zend framework
Zend Auth is easy to set up and provides a system that secures our site with an easy to use authentication mechanism.
Zend Auth(Zend_Auth) provides an API for authentication and includes concrete authentication adapters for common use case scenarios.
In this Zend Authentication example, i will be discussing only about zend authenticating with a Database […]
01 Dec
Posted by Ganesh H S , Bangalore, India as zend framework
In php programming we always used global or $_GLOBALS to refer to the global variable.
For example consider below -
Db.php
<?php
// connect to mysql server
$mysqlLink = mysql_connect(”mysql_server”, “mysql_user”, “mysql_password”);
?>
index.php
<?php
require_once “Db.php”;
function displayTables()
{
global $mysqlLink;
$sql = “SHOW TABLES”;
//use global variable mysqlLink, and perform query execution
mysql_query($sql, $mysqlLink);
?>
In zend framework, zend registry is an mechanism to using global storage. The registry […]
27 Nov
Posted by Ganesh H S , Bangalore, India as zend framework
When i started to develop a web application using zend framework, i couldn’t get much of articles related to how to access form data, zend framework form handling classes are very good approach in handling form, most of them were still under proposal state.
What i really wanted was to access the form data, which i […]
25 Nov
Posted by Ganesh H S , Bangalore, India as zend framework
Zend debug is used for debugging purpose. The static method Zend_Debug::dump() prints or returns information about an expression, which is much similar of using var_dump.
Syntax is as below -
<?php
// $var argument specifies the expression or variable
// $label argument is a string to be prepended to the output
// $echo argument specifies whether the output […]
25 Nov
Posted by Ganesh H S , Bangalore, India as zend framework
As in other object oriented programming languages, zend framework supports try catch, all exceptions thrown by Zend Framework classes should throw an exception that derives from the base class Zend_Exception.
Example 1:
In this example, code require_once “Zend_Loader.php”; is commented, so error is thrown when we are trying to access Zend_Loader.
<?php
//require_once “Zend_Loader.php”;
try
{
Zend_Loader::loadClass(’Zend_Session’);
}
catch (Zend_Exception $e) {
echo “Error message: […]
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jul | ||||||
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |