当我尝试从命令行登录 mySql 时,出现mysql: [ERROR] unknown variable 'sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
<username>@<username>-错误
我应该如何在不登录 MySQL 的情况下解决这个问题?
我正在尝试使用 PHP 创建 Excel 工作表。当我从本地主机调用 API 时,它给了我
Fatal error: Uncaught Error: Class 'vendor\PhpOffice\PhpSpreadsheet\Spreadsheet' not found in /var/www/html/sti/svr/excel/sheet.php:8 Stack trace: #0 {main} thrown in /var/www/html/sti/svr/excel/sheet.php on line 8` error.
Run Code Online (Sandbox Code Playgroud)
这是我的文件:
<?php
// require_once('vendor/autoload.php');
use vendor\PhpOffice\PhpSpreadsheet\Spreadsheet;
use vendor\PhpOffice\PhpSpreadsheet\Writer\Xlsx;
// Creates New Spreadsheet
$spreadsheet = new Spreadsheet();
// Retrieve the current active worksheet
$sheet = $spreadsheet->getActiveSheet();
// Set the value of cell A1
$sheet->setCellValue('A1', 'GeeksForGeeks!');
// Sets the value of cell B1
$sheet->setCellValue('B1', 'A Computer Science Portal For Geeks');
// Write an .xlsx …Run Code Online (Sandbox Code Playgroud)