In the paper, we present a new general function photonic crystals (GFPCs), which refractive index of medium is a arbitrary function of space position. Unlike conventional photonic crystals (PCs), which structure grow from two mediums A and B, with different constant refractive indexes na and n b . Based on Fermat principle, we give the motion equations of light in one-dimensional GFPCs, and calculate its transfer matrix, which is different from the conventional PCs. We choose the linearity refractive index function for two mediums A and B, and find the transmissivity of one-dimensional GFPCs can be much larger or smaller than 1 for different slope linearity refractive index function, which is different from the transmissivity of conventional PCs (its transmissivity is in the range of 0 and 1). Otherwise, we study the effect of different incident angles, the number of periods and optical thickness on the transmissivity, and obtain some new results different from the conventional PCs.