Tag : file_exists()


How to check file is exists or not in PHP?

If you need to check file is exixt or not on folder. Normally we require to check image is exist or not, video is exists or not etc. In this example i use file_exists() for determine file is available or not in given path. So if you also need check then follow bellow example: <strong>Example:</strong> <pre class="prettyprint lang-php"> if(file_exists('./upload/flower.jpg')){ print_r('Image is exist.'); }else{ print_r('Image is not exist.'); } </pre>

By Hardik Savani | April 26, 2016 | | 508 Viewer | Category : PHP
READ MORE

How to check if file exists or not in Laravel 5?

Nowdays laravel framework is popular framework in PHP Language. So, if you required to check if file is exists or not in given path then you can check eisily. Normally we always need to check if image exists, check if pdf file exists, check if docs exists or not etc. I give you two way to check file is Exists or not. one using file_exists() and second one using File facade of laravel 5. it's better if you preffer File facade example. So, let's see and implement: <strong>Example 1:</strong> <pre class="prettyprint lang-php"> if(file_exists(public_path('images/1461177230.jpg'))){ dd('File i.....

By Hardik Savani | April 23, 2016 | | 2970 Viewer | Category : Laravel
READ MORE

    Simple PHP Jquery Ajax CRUD(insert update delete) tutorial example with source code

    Simple PHP Jquery Ajax CRUD(insert update delete) tutorial example with source code

    Open Post

    How to get gravatar image from email using Jquery?

    How to get gravatar image from email using Jquery?

    Open Post

    How to create quick apache virtual host in Ubuntu?

    How to create quick apache virtual host in Ubuntu?

    Open Post

    Laravel 5 Autocomplete using Bootstrap Typeahead JS Example with Demo

    Laravel 5 Autocomplete using Bootstrap Typeahead JS Example with Demo

    Open Post

    Laravel 5 Stripe example using Laravel Cashier from Scratch

    Laravel 5 Stripe example using Laravel Cashier from Scratch

    Open Post

    Laravel 5 and Vue JS CRUD with Pagination example and demo from scratch

    Laravel 5 and Vue JS CRUD with Pagination example and demo from scratch

    Open Post