  Within a multiphase transport model we study phi meson production in
relativistic heavy ion collisions from both superposition of initial multiple
proton-proton interactions and the secondary collisions in the produced
hadronic matter. The yield of phi mesons is then reconstructed from their
decaying product of either the kaon-antikaon pairs or the dimuon pairs. Since
the kaon-antikaon pairs at midrapidity with low transverse momenta are
predominantly rescattered or absorbed in the hadronic medium, they can not be
used to reconstruct the phi meson and lead thus to a smaller reconstructed phi
meson yield than that reconstructed from the dimuon channel. With in-medium
mass modifications of kaons and phi mesons, the phi yield from dimuons is
further enhanced compared to that from the kaon-antikaon pairs. The model
result is compared with the experimental data at the CERN/SPS and RHIC energies
and its implications to quark-gluon plasma formation are discussed.
