Using the porphyrin molecule TEOP, highly ordered films of TEOP spheres were fabricated through a convenient and efficient in situ self-assembly approach. The diameter of the spheres can be adjusted by tuning the temperature. The well ordered film of TEOP spheres can be used to efficiently kill gram-negative bacteria under visible light.