Two-dimensional particle-in-cell (PIC) simulations have been used to investigate the interaction between a laser pulse and a foil exposed to an external strong longitudinal magnetic field. Compared with that in the absence of the external magnetic field, the divergence of proton with the magnetic field in radiation pressure acceleration (RPA) regimes has improved remarkably due to the restriction of the electron transverse expansion. During the RPA process, the foil develops into a typical bubble-like shape resulting from the combined action of transversal ponderomotive force and instabilities. However, the foil prefers to be in a cone-like shape by using the magnetic field. The dependence of proton divergence on the strength of magnetic field has been studied, and an optimal magnetic field of nearly 60 kT is achieved in these simulations.