We propose a scheme for a two-qubit conditional phase gate by quantum Zeno effect with semiconductor quantum dots. The system consists of two charged dots and one ancillary dot that can perform Rabi oscillations under a resonant laser pulse. The quantum Zeno effect is induced by phonon-assisted exciton relaxation between the ancillary dot and the charged dots, which is equivalent to a continuous measurement. We solve analytically the master equation and simulate the dynamics of the system using a realistic set of parameters. In contrast to standard schemes, larger phonon relaxation rates increase the fidelity of the operations.