the directory you are in needs to allow the user apache or nobody (depends
on your setup) to allow the creation of files.
Simpler to do this
create a dir within the dir you are in, call it _write or some thing to that
effect.
from the command line
mkdir _write
chmod 777 _write
then adust you script as so.
file: ok (permission 755)
----------------------------------
#!/bin/bash
echo abc >> ./_write/abc.txt
this way any script can create a file in the _write dir.
*or* you have to create the file abc.txt with nothing in it and make it
writable
--
Mike Bradley
http://www.gzentools.com -- free online php tools
"Tim" <ti********@sinaman.com> wrote in message
news:e5**************************@posting.google.c om...
I have tried to write a php program to execute the shell script,but
dont know why it is not successful lei?
file: test.php
<?
system("/home/www/htdocs/ok");
?>
file: ok (permission 755)
#!/bin/bash
echo abc >> abc.txt
Why it is not successful lei(still cant see any file named as abc.txt
after run test.php)? I have tried other commands like shell_exec(),
also not work.