Archive for February, 2010
The Role of CakePHP
on February 22, 2010
CakePHP was critical to the project’s success. Here I emphasize what we consider are some of the main advantages of using the Framework. It offers many useful, ready-to-use tools. CakePHP prevents us from having to “reinvent the wheel†every time. For common problems that must be solved when using an application of medium complexity, CakePHP already provides a solution. In our case the …
CakePHP: Change View File From Controlle
on February 22, 2010
With CakePHP, the controller core automatically detects the file name of the view file which needs to be rendered from a controller action. You might want to reuse an existent view for an action or specify a different file name. For example, if you have a controller named “Users†and you execute a controller action named “profileâ€, the view file “users/profile.ctp†will be …
How to Set PHP Include_Path?
on February 22, 2010
There are at least 2 ways you can set your PHP include_path. 1. Use the function ini_set(). For example if you wanted to set your PHP include_path to “.:../:./include:../include” then you would do this in your PHP code: ini_set("include_path", ".:../:./include:../include"); 2. Edit your PHP configuration file. Inside that file is a directive section for “Paths and Directories.” You can change that value to …
How Can You Reload / Refresh a Page With Jquery?
on February 21, 2010
Okay I assume that you have a button REFRESH, which reloads the page when you click on it. Here is the code // Use location.reload() in jquery to reload a page <input name="refreshPage" type="button" id="refreshPage" value="Refresh" onClick="location.reload();">
CakePHP: SELECT BETWEEN Query Syntax
on February 21, 2010
return $this->LogfileRecord->find(‘all’, ‘conditions’ => array(‘LogfileRecord.date between ? and ?’ => array($start_date, $end_date)));
How to Send HTML in Email With php?
on February 21, 2010
Yes it is possible if you add an HTML content type to your mail header, you can do it like this: mail($recipient, $subject, $message, From: $sender\nContent-Type: text/html; charset=iso-8859-1); or mail($recipient, $subject, $message, From: $sender\nContent-Type: text/html; charset=utf-8);
All Lectures of Virtual University of Pakistan Available Online
on February 20, 2010
Please click here to watch all Lectures. You can watch more than 5000 lectures of VU on youtube free.
cURL PHP: Connect to a Secure Server
on February 20, 2010
If you want to connect to a secure server for posting info/reading info, you need to make cURL with the openSSL options. Then the sequence is nearly identical to the previous example (except http_S_://, and possibly add the useragent): <?php curl_setopt($ch, CURLOPT_URL,"https://example.com"); //some sites only accept your request if your browser looks legit, so send a useragent profile… curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; …
PHP Xajax Loading Message – Reverse Ajax
on February 20, 2010
<?php include ‘./xajax/xajax_core/xajax.inc.php’; //include the xajax libraries function loading_function(){ new object response object $objResponse = new xajaxResponse(); sleep(2); // Pretend to load some data $objResponse->alert("Loading Complete"); // Display an alert when Task is completed return $objResponse; // Return Object Response } $xajax = new xajax(); // Xajax Object $xajax->registerFunction(‘loading_function’); // Register loading_function $xajax->processRequest(); // Process the Request $xajax_js = $xajax->getJavascript(‘/xajax’); // Xajax javascript …
SEO Search Engine Optimization Bible
on February 19, 2010
Welcome to the Search Engine Optimization Bible. Search engine optimization has come to mean a lot of things to a lot of different people. In the strictest sense, SEO is about the on-page and off-page design strategies you can use to improve your search engine ranking. This usually means tweaking your web site, using design elements and content. And in most cases, it …

