Python - PHP Shared MySQL server connection info? -
I have some MySQL database server information that should be shared between a Python backend and a PHP frontend.
I can always force it with a bunch of str.replace () calls, in the way the information can be read easily and in Python If there is no solution, or I only maintain two separate files, then it works, but if I can do it automatically it will be easy.
I think it will be easy to store the variable in PHP format and directly converts into Python, and I know that Python modules exist for serializing and unserializing in PHP, but I have all of it Did not understand
Any help is appreciated!
Store the shared configuration in a plain text file, preferably in a standard format.
You can consider yaml, ini, or json
I am pretty sure both PHP and Python can read and parse all the three formats very little.
Comments
Post a Comment