generate php document script