r/PHPhelp •Posted byu/Pavlic 1 day ago How to start a vim/nano editor from a running php cli app Hey,
As the title says, how can I start a nano/vim/… (preferably default console editor) from a php script.
I am trying to solve this for few days now. I am on windows. I can start both nano and vim from console without a problem. Please help! 😊
So…to simplify a bit: I have a script that is intended to be run in console. I need to get multiline input from user (with variable length), for which I would like to open a console editor for user and then pipe it’s output back to my script.
Is something like that possible? I guess it should be, as I found SO answer, saying that system(vim > ‘tty’) should work. Well…it doesn’t work for me. It opens editor without any ‘GUI’ (just empty space) and then saves it in file ‘tty’. I think that editor is started, because I can exit it like I normally would (fe. nano is closed with ctrl+x).
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.