  In this paper, we prove a Kastler-Kalau-Walze type theorem for 4-dimensional
and 6-dimensional spin manifolds with boundary associated with the conformal
Robertson-Walker metric. And we give two kinds of operator theoretic
explanations of the gravitational action for boundary in the case of
4-dimensional manifolds with flat boundary. In particular, for 6-dimensional
spin manifolds with boundary with the conformal Robertson-Walker metric, we
obtain the noncommutative residue of the composition of $\pi^+D^{-1}$ and
$\pi^+D^{-3}$ is proportional to the Einstein-Hilbert action for manifolds with
boundary.
