Boundary conditions for the photon structure function in the leading and subleading order