The proton-proton momentum correlation functions ($C_{pp}(q)$) for kinematically complete decay channels of $^{23}$Al $rightarrow$ p + p + $^{21}$Na and $^{22}$Mg $rightarrow$ p + p + $^{20}$Ne have been measured at the RIKEN RI Beam Factory. From the very different correlation strength of $C_{pp}(q)$ for $^{23}$Al and $^{22}$Mg, the source size and emission time information were extracted from the $C_{pp}(q)$ data by assuming a Gaussian source profile in the correlation function calculation code (CRAB). The results indicated that the mechanism of two-proton emission from $^{23}$Al was mainly sequential emission, while that of $^{22}$Mg was mainly three-body simultaneous emission. By combining our earlier results of the two-proton relative momentum and the opening angle, it is pointed out that the mechanism of two-proton emission could be distinguished clearly.