-1
I am running a coigo via cmd and he started to present this error PHP Fatal error: Uncaught Error: Call to Undefined Function mysqli_connect() in /opt/lampp/htdocs/php/football/Crawler/php/crud/Conect.php:6 Stack trace:
0 /opt/lampp/htdocs/php/football/Crawler/php/crud/Conect.php(13): Conn('root', '', '127.0.0.1', 'football')
1 /opt/lampp/htdocs/php/football/Crawler/autoload.php(3): require_once('/opt/lampp/htdo...')
2 /opt/lampp/htdocs/php/futebol/Crawler/instatscout/Rastrear_metchs_tournament.php(7): autoload('php/crud/Conect...')
3 {main}
thrown in /opt/lampp/htdocs/php/football/Crawler/php/crud/Conect.php on line 6 code
if (!function_exists('conn')) {
function conn($usuario,$senha,$host,$bd)
{
$conn = mysqli_connect($host, $usuario, $senha, $bd);
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
return $conn;
}
}
$conn = conn( "root",'',"127.0.0.1","futebol");
Yes xampp has the xampp control panel to open the panel, whose file name I don’t remember but is in the same installation folder. Anyway you can also start by command with . /xampp start or even indicating what you want to start with . /xampp startapache
– Isac