Jump to content

fwrite ($file, $query_file_content); not saving file


dflow

Recommended Posts

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);


?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.