Nelly Yusupova wrote:
Here is the command that I'm trying to execute.....
system ("/usr/bin/wget -P/tmp --post-data
'subscribees=$email&adminpw=$password&send_welcome_msg_to_this_batch=0&send_
notifications_to_list_owner=0'
http://www.emdrhap.org/mailman/admin/$list/members/add", $returnval);
Try the following:, courtesy of php.net
|<?php
$filename = '/tmp/test.txt';
$somecontent = "Add this to the file\n";
// In our example we're opening $filename in write mode.
if (!$handle = fopen($filename, 'w')) {
echo "Cannot open file ($filename)";
exit;
}
// Write $somecontent to our opened file.
if (fwrite($handle, $somecontent) === FALSE) {
echo "Cannot write to file ($filename)";
exit;
}
echo "Success, wrote ($somecontent) to file ($filename)";
fclose($handle);
?> |
Yeah yeah, any process should be able to write to files in the tmp
folder, but I've had systems where that is not the case(running *bsd by
any chance?)
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk
NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com
Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php