I have a function in file background.py
#! /usr/bin/python
import sqlite3
db = sqlite3.connect("vt.db")
cr=db.cursor()
def content():
icerik =""
sql_sorgusu= db.execute("SELECT * FROM icerik").fetchall()
if len(sql_sorgusu = 0):
print("")
else:
icerik +="""
<div class="article"><img src='""" + str(i[3]) + """' alt="Bili?im Hukuku" class="img"><a href="" class="categori">Bili?im Hukuku</a><br><h3 class="articleh3">""" + str(i[1])+ """</h3><a href='/blog.html?id=""" + str(i[0])+ """'>Devam?n? oku</a></div>
"""
return icerik
and i want the run this function in my php file. I know the command shell_exec and exec but they are not running the function or idk how to do that can somebody help me.
question from:https://stackoverflow.com/questions/65940739/can-i-run-python-function-in-php