I am trying to create an RSS feed from a mysql database that I already have. Can I use PHP in an XML file that needs to be sent to the user so that it generates content on demand? Or should I use cron in a PHP file and generate an xml file? Or should I add the execution of the php file that xml generates after posting the content to be used in RSS? What do you think is best practice?
All three approaches are technically possible. However, I would not use cron because it delays the process of updating your XML files after changing the contents of the database.
PHP- XML , , PHP , *.php, .htaccess.
, XML . , XML , , .
cron PHP script, XML . PHP.
, . , cron , , . .
Content-type text/xml PHP , XML , . , , .
Content-type
text/xml
Source: https://habr.com/ru/post/1777432/More articles:What does symmetry mean when building Real vs Imaginary Components FFT of the periodic time series - mathВызов Scala из Groovy: как обрабатывать разные типы коллекций? - scalaWhat is it? to groovy variables? - grailsSpring validation: cannot convert from String to Date - springDatabase Synchronization Mirroring / Replication / Logging - sql-server-2008ActiveMQ: starting a consumer without a broker - javaSQL Server Database Comparison Tool - databaseASP.NET MVC strongly typed representations or not? - asp.net-mvcC ++ specifying timeval elements - c ++Django: problem with Django + django-registration + jinja - djangoAll Articles