Does anyone know if I can run a python application inside a php div?
An example would be to have a php with a menu… and in a central div, invoke my app.py that to do a test would be the following:
from flask import Flask, render_template
app = Flask(__name__)
There is no such thing as “a php div”, so it’s hard to understand the question.
PHP is a programming language, generally used on the server to create HTML. It serves the same sort of purpose as your existing Flask templates, so it can’t really help you with this project.
I was asking because currently I have an intranet on the one hand programmed in php where I have the menu part, footer… and in the central part appears what you are sending from the lateral menu.
Currently there are applications but in the same php language and I wanted to couple my application in python, doing the same, from the menu click and show my application.
From what I’ve been looking at it seems that it can be done but for the moment I’ve only seen very basic examples that only show a text programmed in python and my application does more things and needs modules apart from flask, that part is the one I don’t know How would it be so that you can interpret the entire application.