<?php 

$folder = "/home/.sites/3/site227/web"; 

echo "Path to this script: " . __FILE__ . "<br>";

if (!file_exists($folder)) {
	echo "<p><font color='red'>The <b>".$folder."</b> folder does not exist.</font>"; 
	echo "<p>What you must do, is ask your web host to explain why this folder is not able to be 'found' by the PHP software.  It must exist, otherwise this script would not be able to run!";
	exit;
} 
elseif(!is_readable($folder)) { 
	echo "<p><font color='red'>Unable to read the contents of the <b>".$folder."</b> folder.</font>";
	echo "<p>What you must do, is ask your web host to enable enough 'read' permissions for the folder so that SnippetMaster can at least see' the files that are listed inside it. Otherwise, SnippetMaster is not able to display the folder listing of files that you can edit.";
	exit;
} 
elseif(!opendir($folder)) { 
	echo "<p><font color='red'>Unable to open the <b>".$folder."</b> folder for reading.</font>"; 
	echo "<p>What you must do, is ask your web host to enable enough 'read' permissions for the folder so that SnippetMaster can at least see' the files that are listed inside it. Otherwise, SnippetMaster is not able to display the folder listing of files that you can edit.";
	exit;
} 
else { 
	echo "<p><font color='green'>Successfully read and opened the <b>".$folder."</b> folder.</font>"; 
} 

/*
echo "What you must do, is ask your web host to enable enough "read" permissions for the folder so that SnippetMaster can at least "see" the files that are listed inside it. Otherwise, SnippetMaster is not able to display the folder listing of files that you can edit.";
*/
?>