note 127616 added to function.mysql-connect

From: Date: Tue, 13 Sep 2022 08:12:23 +0000
Subject: note 127616 added to function.mysql-connect
Groups: php.notes 
Request: Send a blank email to php-notes+get-219560@lists.php.net to get a copy of this message
Can't find an example like this, so here it is <?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/127616 Del: integrated -- https://main.php.net/note/delete/127616/integrated Del: useless -- https://main.php.net/note/delete/127616/useless Del: bad code -- https://main.php.net/note/delete/127616/bad+code Del: spam -- https://main.php.net/note/delete/127616/spam Del: non-english -- https://main.php.net/note/delete/127616/non-english Del: in docs -- https://main.php.net/note/delete/127616/in+docs Del: other reasons-- https://main.php.net/note/delete/127616 Reject -- https://main.php.net/note/reject/127616 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#219560) next »