We investigate the phase transition induced by small molecules in confined copolymer films by using density functional theory. It is found that the addition of small molecules can effectively promote the phase separation of copolymers. In a symmetric diblock copolymer film, the affinity and concentration of small molecules play an important role in the structure transitions. The disordered--lamellar transitions, lamellar--lamellar transitions and the re-entrant transitions of the same structures are observed. Our results have potential applications in the fabrication of new functional materials.