dflow Posted June 10, 2009 Share Posted June 10, 2009 i am trying to get a file and save it to a folder i see the preview but nothing is saved <?php //url vars: $urlRID = $_GET['RID']; $urlSupID = $_GET['SupID']; $urlPID = $_GET['PID']; $urlLN = $_GET['LN']; $urlpar = "http://mysite.com/backoffice/sv_preview.php?RID='.$urlRID.'&PID='.$urlPID.'&SupID='.$urlSupID.'&LN='.$urlLN.'"; // submit query to search engine $url_contents ="http://mysite:password@$urlpar "; $query_file_content = file_get_contents($url_contents, "r") or die("cannot open url"); // save results to a local file // folder 777 permission set $filenameSV = 'SV_'; $filenameLN = $_GET['LN']; $filenameRID = $_GET['RID']; $filetype = '.htm'; $file = fopen('../backoffice/createdfiles/'.$filenameSV.''.$filenameLN.'_'.$filenameRID.''.$filetype.'', 'w+'); fwrite ($file, $query_file_content); fclose($file); ?> Link to comment https://forums.phpfreaks.com/topic/161692-fwrite-file-query_file_content-not-saving-file/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.