In this work, we propose a generalized partially functional linear model, which not only models the relationship between multiple scalar and functional predictors and response, but also automatically estimates the link function. Specifically, we use the functional principal component analysis method to reduce the dimensionality of functional predictors, estimate the regression coefficients using the maximum likelihood estimation method, estimate the link function using the method of local linear regression, iteratively obtain the final estimator, and prove the asymptotic normality of the estimator. The asymptotic normality is illustrated through simulation experiments. Finally, the proposed model is applied to study the influence of environmental, economic, and medical levels on life expectancy in China. In the study functional predictors are the daily air quality index, temperature, and humidity of 58 cities in 2020 and scalar predictors are GDP and number of beds in hospitals.