symfony0.6升级到1.0
关键词: symfony0.6升级到1.用pear upgrade symfony/symfony升级到symfony 1.0
对于0.63的老项目升级,进入项目目录,更改项目目录下的symfony文件,添加内容如下:
- #!/usr/bin/env php
- /*
- * This file is part of the symfony package.
- * (c) 2004-2006 Fabien Potencier
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
- chdir(dirname(__FILE__));
- include('config/config.php');
- include($sf_symfony_data_dir.'/bin/symfony.php');
修改项目目录下的config/config.php文件,添加如下:
- // symfony directories
- $sf_symfony_lib_dir = 'D:/php-5.1.6-Win32/pear/symfony';
- $sf_symfony_data_dir = 'D:/php-5.1.6-Win32/pear/data/symfony';
执行
symfony upgrade 1.0
symfony propel-build-model
symfony cc
如果老项目的模版页面使用过form_error函数,那么在模版页面上添加
- use_helper('Validation')
在action中如果使用过$this-
这样的语句要修改成
- $response = $this-<getResponse();
- $response-<addJavascript('css');
至此,symfony及老项目就都升级到1.0版本了。
【作者: Liberal】【访问统计:】【2007年07月30日 星期一 09:58】【注册】【打印】
本文提供从Symfony 0.6升级到1.0的详细步骤。包括更新配置文件、使用PEAR进行升级、调整模板和代码等关键操作。
284

被折叠的 条评论
为什么被折叠?



