running linux command under php
Moderator: General Moderators
-
scubadiveflorida
- Forum Newbie
- Posts: 10
- Joined: Wed Oct 29, 2003 9:53 am
running linux command under php
I was wondering what commands you use to run linux commands under php. Like for instance say I wanted to go into the root directory and create a new directory then go to that directory and create a new file there. How would I do that? Thanks.
- scorphus
- Forum Regular
- Posts: 589
- Joined: Fri May 09, 2003 11:53 pm
- Location: Belo Horizonte, Brazil
- Contact:
Take a look to these sections of the PHP Manual:
• Execution Operators
• Directory functions
• Filesystem functions
• Program Execution functions
Have a nice day,
Scorphus.
• Execution Operators
• Directory functions
• Filesystem functions
• Program Execution functions
Have a nice day,
Scorphus.
-
scubadiveflorida
- Forum Newbie
- Posts: 10
- Joined: Wed Oct 29, 2003 9:53 am
What am I doing wrong
I am trying to create a directory, move into that directory the write a new file and this does not work. What am I doing wrong?
$output = `mkdir test`;
$output .= `cd test`;
$output .= `touch newfile.txt`;
$output = `mkdir test`;
$output .= `cd test`;
$output .= `touch newfile.txt`;