We propose a scheme to create an effective magnetic field,which can be perceived by cold neutral atomsin a two-dimensional optical lattice,with a laser field with a space-dependent phase and a conventional laser field actingon A-type three-level atoms.When the dimensionless parameter α,being the ratio of flux through a lattice cell to oneflux quantum,is rational,the energy spectrum shows a fractal band structure,which is so-called Hofstadter’s butterfly.