Running PHP in Django

Is there a way to run PHP scripts in django? I have a plugin in TinyMCE that runs PHP scripts and it can work using XAMPP Apache. However, Django supports running a PHP script, and therefore the plugin cannot work. I would like to know if there is a way to configure Django to run PHP scripts.

Any help or pointers appreciated. Thank you very much!

+4
source share
2 answers

Django is not an HTTP server. You need an HTTP server like Apache, Nginx, etc. Together with the correct php module to run the PHP script.

Then you can configure Django to run on the same server. Here's how to start Django with Apache https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/ . Then you can configure the PHP script on the same server.

After that, how your PHP script interacts with the Django project is implementation specific.

+3
source

Well, there is Django-php, which allows you to run PHP in Django tempaltes - http://animuchan.net/django_php/

Although I would like to draw your attention to the frequently asked questions section of this website.

+3
source

Source: https://habr.com/ru/post/1434038/


All Articles