Category

PHP

Category

Q1) Write a program for a pattern ? * * * * * * * * * * * * * * * Answer <?php for($i=0;$i<=5;$i++){ for($j=5-$i;$j>=1;$j–){ echo “*&nbsp;”; } echo “<br>”; } ?> Q2) Write a program for this pattern? * * * * * * * * * * * * * * * Answer <?php for($i=0;$i<=5;$i++){ for($j=1;$j<=$i;$j++){ echo “*&nbsp;”; } echo “<br>”; } ?> Q3) Write a program for this pattern? *…

I had the same issue with ec2 for php mail. install Sendmail by command: sudo apt-get install sendmail check the service whether it’s started or not by executing following command sudo service sendmail status Note: Output of the above command should be something – ‘Active: active (running)’ start the service if it is not running by the following command sudo service sendmail start After the service is started, send a test mail using the following…

Use this 4 step method to remove the redirect loop and mixed content problems when using ssl in WordPress. 1) Replace ‘http://’ with ‘//’ in database – This create all the relative url’s for images and other assets 2) in wp-config, define generic wp_home and wp_siteurl variables. define(‘WP_HOME’,’//’. $_SERVER[’SERVER_NAME’]); define(‘WP_SITEURL’,’//’. $_SERVER[’SERVER_NAME’]); 3) If you are using a load balancer, use ‘HTTP_X_FORWARDED_PROTO’ server variable to figure out the protocol used. To do this, add this line…

Hey, Reader Here, I will brief you step by step login with google account in Laravel 7 socialite. in Laravel 7 socialite provides API to login with Gmail account. I will help you step by step instruction. let’s follow the tutorial and implement it. Step 1: Install Laravel 7 I am going to install Laravel 7 projects. laravel new google_login Now I am going inside of the folder cd google_login Step 2: Install Socialite In…

Step 1: Install Laravel 7 first of all, we need to get fresh Laravel 7 version application using bellow command, So open your terminal OR command prompt and run bellow command: laravel new laravel_blog Step 2: Database Configuration Open laravel_blog and set hostname, username, password and database name in .env file DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel_blog DB_USERNAME=root DB_PASSWORD=root Step 3: Create Migration Now we are going to create a blog. so we have to create a…