Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 PHP 中为此 MySql 行调用等效行:
mysql> source [path-of-file].sql
SOURCE 不是本机 mySQL 命令,而是特定于命令行客户端的命令。
在 PHP 中,您可以尝试以下操作:
<?php shell( "mysql --user=$user --password=$password $database < $file" ); ?>