In this work, β-Ga2O3 films with different thicknesses were fabricated on (001) sapphire substrates at room temperature using radio frequency magnetron sputtering technology, then the samples were annealed in an Ar atmosphere at 800℃ for 1h. The effect of film thickness on the phase composition, surface morphology, optical property, and photoelectric detection performance were investigated using XRD, SEM, UV-vis spectrophotometer, PL photoluminescence spectrometer, and Keithley 4200-SCS semiconductor characterization system. The results show that as the film thickness increases, the film crystallinity is improved, films with thickness of 840 nm exhibit best quality, while 1050 nm declines a little. β-Ga2O3 films with different thicknesses exhibit obvious ultraviolet light absorption in the solar-blind region with wavelengths of 200-300nm, and the bandgap width increases with the increase of film thickness. All the β-Ga2O3 films show a broad UV-green light emission peak in the wavelength range of 350-600nm. As the film thickness increases, the intensity of the emission peaks by ultraviolet, violet, and blue light is greatly reduced, which indicates that oxygen vacancy-related defects (VO, VGa-VO) are greatly suppressed with film thickness increasing. Solar-blind ultraviolet photodetectors were fabricated based on the β-Ga2O3 film. Its photoelectric detection performances (the Photo-to-Dark Current Ratio, Responsivity, Detectivity, External Quantum Efficiency) also increase first and then decrease with the increase of film thickness. The β-Ga2O3 ultraviolet photodetector prepared by a thin film with a thickness of 840nm exhibits a very low dark current (4.9×10-12A) under a 5V bias voltage and an ultraviolet light with a wavelength of 254nm (600μW/cm2). It exhibits a high photo-to-dark current ratio (3.2×105), and a short response time of 0.09/0.80s (rising time), 0.06/0.53s (falling time). Its responsivity (R), detectivity (D*), and the external quantum efficiency (EQE) was 1.19mA/W, 1.9×1011 Jones, and 0.58%, respectively. The prepared device has quantifiable characteristics, its photocurrent increases almost linearly with the increase of applied voltage and optical power density, and therefore can work in a linear dynamic region, which indicates that it is very suitable to be used to fabricate solar-blind ultra-violet detectors.