Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 

What is php.ini ?

The php.ini file also known as (configuration file) is where we declare changes for Php settings. If you want to use the default settings then you can use existing php.ini file for the server else change settings by editing the existing php.ini ...

Creating a custom password encrypt for Auth in laravel 5.0

Many times when we have an existing database with existing multiple records with set password, encrypted with a specific encrypt technique and then we try to immigrate to Laravel 5.0 and try to use Laravel Auth, it clashes. Since, Lara...

Use of Transaction in Mysql

Transaction is very useful in large rich applications such as eCommerce, Real Estate etc etc. It is mostly used in Customer Relationship Management (CRM), Enterprise Resource Plan (ERP). What is Transaction? When we need to execute more than ...

How to store constants in laravel 5.0

In laravel 5.0 the way to define constants and use them through out the project. Following are the steps to accomplish it:- Step 1st :- Creating a separate file under /config folder named as constants.php ( it can be any name) for storing all ...

Redirect not found page to home page in CakePHP

When we try a wrong URL in cakephp then it displays an error page with error message: "Controller class could not be found". We can override this message and also can handle this exception using Error.php of cake. We can override this func...

PHP File Functions

PHP Copying, Creating & Deleting files Copy file using PHP:- In PHP when we want to copy our file from source to destination then we have to use following syntax. Syntax: Bool copy (string $source, string $destination); Example:...

Difference between "Java Constructor" and "Php Constructor".

Hello reader's Today we will discuss about "Difference between Java Constructor and Php Constructor". Within Java we are able to override the constructors within one class. Constructor is recognized as function getting same label in particul...

How to access static variables in PHP and How to access static variables in Java

Hello reader's lets continue with static variable, today we will discuss about "how to access static variables in PHP and Java". PHP is usually changing as a Object Oriented language. As being a java coder and PHP coder. Java and PHP poss...

Static variable scope in PHP vs static variable scope in Java

Hello reader's today we will discuss about "static variable scope in PHP vs static variable scope in Java". PHP is actually increasing to become a Object Orient Programing. Being a java coder in addition to PHP coder, php in addition to java w...

Datatypes in PHP and String Functions - Tutorial 3

Datatypes supported by PHP String Integer Floating point Boolean Array Object NULL Resource String Functions Strlen() : Returns the length of a string (number of characters). <?php echo strlen("Hello world!"); // output...

Creating background Tasks with Appshell and CakePHP

Hello Friends, Sometime we need to run some background tasks using cakephp without user interaction or delayed response to user from server. For this we can use CAKEPHP AppShell utility. Syntax: /path/to/cake/console/cake -app /path/...

How to Fill Dropdown using jquery without using Ajax

Step 1=> Get all the countries data in an array and all states data corresponding to country wise. <?php $countries_Array = array( 'IN' => 'INDIA', 'BG' => 'Belgium', 'AU' => 'Australia', ...

How to fix TCPDF file opening issue on smart devices

Hello Friends, If you are using TCPDF( A Plugin used to generate PDf files) then sometime you may face that this files are not opening in smart devices. You may see some garbage data instead of pdf file. Then do not worry, just put a exit; af...

Convert array to string in php

We can convert array to string using php predefined function named as implode(). Syntax for implode is: implode('separator',array); Example - $split_data [0] = 'This'; $split_data [1] = 'is'; $split_data [2] = 'a'; $split_data...

Convert a string to array in php

We can convert string to array using php predefined function named as explode(). Syntax for explode is: explode('separator',string); Example - $string = "This is a text"; $split_data = explode('',$string); // splitting by space as a...

Google Map Integration in PHP- Display Latitude and Longitude On Google Map

This code will point the Latitude and Longitude On Google Map with a marker. For this include a script: Here is the code hope it may help you somewhere <html> <head> <script type="text/javascript"...

How to rename php file

After discussing about open, read and copying PHP files we will be discussing about rename function. rename (): The rename() function is used for renaming a file or directory.It takes two parameters : 1.the original filename 2.the new...

CacheHelper In CakePHP

Cakephp cache used to store cache of entire layout and views. It store cache in tmp/cache/views/ folder. for use cache helper we need to use the below code in our controller var $helpers = array('cache'); and we can also give cache time ...

Google Map integration in PHP to Calculate Latitude and Longitude

This code will calculate the latitude and longitude of the place in background on entering the place name. For integration of Google map to calculate Latitude and Longitude major script is : <script src="https://maps.googleapis.com/maps/...

Visibility Scope Of Variable And Functions

There are three type of visibility scope: Public Private Protected PUBLIC: Variable or function of public scope can be accessed throughout the program. PRIVATE : Variable or function of private scope can be accessed only with...

Add prefix to urls in CakePHP

CakePHP has power to do a lot with conventions by using routes. Its additionally possible to utilize custom prefixes adjacent to your admin routes for extra flexibility. Prefix routing can be enabled from within the core configuration file by set...

Get Instant Solutions to PHP Programming Problems

Hi Guys, Do you have any PHP Programming Problems? Or Stuck in a PHP Language Issue? Just visit FindNerd Community Forum and get answers to all your PHP Language Queries on PHP Developer Forum. In this video blog, I am going to explain, how ...

Installation of PHP and Apache on Ubuntu-Tutorial 1

This video tutorial gives the introduction of what PHP does, why it is used and some basic advantages of PHP. This Video will also gives you an introduction to setting up the development environment for PHP and Apache on Ubuntu. Below are s...

How to create a custom error page

In Cakephp we have some default error pages but we can create our own error page. Here we will create a custom error page to show error if controller not found. If controller not found then we will show 404 error page. Below are few steps for cr...

Using multiple database connections in CakePHP model

Hello Readers, Till now we may develop our appication with single database . Is their any ways to integrate our application with multiple databases ? . Yes we have. There are methods to use multiple databases for development and for produc...

PHP filters to Sanitize and Validate data

Hello Readers , Today we will going to understand the concept of PHP filters to Sanitize and Validate data. PHP filters are used to validate and sanitize external input. Validating data = Determine if the data is in proper form. Sanit...

How to reorder product tabs

If you want to reorder product tabs, you can do this according to you wish as you want, just add the below code to your function.php. <?php add_filter( 'woocommerce_product_tabs', 'FindNerd_woo_reorder_tabs', 90 ); function FindNerd_woo_r...

How to apply style to a cakephp debug console

We have cakephp debug on or off option in core.php file, if debug is on then all errors and query will show at the bottom of the page. we can give it some different style or UI so that it will be more readable. we can apply css like below code ...

How to calculate distance between two location by PHP Code

If you would like to calculate air distance between two location without any API or mysql query. You can use below code to get distance between two location. $distance_one_latitude = 30.364267; $distance_two_latitude = 30.324860; $distance_o...

Using database session handling in Code PHP

PHP is one of the scripting language. In which session handling is one of the key thing mostly using in web application. Suppose you build a website and allow to login everyone in website, You need to track user every step until they log out o...

Add logo in theme customize option in wordpress

Hello reader's today we discuss about "Add logo in theme customize option" in wordpress. Open your function.php and paste the below code :- /** * Add logo in theme customize option */ add_action( 'customize_register', 'themename_customiz...

Inheritance in PHP

Hello Readers , Here's the explanation of concept of Inheritance in PHP. What is inheritance? Inheritance is nothing but a design principle in oop. By implementing inheritance we can inherit(or get) all properties and methods of one cla...

PaginatorHelper in CakePHP

Cake php provide inbuilt pagination we can use this by using Paginator Helper. To use pagination first we need to use Paginator Component public $components = array('Paginator','Auth'); now add the below code in your controller here i am us...

PHP Copy Files

How to open and read PHP files have been discussed in previous blog: http://findnerd.com/list/view/How-to-open-and-read-files-with-PHP/3157/ Now,we will discuss about copying a php file. In php,we can Copy files from source to destination...

How to Disable Comments Section on Wordpress Page

You need to follow below step to remove comment section in WP Page. 1) Make admin login on Wordpress. 2) You can view "Pages" menu on left panel. On mouse over you can view "All Pages" & "Add New" options. Please click at "All Pages". 3)...

InterNationalization in CakePHP

Hello Readers , Today we will learn about the concept of " InterNationalization in CakePHP " . "InterNationalization" simply means if you are making an application and you wants to make that applications to reach a larger audience to cater...

How to remove product tabs

Hi, If you want to remove all tabs or any particular tab for example description and reviews, then use the below code in the functions.php: add_filter( 'woocommerce_product_tabs', 'FindNerd_remove_product_items', 58 ); function findnerd_remo...

How to install yii2 via composer on linux

Before installing yii2 we need to install composer for install composer runthese commands curl -s http://getcomposer.org/installer | php mv composer.phar /usr/local/bin/composer now for install yii first locate to your web root filder ...

woocommerce- remove orderby dropdown for products

Hello again, In this tutorial I will guide you to remove or edit the orderby dropdown for products, so if you have any such requirement follow the below code. If you want completely remove the drop down and ordering options, add below single ...

How to upload two separate files in php

Hi if you want to upload two separate files from one single form to be uploaded and with a for simplest code Look at mine code. The form will have two separate input files but you need to name them common, ex 'files[]' I'm using 'upload[]' in ...

How to hash password in laravel

Laravel provide Bcrypt hashing for store a secure password by using keyword Bcrypt we can hash our password $password = bcrypt('secret'); we can use this also $password = Hash::make('secret'); we can use these two hashing metho...

How to fetch maximum and minimum value of a column in laravel

In this example, I have a user's table & I want to get the user who have maximum and minimum amount. For that I used the following code $price = DB::table('users')->max('amount'); $price = DB::table('users')->min('amount'); A...

Top 10 Drupal plugins/modules one should know

Hi today I would like to share 10 most frequently used module in Drupal. Though Drupal have thousands of contributed modules. But there are always some good modules one should install when do a fresh installation as these would always help you...

Assigning New Magento Theme

To assign a new theme to magento follow these steps 1) Go to admin > System > Configuration 2) select 'Design' tab on the left menu bar under General Tab. 3) There you will see the Package and Themes section. 4) Enter the th...

Turning Magento cache off

Magento uses two level cache backend . Two level cache means it stores cache records in two backend. By default, Magento stores it's cache entries in the file system, magento cache files are present in var/cache. At the time of development it is ...

Customizing Magento Layouts with xml

In magento layouts are used to display contents of each page using layout.xml which we will found in app/design/frontend//default/layout. Each module have it's own layout file e.g. customer module has customer.xml and catalog module have catalog....

How to compare PHP Variables and Arrays with null or empty values

Sometimes it is a bit confusing for developer to select right compare statement to check variables or arrays as there are lots of compare functions like "isset()", "!" operator, "is_null()", "empty()" etc. So we can use a straight forward appr...

Laravel 5 Migration

Migrations play a very important role in any MVC Framework. They work as a version control for your database. By using Migrations we can update the database schema and stay up to date on the current schema. By using Migration we can easily manage...

How to open and read files with PHP

Before reading information from any file,we have to open the file for reading. This Blog will help you to find the code to read-open-close the file(s) on server we have created with PHP. Opening a file:fopen() This function enables t...
1 39 44
Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: