Page 1 of 1

can exec() function execute the shell commands.

Posted: Wed Mar 25, 2009 7:22 am
by tech.gsr
Hi,

i want to create a directory with the function exec() on my server using shell command 'mkdir' when a custom.php file executes.
<?php
exec('mkdir hello');
?>

but it is not not creating the directory.

any help.....

thanks

Re: can exec() function execute the shell commands.

Posted: Wed Mar 25, 2009 9:31 am
by Darkzaelus
use the php version:

Code: Select all

 
mkdir('hello');
 

Re: can exec() function execute the shell commands.

Posted: Wed Mar 25, 2009 10:13 am
by Bill H
Also make sure that you have permission on the server.