0

如何将构建文件夹转移到另一个站点?

问题是数据库表前缀的名称被缝合到文件中,如果我有很多站点,我将不得不手动更改数据。是否可以自动更改表名和前缀?

例如:

abstract class BaseCategoriesPeer {

/** the default database name for this class */
const DATABASE_NAME = 'test';

/** the table name for this class */
const TABLE_NAME = 'test_123_categories';

对于每个新站点,我都必须更改数据?

4

1 回答 1

0

If I got it correctly, here's a possible solution:

You can check the directory in which your source file is, and make a switch to define a variable (let's say) $appStored.

Then in a class for database access definitions (it's more common than a table name schema that depends on the deploy site), you make another switch, this time switch ($appStored), and then define the names for each deploy configuration.

于 2012-08-05T16:10:04.343 回答