The massive field-theory approach for studying critical behavior in fixed space dimensions $d<4$ is extended to systems with surfaces.This enables one to study surface critical behavior directly in dimensions $d<4$ without having to resort to the $epsilon$ expansion. The approach is elaborated for the representative case of the semi-infinite $|bbox{phi}|^4$ $n$-vector model with a boundary term ${1/2} c_0int_{partial V}bbox{phi}^2$ in the action. To make the theory uv finite in bulk dimensions $3le d<4$, a renormalization of the surface enhancement $c_0$ is required in addition to the standard mass renormalization. Adequate normalization conditions for the renormalized theory are given. This theory involves two mass parameter: the usual bulk `mass (inverse correlation length) $m$, and the renormalized surface enhancement $c$. Thus the surface renormalization factors depend on the renormalized coupling constant $u$ and the ratio $c/m$. The special and ordinary surface transitions correspond to the limits $mto 0$ with $c/mto 0$ and $c/mtoinfty$, respectively. It is shown that the surface-enhancement renormalization turns into an additive renormalization in the limit $c/mtoinfty$. The renormalization factors and exponent functions with $c/m=0$ and $c/m=infty$ that are needed to determine the surface critical exponents of the special and ordinary transitions are calculated to two-loop order. The associated series expansions are analyzed by Pade-Borel summation techniques. The resulting numerical estimates for the surface critical exponents are in good agreement with recent Monte Carlo simulations. This also holds for the surface crossover exponent $Phi$.