All-optical devices have attracted much attention for its potential applications in optical communication. In this letter, we propose an all-fiber all-optical phase controller based on an active Fabry-Perot interferometer (FPI) with Er/Yb co-doped fiber (EYDF). Two sections of EYDFs generate a large amount of heat under the pumping excitation of 973 nm, and achieve refractive index change and phase shift of F-P cavity via the thermo-optic effect. Experimental results show that the maximum phase shift of fabricated device is 2.53 π with a slope of 0.0167 π/mW, as well as the phase shift can be converted into the variations of light intensity by the interference characteristic of FPI, enabling optical switching with a rise time of 221 ms. The design of all optical fiber without material coating makes the device has advantages of simple manufacturing, small footprint, especially with good long-term environmental stability. We believe this scheme may provide a new platform for the investigation of all-fiber all-optical modulation, with potential applications in the field of tunable optical filters and Q-switched lasers.