Tagged: php

0

Codeigniter insert if not exist and update if not

  First you need to check whether the user or data is exits or not. then you can perform the update and insert operation. $this->db->where(‘user_id’,$id); $q = $this->db->get(‘profile’); if ( $q->num_rows() > 0 )...

CakePHP in a subdirectory using nginx 0

CakePHP in a subdirectory using nginx

CakePHP in a subdirectory using nginx cakephp subdirectory nginx I was facing many issues in setup cakephp3 in subfolder on nginx server. I was doing changes in new server config while we have to...

codility brackets opening and closing solution 0

codility brackets opening and closing solution

Codility brackets opening closing. codility brackets opening closing. codility you are given a string s consisting of n brackets opening problem solution. function isBalanced($str){ $count = 0; $ocount = 0; $ccount = 0; $length...

Push notification Android Php 0

Push notification Android Php

Hey, Today we learn how to send push notification for android in php. First create a class with following code   <?php class Pusher{ const GOOGLE_GCM_URL = ‘https://android.googleapis.com/gcm/send’; private $apiKey; private $proxy; private $output;...

Push notification IOS 0

Push notification IOS

Push notification IOS   <?php // authentication $host = “localhost”; $user = “user”; $pass = “pass”; $dbname = “DB”; // create connection with database $con = mysql_connect($host, $user, $pass); // check whether database connection...

Configure ejabberd xmpp on ubuntu server part-2 0

Configure ejabberd xmpp on ubuntu server part-2

configure ejabberd xmpp ubuntu server part 2 In First Tutorial we have configure ejabberd XMPP with default menisa database . now in this tutorial i will explain how to configure ejabberd with MySql ....

Configure ejabberd xmpp on ubuntu server Part-1 0

Configure ejabberd xmpp on ubuntu server Part-1

Configure ejabberd xmpp ubuntu server     After facing so many issues and investing so many hours I write below steps for configure ejabberd. In first tourial we learn how to configure ejabbere on...

export database table by php 0

export database table by php

export database table php Sometime there is need to export database table by php code. There is a very simple approach to do this.     [crayon-5bc45c8e246a7690716123/]  

Php backtrace with proper information 0

Php backtrace with proper information

Php backtrace with proper information.   Php backtrace with proper information. we can use debug_backtrace. But debug_backtrace provide a lots of data which might be not use full for one. So for fetching more...