note 127618 added to function.mysql-connect

From: Date: Tue, 13 Sep 2022 08:19:49 +0000
Subject: note 127618 added to function.mysql-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-219562@lists.php.net to get a copy of this message
<?php class Database { private static $conn = null; public function __construct() { exit('Init function is not allowed'); } public static function connect() { if (self::$conn == null) { self::$conn = new mysqli("localhost", "root", "", "article_db"); } return self::$conn; } public static function disconnect() { self::$conn = null; } } ?> ---- Server IP: 45.112.84.4 Probable Submitter: 185.85.3.173 (proxied: 178.191.114.136) ---- Manual Page -- https://php.net/manual/en/function.mysql-connect.php Edit -- https://main.php.net/note/edit/127618 Del: integrated -- https://main.php.net/note/delete/127618/integrated Del: useless -- https://main.php.net/note/delete/127618/useless Del: bad code -- https://main.php.net/note/delete/127618/bad+code Del: spam -- https://main.php.net/note/delete/127618/spam Del: non-english -- https://main.php.net/note/delete/127618/non-english Del: in docs -- https://main.php.net/note/delete/127618/in+docs Del: other reasons-- https://main.php.net/note/delete/127618 Reject -- https://main.php.net/note/reject/127618 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#219562) next »