Archive | PHP

RSS feed for this section

Easy way to install Laravel in windows

Install Composer Download Windows installer and install it. Install Laravel Via Composer Create-Project Open a terminal (cmd) and go to the directory  where you want to install. then use following command composer create-project laravel/laravel –prefer-dist If you getting an error saying: failed to clone https://github.com/php-fig/log.git, git was not found, check that it is installed and in […]

Read full story Comments { 0 }

How to set git enviroment variable

You need to add the directory you installed git to to your PATH environment variable. Right click on Computer. Click Advanced System Settings Click Environment Variables inside the Advanced Menu Under System Variables, scroll to PATH Add ;”C:\path\to\git\bin”;”C:\path\to\git\cmd” Test the git command in the command prompt to see if it worked. Git is usually located […]

Read full story Comments { 1 }

How to use myhost.com/username in codeigniter?

Edit application/config/routes.php add following line of code $route['(.*)'] = "welcome/index/$1"; Edit your welcome.php controller as follows <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Welcome extends CI_Controller { public function index($username) { //$this->load->view('welcome_message'); echo "Username is ".$username; } } you need to write .htaccess file for removing the index.php file from your […]

Read full story Comments { 0 }
Javascript countdown reset after some time interval

Javascript countdown reset after some time interval

This is a simple countdown timer starting at 30 seconds from when the function is run and ending at 0. After reaching 0 it automatically reset the counter. It goes again to 30 second and this process is continued in a loop <script> window.onload = function() { startCountDown(30, 1000, myFunction); } function startCountDown(i, p, f) […]

Read full story Comments { 0 }

Enable Designer in PHPMyAdmin

Open the file libraries/config.default.php. Change the following lines of code: $cfg['Servers'][$i]['pmadb'] = ''; $cfg['Servers'][$i]['bookmarktable'] = ''; $cfg['Servers'][$i]['relation'] = ''; $cfg['Servers'][$i]['table_info'] = ''; $cfg['Servers'][$i]['table_coords'] = ''; $cfg['Servers'][$i]['pdf_pages'] = ''; $cfg['Servers'][$i]['column_info'] = ''; $cfg['Servers'][$i]['history'] = ''; $cfg['Servers'][$i]['designer_coords'] = ''; to $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin'; $cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark'; $cfg['Servers'][$i]['relation'] = 'pma_relation'; $cfg['Servers'][$i]['table_info'] = 'pma_table_info'; $cfg['Servers'][$i]['table_coords'] = 'pma_table_coords'; $cfg['Servers'][$i]['pdf_pages'] = […]

Read full story Comments { 0 }

bigLoader.gif need to show until full page load

Following code show bigLoader.gif loader image show only few second but I need to show it until I get response from pagination_data.php. How can I do it? <script type="text/javascript"> $(document).ready(function(){ //Display Loading Image function Display_Load() { $("#loading").fadeIn(900,0); $("#loading").html("<img src='bigLoader.gif' />"); } //Hide Loading Image function Hide_Load() { $("#loading").fadeOut('slow'); }; //Default Starting Page Results $("#pagination li:first").css({'color' […]

Read full story Comments { 1 }