How will you check if a file exists or not using PHP?
PHP | file_exists( ) Function The file's existence can be confirmed using the file_exist() function which takes the file name as an argument. file_exist("abc.jpg") The file_exists() function is an inbuilt function in PHP that …
How to define an empty class in python
Python | Create an empty class In python, it required adding a pass statement to define an empty class. The pass is a special statement in python that does nothing. It just works as a dummy statement. …
What is the default URL pattern used in Codeigniter framework?
Codeigniter | The default URL pattern In CodeIgniter, URLs are designed to be search-engine and user-friendly. CodeIgniter uses a segment-based approach rather than using a "query string" based approach. http://www.example.com/user/edit/rakesh The default URL pattern in …
List Databases supported By Codeigniter Frameworks
Codeigniter | List Databases supported By Codeigniter Following Databases are supported by Codeigniter Frameworks: Database Name Drivers to support Codeigniter MySQL MySQL (deprecated), MYSQLI and PDO drivers Oracle oci8 and PDO drivers PostgreSQL Postgre and …
Print html page with css
JQuery | Print HTML page with CSS printThis is a jquery library which can print specific or multiple DOM element without losing css style. Features Print specific & multiple DOM elements Preserve page CSS/styling or add …
How to remove index.php in codeigniter?
Codeigniter | Remove index.php from URL in Codeigniter? The file index.php is the root file of Codeigniter. it contains setting code for CodeIgniter. So, when we redirect to other pages the URL comes with index.php …
What is session in php?
Session in php A session is a global variable which is used to store users/sensitive information on the server. Each session register a unique session id which is use to fetch stored value. Session store …
how to get the first 5 words from a string in python
Python | Get the first 5 words from a string This can be done by using the `split()` and `join()` methods >>> massage = 'Today is a sunny day but tomorrow it might rain' >>> …
Create and delete an elasticsearch index in Python
Python | Create and delete an index in Elasticsearch To use the elastic search we need to import the Elasticsearch package >>> from elasticsearch import Elasticsearch now create an object of Elasticsearch search class by providing …
How to use php array with sql IN operator?
SQL | IN operator with PHP Array In this article we will use PHP Array with SQL IN operator. SQL IN operator allows us to specify multiple values in where clause. So in this article …
Print prime number between 1 to 100 in python
Python | Print prime no between 1 to 100 This is an example of how to print all prime numbers between 1 and 100 using for loop. A prime number is a natural number greater …
What are the predefined classes in PHP?
Predefined classes in PHP are: Directory stdClass __PHP_Incomplete_Class exception php_user_filter
What is the difference between unlink and unset function?
unlink() and unset() The unlink() and unset() function in php have same functionality (i.e.: delete) but the difference is in the type of data on which they are applied to perform such delete functionalities. unlink() …
Save a generated PDF file using php
PHP | Download pdf file To download a pdf file in PHP, we need to use the header() function. In the header() function, we need to pass "Content-Disposition" which is used to supply a recommended filename …
How to select dropdown item based on value
JQuery | Select dropdown item based on the value Change the selected option by value on the select box with jQuery is common nowadays. So let us have a select element with the list of …