Libbux
Libbux

Reputation: 1801

Command line text editor written *in* PHP?

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

Answers (1)

user149341
user149341

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

Related Questions