When running wSub.php on my localhost in the directory "iwitness", I'm getting the following messages
Warning: mkdir() [function.mkdir]: No such file or directory in C:\WINDOWS\Desktop\xampplite\htdocs\iwitness\wSub.php on line 108
Warning: fwrite(): supplied argument is not a valid stream resource in C:\WINDOWS\Desktop\xampplite\htdocs\iwitness\wSub.php on line 112
wSub error CA7: Iwitness does not yet support screenshots of that type.
when I run the following code
//create file name
$wFileName = '/iwitness/screenshots/Iw '.$DirHour.'/Iw '.$xLoc.'-'.$yLoc.' '.$CharName.' '.$_POST['wTime'].'.php';
//see if screenshot file already exists
if (is_file($wFileName) == TRUE) die ("wSub error FN6: That screenshot has already been recorded.");
else
// check and create directory
// the follwoing is "line 108"
if (is_dir("/iwitness/screenshots/Iw ".$DirHour) == FALSE) mkdir("/iwitness/screenshots/Iw ".$DirHour, 0755);
else
// create file
$wp = fopen($wFileName, "w+");
// the follwoing is "line 112"
$tryRecord = fwrite($wp, $wFile);
if ($tryRecord > -1) {
print("Iwitness report recorded. Your report can be viewed as<br>http://iwitness.urnbandead.info/screenshots".$wFilename);}
elseif ($tryRecord ==-1){
print("Iwitness report entry failed to record. Please try again.");}
else {die("wSub error CA7: Iwitness does not yet support screenshots of that type.");
};
/*this last bit is more test verification to make sure all the previous variables were working OK and that the code actually rant through to this point; they were, and it did */
//echo "<p>Your Iwitness report contained the following information as ",$wFileName,"<p>",$wFile;
I'm guessing my file paths are mixxed up, but maybe there is something else? Help?
Also, is permission 0755 appropriate? I don't expect to ever need to do anything with the files but view them or delete them. I do want the public to be able to browse the directories and open the files, but not to edit them in any way.