Search
 
SCRIPT & CODE EXAMPLE
 

PHP

how to check if php is connected to database

<?php
$con = new mysqli("host","username","password","database");
echo $con ? 'connected' : 'not connected';
?>
Comment

PREVIOUS NEXT
Code Example
Php :: remove first letter php 
Php :: php reverse array 
Php :: storage image not showing in laravel 
Php :: hasany cakephp 
Php :: laravel generate env 
Php :: __construct 
Php :: laravel list all routes 
Php :: php read file line by line 
Php :: php regex only number 
Php :: get all values inside session laravel 
Php :: php check how much time each instruction takes to complete 
Php :: laravel run php server by ipv4 
Php :: smarty prestashop get language 
Php :: how to remove notice error in php 
Php :: php make query string from array 
Php :: laravel request all except 
Php :: laravel enum migration example 
Php :: disable admin bar wordpress 
Php :: wordpress get post id 
Php :: wordpress custom theme style.css 
Php :: laravel storage check file exists 
Php :: php set timezone italy 
Php :: get name of parent dir php 
Php :: laravel 9 route controller group 
Php :: laravel add values to request 
Php :: get year in laravel 8 
Php :: wp wc php if cart page is empty redirect 
Php :: larael drop foreign key 
Php :: passed to LcobucciJWTSignerHmac::doVerify() must be an instance of LcobucciJWTSignerKey, null given, 
Php :: max execution time exceeded php 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =