Hi,
I'm using PHP 5. I'm wondering if there is a way to optimize the
below. Specifically, I'm making a call in the background to wget, but
I'm retrieving a page from my own server ...
function saveFile($p_use r_id, $p_file_path) {
$id = getId($p_file_p ath);
exec("wget -b ".
str_replace($_S ERVER['DOCUMENT_ROOT'], "http://" .
$_SERVER['SERVER_NAME'], dirname(__FILE_ _) . "/filemanager/
process_file.ph p?file_id=$id") );
return $id;
} // saveFile
This seems wasteful. Is there a way to execute the equivalent of this
call without going out on the web?
Thanks, - Dave
I'm using PHP 5. I'm wondering if there is a way to optimize the
below. Specifically, I'm making a call in the background to wget, but
I'm retrieving a page from my own server ...
function saveFile($p_use r_id, $p_file_path) {
$id = getId($p_file_p ath);
exec("wget -b ".
str_replace($_S ERVER['DOCUMENT_ROOT'], "http://" .
$_SERVER['SERVER_NAME'], dirname(__FILE_ _) . "/filemanager/
process_file.ph p?file_id=$id") );
return $id;
} // saveFile
This seems wasteful. Is there a way to execute the equivalent of this
call without going out on the web?
Thanks, - Dave
Comment