  Two-jet production from the direct photon contribution at HERA is a sensitive
measure of the small-$x$ gluon in the proton. We propose measurements of ratios
of the jet cross-sections which will clearly distinguish between gluons with or
without singular behaviour at small $x$. Furthermore, we show that analogous
ratio measurements for the resolved photon contribution provide a sensitive way
of determining the gluon distribution in the photon.
