Cosmic ray photodisintegration and the knee of the spectrum