PHP Operators: Execution Operator



PHP Operators Step By Step Tutorial - Part 9: PHP support one execution operator: backticks(` `), the sign of apostrophe inversed is non of single qoute. Execution operator is used to execute the content which exist in the clasp of backticks as a shell command (shell command) and the result is accomodated in one variable for then to present it at browser.

Operator of backticks is disable if the mode of safe mode is enable or the shell_exec () is disable. This execution operator is just for a while and only applied in the operation system of * nix (Unix and Linux) with Web Server Apache.

Pay attention to the example of using execute operator at script as following:

File name: backticks.php

<html>
<head>
<title>Using Execution Operator</title>
</head>

<body>
<h1>The example for using Execution Operator</h1>
<?
	$q = `ls - al`;
	echo "<pre>$q</pre>";
?>
</body>
</html>


Series this article:
PHP Operators: Introduction
PHP Operators: Arithmetic Operators
PHP Operators: Assignment Operators
PHP Operators: Assignment Operators Table
PHP Operators: Bitwise Operators
PHP Operators: Relation Operators
PHP Operators: Ternary Operator
PHP Operators: Error Control Operator
PHP Operators: Execution Operator
PHP Operators: Increment or Decrement Operator
php Operators: Logic Operator
PHP Operators: String Operator
PHP Operators: Array Operator
PHP Operators: Object Operator
PHP Operators: Operator Priority
PHP Constants: Introduction


Tag: operator, Execution Operator Category: PHP Basic Post : March 08th 2008 Read: 1,853 Bookmark and Share

blog comments powered by Disqus