0.2.2 • Published 10 years ago

phpexe v0.2.2

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

phpexe

Execute PHP from within Node

Install

Requires PHP installed and available via your environment path.

npm install phpexe

Usage

sample.php

<?php
	echo "Hello"
?>

Node usage of sample.php

var php = require('phpexe');

php('sample.php', function(error, data) {
	if (error) {
		console.log(error) // PHP error or stderr
	} else {
		console.log(data); // PHP stdout  'Hello'
	}
});

var args = ['first parameter', 'second']
php('sample.php', args, function(error, data) {
	if (error) {
		console.log(error) // PHP error or stderr
	} else {
		console.log(data); // PHP stdout  'Hello'
	}
});

License

MIT

0.2.2

10 years ago

0.2.1

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago