hus*_*us- 5 database arrays drupal drupal-7
嘿伙计们,我只是想知道如何在Drupal 7中没有模块的情况下设置我的单点登录.我在Drupal 6中运行了它,但是在settings.php文件中有些东西被更改了,我很难过搞清楚这一点.
You can also use a reference to a schema/database as a prefix. This maybe
* useful if your Drupal installation exists in a schema that is not the default
* or you want to access several databases from the same code base at the same
* time.
* Example:
* @code
* 'prefix' => array(
* 'default' => 'main.',
* 'users' => 'shared.',
* 'sessions' => 'shared.',
* 'role' => 'shared.',
* 'authmap' => 'shared.',
* );
* @endcode
* NOTE: MySQL and SQLite's definition of a schema is a database.Run Code Online (Sandbox Code Playgroud)
这是我需要设置的代码,我只是不知道把它放在我的settings.php文件中.有任何想法吗?
Drupal 7 的数据库配置风格如下:
$databases['default']['default'] = array(
'driver' => 'mysql',
'database' => 'd7',
'username' => 'drupaluser',
'password' => '',
'host' => '127.0.0.1',
'port' => 33066,
'prefix' => array(
'node' => 'foo_',
)
);
Run Code Online (Sandbox Code Playgroud)
基于文档:
我在本地测试了它,它似乎按预期工作。
| 归档时间: |
|
| 查看次数: |
4331 次 |
| 最近记录: |