0

嘿,我正在 iOS 上构建一个应用程序并想要实现 PushNotifications。我正在使用来自https://github.com/manifestinteractive/easyapns的 EasyAPNS 代码 配置它时,我显然必须在 DB_Connect php 文件中添加我的 Mysql-Database 信息。我不擅长 php,所以我真的不知道我必须如何在文件中准确输入我的信息,因为在教程中我看到文件总是看起来不同。各位大神能给我一些指导如何进行吗?Thnaks,oengelha。

这里的代码片段:

/**
    * Constructor. Initializes a database connection and selects our database.
    * @param string $host       The host to wchich to connect.
    * @param string $username   The name of the user used to login to the database.
    * @param string $password   The password of the user to login to the database.
    * @param string $database   The name of the database to which to connect.
    */
    function __construct($host, $username, $password, $database)
    {
        $this->DB_HOST     = $host;
        $this->DB_USERNAME = $username;
        $this->DB_PASSWORD = $password;
        $this->DB_DATABASE = $database;
    }
4

1 回答 1

1

这应该有帮助

function __construct()
{
    $this->DB_HOST     = 'Your Host';
    $this->DB_USERNAME = 'Your Username'; // !!! CHANGE ME
    $this->DB_PASSWORD = 'Your Password'; // !!! CHANGE ME
    $this->DB_DATABASE = 'Your Database'; // !!! CHANGE ME
}

祝你好运!

于 2012-07-17T16:52:26.040 回答