It may also come from an injury, such as a gunshot or knife wound.Secondary peritonitis can also occur when bile or chemicals released by the pancreas (pancreatic enzymes) leak into the lining of the abdominal cavity.Substances from outside the body can also cause secondary peritonitis if they get into the peritoneal cavity.