Slim framework remove index.php

In public directory create new .htaccess file like below

    public_html/ <-- Document root!
        index.php <-- I instantiate Slim here!
        Slim/ <-- I store Slim lib files here!

Add below code in .htaccess file

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]

Changing www document root directory in wamp

The wamp server is keeping the www or document root directory within the wamp server installation directory.  it's not advisable to keep the development files in the installation directory since it might be removed when we uninstall/upgrade the wamp.
The apache provides configuration to manage the document root. Please follo the below steps to configure custom document root.

Step 1 - Update document root in httpd.conf

Java Hello World Example - First Program

Simple Hello World example program to print "Hello World" text.

Java Hello World Program

Create a below program using any text editor.

class HelloWorld
	public static void main(String[] args) {
		System.out.println("Hello World");

Save this program in a following file name ensure filename contains the class name.

Compiling the program

To compile the program run the below Java Compiler in command prompt

Separate cart item for similar product in magento

If we add similar products to cart in Magento, it will update the same cart item quantity and price by default.

We integrated a product with custom attributes. We need to add multiple cart items when we add product to cart if the product has custom attribute. 

Fortunatly, Magento allows us to override its core functionality to meet our requrement. We have to follow the following steps to achive this custom requirement.

Create custom module


Types of Errors in PHP

Basically there are four types of errors in PHP

Types of errors usually referred to as error levels in PHP

  1. Parse error (Syntax Error or Compile-time errors)
  2. Fatal error
  3. Warning
  4. Notice

1. Parse error (Syntax Error or Compile-time errors)

Compile time parse error. When we make mistake in PHP code like, missing semicolon or any unexpected symbol in code