Code: Select all
<?php
foreach ($_POST as $key=>$value) {
$received .= "$key = $value\r\n";
}
$printout = fopen("variables.txt", "w");
fwrite($printout, $received);
fclose($printout);
?>Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
Warning: Unknown: Failed opening '/Users/Admin/Sites/phpflash/ch02/feedback.php' for inclusion (include_path='.:/usr/local/php5/lib/php') in Unknown on line 0
Is there something wrong with the file location and is that why its not creating a .txt file?
JCART | Please use
Code: Select all
tags when posting php code. Review [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]