如何在PHP中显示来自SQL文件的信息?

In the file "/folderx/index.php", I would like to display data from "/data.sql". How would I do this? I've tried searching the internet for something but I only found stuff for phpMyAdmin (which I'm not using)

The only way to do that reliably is to either import the SQL file into a database and query the data or write (or find) a SQL parser for PHP. To be blunt, SQL files are not meant to be used for data access. They're meant to store database contents into a portable file (e.g. for backup or import/export).

"/data.sql" should contain SQL queries which you need the sql server to execute, you may want to start using phpmyadmin or better still mysql workbench,

You can then connect to the sql server from php to read the data from the database and display in index.php see How to read data from mysql database