I need to return the file data while running the URL to the browser using Python. Here is my code:
def createfile(request):
if request.method == 'GET' and 'q' in request.GET:
param = request.GET['param']
if param is not None and param != '':
execfile(param)
When user will run http://127.0.0.1:8000/createfile/?param=/opt/lampp/htdocs/Nuclear_reactor/d25/nuclear_vulnerable/hello.py
on the browser the content inside the hello.py
file should return to the browser.