Latest Post

PHP: How to count files in folder?

In PHP, you are work on php and you want to need display count number of files in specific folder then you do, glob() through you count number of file are there in specified folder. now in following example you can see "/var/www/test" in this folder, count how many files are there in that folder. glob function take a two argument first one for directory or folder path and second argument for filter. Filter means if you pass '*' then it will count all type of file, i mean all extension, but if you need to count just text file then you can put like '*.txt'. That't it, if in your directory, func.....

By Hardik Savani | February 4, 2016 | | 2094 Viewer | Category : PHP

How to find day from specific date in PHP?

Whenever you need to det day like Monday, Tuesday etc from full date. i mean you have any specific date like "2015-10-10" and you want to get day then you can do in both way first using strtotime() and second using DateTime object. In Following example you can see i give you both way to get day from your date. now i added format 'l' so it will return full name of day like "Tuesday", but if you want to get short name of day then you can change format like "D". <pre class="language-php"> // Using strtotime() $specificDate = strtotime('2016-2-3'); $specificDate = date('l', $specificDate); var_d.....

By Hardik Savani | February 3, 2016 | | 784 Viewer | Category : PHP

How to push item to 0 index or first of $scope object in AngularJS?

you are working on angular JS and you wanted to add item on top of array, i mean you need to add 0 index of $scope array then you can do. in following example you can see how to do.if you want to push first then you have to use splice() instend of push(). <strong>Example:</strong> <pre class="code language-html"> <html> <head> <title>Angular JS</title> <script src=""></script> <script src=""></script> <script&.....

By Hardik Savani | February 2, 2016 | | 1443 Viewer | Category : JSON AngularJS

How to increment or decrement a column value in laravel?

Whenever you need to increment or decrement value of column in database, then you do not need to first fetch that record and then update, so that way we will make long code and very hard code, so basically you can increment and decrement by using increment() and decrement() statment of laravel query builder. If you want to increment or decrement opration using update() method of laravel query builder then you also do that, in following example i am showing you how to increment and decrement value of column in table by using increment(), decrement() and update(). <pre class="language-php"> na.....

By Hardik Savani | February 2, 2016 | | 10586 Viewer | Category : Laravel

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Some time when you are open any link your website then browser display following massage <h2 style="margin:0px;padding:0px;">Not Found</h2> <span style="margin:0;padding:0;">The requested URL /test.html was not found on this server.</span> <span style="margin:0;padding:0;">Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.</span><br /> this problem fix by .htaccess write following code in your .htaccess file <pre class="language-mysql"> RewriteEngine on <IfModule mod_rewrite.c> RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f Rewrit.....

By Hardik Savani | February 1, 2016 | | 1160 Viewer | Category : .htaccess

gmaps.js Form JS Plugin Repo Old Service Provider daterangepicker csrf_token Email Protection Animate MySQL Subquery Popup Box Mailgun API Particular execute query Last Algolia Package Exists SUM() csv Function Jquery Modal toastr js MVC Socialite Numeric Timepicker Sublime React JS FILTER_VALIDATE_URL CRUD IP Select Query RSS Magento Input Character File Upload Localization Script Import hasTable Zip Components & Slots Resize Image MSSQL Link upload_max_filesize Linkedin API PHP Connection npm laravel-elixir Dynamic Dependant Dropdown Form Jquery stevebauman/location composer package Lavacharts select box search Rewrite Path php artisan serve Count Attr Laravel Resource strpos Dialog box Frontside Validation select2.js response() Sort 404 error page Force Carbon Chat HTML Send Base URL pngquant auth() Laravel 4 typed.js plugin Date Format Solve Admin Bootstrap Theme split slice() Login With FB Loop Custom Segment Ajax Request Record Pagination Laravel 5.4 - Markdown Mailables Middleware Location read more Progress Bar Datepicker DATEDIFF() php_ini_loaded_file Switchery JS Select HTML to PDF Current Laravel Builder Datetimepicker Failed xoxco tags input Linux Interfaces helper Plugins MassAssignmentException Vue.JS Allow Mysql Concat Column Log Activity Inserted Id Origin Top Object Artisan Command Strings setTimeout() DB json() jquery.lazyload.js oauth toSql Google OAuth Notification array_map Cache JWT str_replace Config filesize() croppie.js Controller Remove Now Limit Typeahead JS meta http-equiv tag Log Form Validation Javascript toArray()