账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    宝塔面板安装的 phpMyAdmin 打开一直提示 No input file specified.
    49
    0
    已经卸载重新安装过, 还是一直这个提示, 启用公共访问权限是打开的 怎么回事啊 求解
    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 唐朝小道 普通会员 1楼

      No input file specified error occurs when PHPMyAdmin tries to open a connection to a MySQL database using the following syntax:

      php $conn = mysqli_connect("localhost", "username", "password", "database_name");

      In this syntax, the $conn variable is the database connection object that represents the connection to the MySQL database. The localhost address represents the server IP address or hostname where the database is hosted, username and password are the database username and password, and database_name is the name of the database you want to connect to.

      If you are trying to open a connection using the mysqli_connect() function without specifying a file path to the phpMyAdmin database, you will receive this error message. This occurs because phpMyAdmin needs a file to be specified as the location of the database, typically a MySQL database file named phpMyAdmin.sql in the same directory as your PHP script.

      To fix this error, you need to provide a file path to the phpMyAdmin database. Here are the steps to do so:

      1. Locate the phpMyAdmin.sql file in the same directory as your PHP script.
      2. Open the phpMyAdmin.sql file in a text editor or a code editor (e.g., Notepad, Sublime Text, or Visual Studio Code).
      3. Add the following code to the phpMyAdmin.sql file to specify the database path:

      sql -- Replace the following line with your actual database path DATABASE_HOST = 'localhost'; DATABASE_USER = 'username'; DATABASE_PASSWORD = 'password'; DATABASE_NAME = 'database_name';

      1. Save the phpMyAdmin.sql file and exit the text editor or code editor.
      2. Add the following line to the beginning of your PHP script to specify the database path:

      ```php $servername = "localhost"; $username = "username"; $password = "password"; $dbname = "database_name";

      // Create connection $conn = mysqli_connect($servername, $username, $password, $dbname); ```

      Now, the mysqli_connect() function should be able to establish a connection to the MySQL database without specifying a file path. If you continue to receive the "No input file specified" error message, make sure that the phpMyAdmin.sql file is in the correct directory and that the correct database credentials are specified. If you're using a different version of phpMyAdmin, the file path may be slightly different. In that case, check the official documentation for the version you are using to ensure the correct syntax for specifying the database path.

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部