Monthly Archives: March 2010

how to select current page name in php

$currentFile = $_SERVER["SCRIPT_NAME"]; $parts = Explode(‘/’, $currentFile); echo $currentFile = $parts[count($parts) - 1]; – That’s it. Regardless of any quety string $currentFile shows you current page name.

Posted in LAMP | Tagged , , | Leave a comment

Paypal Integration Step by Step

Paypal Gateway Integration: Step 1: Goto developer.paypal.com Step 2: Signup for an account and I use the following information. user: jbl.training@gmail.com pass: trainingcenter you have to confirm your email address by click the link in mail send by paypal. Childhood … Continue reading

Posted in LAMP | Leave a comment

How to Enable curl ?

Very easy and simply. Open D:\xampplite\apache\bin\php.ini (the location for you may not be same but open apache\bin\php.ini) file and search extension=php_curl.dll remove trailing semicolon from this line Restart apache. Check CURL enabled or not by echo phpinfo(); Still not enabled … Continue reading

Posted in LAMP | Leave a comment

Setup Port Based WAMP Server

st1\:*{behavior:url(#ieooui) } <!– /* Font Definitions */ @font-face {font-family:”Cambria Math”; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:-1610611985 1107304683 0 0 159 0;} @font-face {font-family:”MS Shell Dlg”; panose-1:2 11 6 4 2 2 2 … Continue reading

Posted in Code Igniter | Leave a comment

Best practice of sharing common variable among functions of a class

here is two ways of share value of variable all through member functions of a class class Clients extends Controller { function __construct(){ parent::Controller(); $uri_array = $this->uri->uri_to_assoc(1); $this->folder_id = $uri_array['folder']; //This not works $this->session->set_userdata(“folder_id”,$uri_array['folder']); } public function sample() { $folder_id … Continue reading

Posted in Code Igniter | Leave a comment