Making Terminal Calls

This documentation covers functionality of objects that use a class that is extended from WWW_Factory class. Methods and calls in this documentation can be used when building your Models, Views and Controller classes and their functionality.

Introduction

PHP has multiple methods for making terminal requests, depending on the server. To simplify this process, Wave Framework has a wrapper function that tries to find the most suitable function to use when making terminal calls. This terminal method is a wrapper to system(), passthru(), exec() and shell_exec() functions.

Making Terminal Calls

To make a terminal call in an object that is extended from WWW_Factory class, you have to call terminal() method with a variable that is the command to be sent to terminal, like this:

	
	// Making terminal call
	$result=$this->terminal('ls');
	// Printing out the result
	echo $result;
	

Please note that on a lot of servers - especially on shared hosting servers - the terminal calls are disabled entirely.