Propel ORM Plus Phing On Windows

今天试用了传说中的Propel,感觉相当好,果然是个不错的ORM。不过它依赖于Phing,正好这两个项目都是BullSoft关注的项目。现在我就来讲下如何配置环境,两个项目都支持Pear安装,但是今天无论如何也装不上Phing,所以就讲讲单独安装的过程吧。

1. 下载两个包

项目官方站地址分别是http://www.propelorm.orghttp://www.phing.info/trac/。由于Propel由两部分组成,一部分用于生成Model,一部分用于使用Model,所以在此我们把生成Model的部分提取出来,也就是propel的generator文件夹,改名为propel和phing统一放在D:\phing目录下。

2. 添用户自定义环境变量,把=号后面的改成你实际的环境

#PHP执行文件目录
PHP_COMMAND=d:\php\php.exe

//phing根目录
PHING_HOME=d:\phing\phing
#propel根目录
PROPEL_HOME=d:\phing\propel
//phing的类目录
PHP_CLASSPATH=d:\phing\phing\classes

Continue reading

了解下Windows NT的主要版本

Microsoft Windows NT 3.1 (1993)
Microsoft Windows NT 3.5 (1994)
Microsoft Windows NT 3.51 (1995)
Microsoft Windows NT 4.0 (1996)
从5.0版开始,Windows NT只是简单地称为Windows了,下面的版本是后来的版本:
Microsoft Windows 2000 (Windows NT 5.0) (1999)
Microsoft Windows XP (Windows NT 5.1) (2001)
Microsoft Windows Server 2003 (Windows NT 5.2) (2003)
Microsoft Windows Vista (Windows NT 6.0) (2006)
Microsoft Windows Server 2008 (Windows NT 6.0) (2008)
Microsoft Windows 7 (Windows NT 6.1)
Microsoft Windows Server 2008 R2 (Windows NT 6.1)

SCW(Solar CLI for Windows)更新至1.1

当make-vendor时,script目录下也会建立相应的bat文件和启动文件,但bat文件固定调用solar文件。举例如下:当 script\solar make-vendor Acme后,在script目录下会新建两个文件:一个是acme.bat,另一个是acme。按理说,当使用script\acme make-vendor Acmd时,acme.bat文件调用的是acme,但事实却不是如此。所以,当删除solar文件时,script\acme不再可用。
Continue reading

打开windows powershell时总提示脚本不能运行

Let’s start with running scripts from within Windows PowerShell itself. (Which, truth be told, is probably the most common way to run Windows PowerShell scripts.) Why do you get weird error messages when you try to run a script? That’s easy. The security settings built into Windows PowerShell include something called the “execution policy;” the execution policy determines how (or if) PowerShell runs scripts. By default, PowerShell’s execution policy is set to Restricted; that means that scripts – including those you write yourself – won’t run. Period.
Continue reading

solar for windows xp

本文已同步发表到论坛:http://solarphp.org.cn/viewtopic.php?f=6&t=104,要下载附件请移步到论坛下载。

想了很久还是决定兼容xp,毕竟XP的用户数仍然很大。

相信有人已经试过了,其实在xp下是可以运行solar的,用复制粘贴方式同步文件(include和source目录之前同步)就行。只不过目前在xp下确实用不了CLI工具。而CLI工具是开发最有力的助手,如果缺少这个助手将是一个巨大的败笔。
Continue reading