G
G
Glory2021-06-19 00:27:34
Web development
Glory, 2021-06-19 00:27:34

In what language should I write a script for replacing parameters of config files?

Like any webmaster, I encounter such routines as downloading a client's site from a hosting service and then need to change some parameters in the configs - usually these are paths, database settings and a domain name.

So I think that it's time to write a program that would change one text for another in the files prescribed in advance.
Now this has to be done through phpmyadmin using search and replace, but this is not entirely automated and takes time. but I would like something like running the script and showing you the available fields of the config files that you need to change and nearby so that all that remains is to set the values ​​\u200b\u200bfor replacement and click "GO"

With php I can do it easily. But maybe there is a more convenient language for these purposes? it is desirable that the shell appears with the values ​​already filled in in the Dos or Linux style. Well, so that the hands do not have the available parameter values.

In php this is easy to do, but there may be more convenient ways.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2021-06-19
@402d

https://getcomposer.org/doc/articles/scripts.md
https://symfony.com/doc/current/console.html
Already done.
when deploying a project, answer questions and install as needed

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question