In English, commas should be used within a quote, in order to separate it from the indirect speech, and before the quote, for the same reason. Thus, this is the correct answer: "I know you did it," the detective accused the murderer, "and I can prove it!" "Please remember to watch the gap," the conductor warned.
I had this answer on a test a couple months back and I left the answer in my notes. I got it right. So I hope you get it right or my teacher may have made a mistake.