Please bear with me (I'm just learning how to use php). I can't figure out if my tidy
error is related to an incorrect wget
command or in itself. I thought my wget command was grabbing the remote file and placing it into my $link directory on my server...but something seems to be amiss.
I tried
- changing the $tidy_cmd to single quotes
- concatenating the line to
"..." . $htmlDir . "/*";
- not including the "/*"
- using the php tidy commands (commented out...failed).
Error:
Error: Can't open "app/HtmlPages/arl.server.com-2015_11_19_15:36:09/arl.server.com/index.php/art"
wget.php:
$ip = $argv[1];
// Get the current time for the filename
$currentTime = date( 'Y_m_d_H:i:s' );
$link = "app/HtmlPages/$ip" ."-". "$currentTime";
$htmlDir = "$link/$ip/index.php/art";
// Use wget to download aaron.htm webpage
$wget_cmd = "wget -P $link/ http://$ip/index.php/art/aaron.htm";
exec ( $wget_cmd );
// Clean up the HTML for every page.
$tidy_cmd = "tidy -config tidy_config.txt -i -m $htmlDir/*";
exec ( $tidy_cmd );
//$tidy_config = file_get_contents( 'tidy_config.txt' );
//$tidy = new tidy();
//$tidy->parseFile( '$htmlDir/*.htm', $tidy_config );
...