Skip to main content

Posts

Showing posts from November, 2016

Cakephp 3.x cake bake on linux system

How to Cakephp 3.x cake bake on linux system Cakephp gives an awesome feature that is bake. by using bake you can create controller models and views without coding . you just need to type some commands and cake will create files for you. So here is the simple steps for cake bake in cakephp 3.x on linux system 1.First Open your terminal window 2. install php5 on your system by using this command and press enter       sudo apt-get install php5-mysql 3. Now download letest cakephp 3.x zip file from cakephp github and unzip into your local server (ex. /op/lampp/htdocs/newcake/here all files) 4. Now in terminal change directory by this command and press enter       cd /opt/lampp/htdocs/newcake/ 5. Then run following command   bin/cake bake When you hit enter then you will see output like this  Welcome to CakePHP v3.3.4 Console --------------------------------------------------------------- App : src Path: ...

Simply Create PDF with PHP mysql FPDF (2 steps)

Simply Create PDF with fpdf Sometimes we need to generate pdf based on mysql database so here is the example of How to create PDF with PHP mysql using FPDF in 2 Steps. Step1 First Download fpdf from Here Step 2 Create an index.php file and paste this code <?php include('../config.php'); require('webroot/fpdf/fpdf.php'); $aClassDb = new ClassDb(); class Getdata { public function all($getPostdata) { $getData = ""; try { $getApartment = $getPostdata['apartid']; $getYear = $getPostdata['invoiceyear']; $startdate = mktime(0,0,0,1,1, $getYear); $enddate = mktime(0,0,0,12,31, $getYear); $query = $aClassDb->getAllData("invoice", "AND appartment='$getApartment' AND date_invoice BETWEEN $startdate AND $enddate"); $getData = $query; /* PDO $db = new PDO('mysql:host=localhost;dbname=test;', 'root'...

Change page title with jquery

How to Change title with jQuery Change Document title with jQuery Here is the all ways that you can use to change title of webpage THE BEST METHOD TO CHANGE TITLE WITH JQUERY <script type="text/javascript">  document.title = "New Dynamic Title with Jquery"; </script> You just need one line to change document title dynamically. you can also update document title dynamically with this method. Other Methods METHOD 1 - <script type="text/javascript">   $('html head').find('title').text("New Dynamic Title with Jquery"); </script> METHOD 2 - <script type="text/javascript">   $(document).attr("title", "New Dynamic Title with Jquery"); </script> METHOD 3- //Not Supported in IE <script type="text/javascript"> $(document).ready(function() {       $(this).attr("title", "sometitle");    });...