main_file.py 315 B

123456789
  1. from .tool.func import *
  2. def main_file_2(conn, data):
  3. curs = conn.cursor()
  4. if data == 'robots.txt' and not os.path.exists('robots.txt'):
  5. return flask.Response('User-agent: *\nDisallow: /\nAllow: /$\nAllow: /w/', mimetype='text/plain')
  6. else:
  7. return flask.send_from_directory('./', data)