can exec() function execute the shell commands.

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
tech.gsr
Forum Newbie
Posts: 4
Joined: Wed Mar 25, 2009 7:16 am

can exec() function execute the shell commands.

Post 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
Darkzaelus
Forum Commoner
Posts: 94
Joined: Tue Sep 09, 2008 7:02 am

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

Post by Darkzaelus »

use the php version:

Code: Select all

 
mkdir('hello');
 
User avatar
Bill H
DevNet Resident
Posts: 1136
Joined: Sat Jun 01, 2002 10:16 am
Location: San Diego CA
Contact:

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

Post by Bill H »

Also make sure that you have permission on the server.
Post Reply