TiO2 film was deposited on glass substrate by a sol-gel process using PEG1000 as a template to prepare porous film. The influences of HCl and water amount, layers of the film, and the amount of PEG100 were investigated. The increase of HCl can slightly promote the photocatalytic activity of the film. When n(HCl):n(TEOT) is 0.2:1, the degradation rate is in its maximal value. The optimal water value can be obtained at n(H2O):n(TEOT)=3:1. The photocatalytic activity increases with increasing layer numbers. The five layers film has the highest photocatalytic activity, while the activity declines after further increase of film layers. The photocatalytic activity of theTiO2 film is enhanced with the addition of PEG1000 at first, and then excessive addition of the template leads to activity dropping.