终于完美的解决了D4P的Bug
2007-06-01 16:38
155 查看
上次在http://blog.csdn.net/lqglaive/archive/2007/05/31/1633514.aspx中虽然提出了一个简单的解决问题的方法,但每次建立工程都要往工程所在目录中拷入VCL文件夹这也是很讨厌的.于是今天又再一次去分析VCL.INC.PHP,居然看到了一丝玄机:
//If the vcl folder is not a subfolder of the VCL, then it uses vcl-bin as an alias to find the assets
if (substr($fs_path,0,2)=='..')
{
if (!array_key_exists('FOR_PREVIEW',$_SERVER)) $http_path='/vcl-bin';
}
也就是当调试服务器启动时,而vcl又处于相对路径中时(../VCL)就用虚拟目录vcl-bin来查找资源,因此我就把它改为当资源为本地路径且调试服务器也已经启动时就用虚拟目录vcl-bin来查找资源,代码如下:
//If the vcl folder is not a subfolder of the VCL, then it uses vcl-bin as an alias to find the assets
if (substr($fs_path,0,2)=='..'||substr($fs_path,0,5)=='file:')
{
if (!array_key_exists('FOR_PREVIEW',$_SERVER)) $http_path='/vcl-bin';
}
经测试在调试期、设计期及运行期都能正常工作.
//If the vcl folder is not a subfolder of the VCL, then it uses vcl-bin as an alias to find the assets
if (substr($fs_path,0,2)=='..')
{
if (!array_key_exists('FOR_PREVIEW',$_SERVER)) $http_path='/vcl-bin';
}
也就是当调试服务器启动时,而vcl又处于相对路径中时(../VCL)就用虚拟目录vcl-bin来查找资源,因此我就把它改为当资源为本地路径且调试服务器也已经启动时就用虚拟目录vcl-bin来查找资源,代码如下:
//If the vcl folder is not a subfolder of the VCL, then it uses vcl-bin as an alias to find the assets
if (substr($fs_path,0,2)=='..'||substr($fs_path,0,5)=='file:')
{
if (!array_key_exists('FOR_PREVIEW',$_SERVER)) $http_path='/vcl-bin';
}
经测试在调试期、设计期及运行期都能正常工作.
相关文章推荐
- 完美解决IE6不支持position:fixed的bug问题
- Android程序的退出终于完美解决,兼容所有SDK
- 完美解决IE6不支持position:fixed的bug
- 解决ecshop退出登录会清空购物车的bug优化最完美方法
- 解决了CSDN Bug,终于可以发表文章了。
- js完美解决IE6不支持position:fixed的bug
- 完美解决IE6不支持position:fixed的bug
- 终于解决掉文件系统fwrite一个严重的bug
- Android程序的退出终于完美解决
- 完美解决IE6下position:fixed的Bug;以及闪动问题
- 完美解决IE6不支持position:fixed的bug
- 飘云QQ2007现有BUG解决办法...终于搞定!
- 解决了CSDN Bug,终于可以发表文章了。
- 解决了CSDN Bug,终于可以发表文章了。
- 完美解决该死的ie6下select总是置于最上层bug
- 完美解决XCODE5.0以上不会自动更新资源文件的小bug
- 完美解决IE6不支持position:fixed的bug
- 解决了CSDN Bug,终于可以发表文章了。
- Android程序的退出终于完美解决,兼容所有SDK
- 超完美解决ie6不支持position: fixed的bug