Reputation: 1801
I'm writing a little command line application in PHP, which emulates a shell. It needs to do some work with files, including edit them with it's own text editor (a basic one like nano in the *nix shell). I was wondering if this sort of thing already existed, or if I'd have to write my own.
To clarify: I'm looking for a command line text editor as a function, written in PHP.
Upvotes: 0
Views: 429
Reputation:
There is line editing functionality in the readline extension, but, so far as I know, there is no full document editor.
If that's what you're after, you're probably better off just launching a real editor as a subprocess (e.g. system("nano fileToEdit.txt")
, rather than trying to create one in PHP.
Upvotes: 1