EasyAPNS配置

时间:2012-05-08 16:35:00

标签: ios

嘿,我正在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;
    }

1 个答案:

答案 0 :(得分: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
}

祝你好运!