Snippets tagged “exec”
9 snippets use this tag.
- Calling a function of a module by using its name (a string)Python
To call a function from a module by using its name as a string, you can use the importlib module.
- Execute root commands via PHPPHP
It is generally not recommended to execute root commands via PHP, as it can pose a security risk to the system.
- How can I get the MAC and the IP address of a connected client in PHP?PHP
You can use the $_SERVER['REMOTE_ADDR'] variable in PHP to get the IP address of a connected client.
- How can I make one python file run another?Python
To run one Python file from another, you can use the exec function or the subprocess module.
- How to Count the Pages in a PDF File with PHPPHP
PHP provides a range of extensions and functions for getting the number of pages in a PDF document. Let’s check out the most efficient ones, here.
- How to run Unix shell script from Java code?Java
To run a Unix shell script from Java code, you can use the Runtime.getRuntime().exec() method to execute the script.
- How to use wget in php?PHP
You can use the exec function in PHP to execute the wget command.
- php exec() is not executing the commandPHP
There could be a few reasons why the exec() function in PHP is not executing the command as expected.
- PHP exec() vs system() vs passthru()PHP
The exec(), system(), and passthru() functions are all used to execute external programs in PHP.