Fabrication of nitrogen- and phosphorous-doped carbon dots by the pyrolysis method for iodide and iron(III) sensing.