Skip to main content

Posts

Showing posts from March, 2018

Create snippets in sublime text editor

How to create snippets in sublime text editor We can add code short-codes or snippets in sublime text. For example we creating a  echo '<pre>'; print_r($YOURARRAY); echo '</pre>'; exit; short code, after creating snippet we don't need to write whole line of code every time , we just need to type eche and then press tab button enter button , sublime text will auto generate that code for you. So here is the simple steps to create snippet to create own code shortcuts in sublime text. Go to Sublime Text Top Menu and click on  Tools->New Snippet.A new file will open. Now paste the below code <snippet>     <content><![CDATA[       echo '<pre>'; print_r(${1:ARRAY}); echo '</pre>'; exit;       ]]></content>     <description>PHP: Pretty print_r</description>     <scope>source.php</scope>  ...

Codeigniter - Remove index.php from url

Remove index.php from url in codeigniter By default codeigniter(CI) includes index.php in url but we can remove index.php from url easily by using htaccess.   To remove index.php from your codeigniter website url ,  create a .htaccess file in root directory and  paste the below code. RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L]     Now navigate to your website and you can access your  website without including index.php.