Archive for October, 2009

If you require to make money promotion products and services on the World Wide Web, you must have a consistent look and feel to the pages that comprise your web-site. Dreamweaver templates make this easy. Dreamweaver templates relieve you of much of the tedious job of editing individual web pages, because you generate the template two times then apply it to initial pages …

The end of CakePHP?

 on October 23, 2009

Today, Nate Abele, lead developer of CakePHP, announced in a cryptic tweet that he leaves the project. This comes shortly after Gwoo, the project manager, left the project, too. It seems like they started to work on a fork of Cake3 called “Lithium”. On Twitter people are a bit puzzled about those events, some even think it is the end of CakePHP… I …

theme_advanced_path : false

Primary Key: A column in a table whose values uniquely identify the rows in the table. A primary key value cannot be NULL. Unique Key: Unique Keys are used to uniquely identify each row in the table. There can be one and only one row for each unique key value. So NULL can be a unique key.There can be only one primary key …

<?php $ch = curl_init() ; $myfile = "d:\\mydir\\second_dir\\cookiefile.txt" ; curl_setopt($ch, CURLOPT_COOKIEJAR, $myfile) ; ?>

<?php function currrentPageURL() { $URL = ‘http’; if ($_SERVER["HTTPS"] == "on") {$URL .= "s";} $URL .= "://"; if ($_SERVER["SERVER_PORT"] != "80") { $URL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"]; } else { $URL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]; } return $URL; } ?> Now use the function here: <?php echo currrentPageURL(); // return current page URL ?>

Simple Age Calculation in PHP: <?php // make sure to set timezone // date_default_timezone_set(‘Europe/London’); function getAge( $dob, $tdate ) // int $dob, int $tdate, int years { $age = 0; while( $tdate > $dob = strtotime(‘+1 year’, $dob)){ ++$age; } return $age; } ### Date of Birth ### $dob = strtotime("april 20 1966"); ### Current Date ***/ $tdate = strtotime("june 2 2009"); ### …

Don’t make debug mode to 0 (zero) because there is a bug in this mode which you run you application in IE 8. Your page will be redirect again and again. Keep debug level above 0. Have look at the following code. APP -> CONFIG -> CORE.PHP // Acess the following code in APP -> CONFIG -> CORE.PHP /** * CakePHP Debug Level: …

A great collection of old/previous papers by Virtual University of Pakistan is now waiting for you. You can now download as much as you want. Download latest papers that are being uploaded on daily basis. Try to solve all the papers related to your study program to get the higher marks in your final term exams. Any one of these papers can be …

SELECT CURDATE(); CURRENT_DATE() = CURDATE() for time use SELECT CURTIME(); CURRENT_TIME() = CURTIME()