I have no problem now creating the file THANKS to several ppl. However, the userid is not allowed to access or associated to the file. I get a bunch of SAFE MODE restrictions but I feel that it's because the file is NOT created via FTP. The commented FTP line below does NOT work.
<?
if ($function == "create") {
$url = "$DOCUMENT_ROOT/photos/test/$page.php";
// $url = "ftp://siteID:sitePASSWORD@ftp.yzquierdo.com/photos/test/$page.php";
print "<P>$url</P>";
$fp = @fopen("$url","w+b");
if ($fp) {
$h = "<? include(\"$DOCUMENT_ROOT/common/shell-left.inc\"); ?>
<? include(\"$DOCUMENT_ROOT/common/shell-right.inc\"); ?>";
fputs($fp,"$h");
fclose ($fp);
$link = explode("$DOCUMENT_ROOT/",$url);
$link = $link[1];
print "The file has been created. Please view the new page <A href=\"/$link\">here</A>.";
}
else {
print "The file was not created. This operation has failed. Please contact the <A href=\"mailto:webmaster@seibertron.com?subject=File Creation Failed\">site administrator</A>.";
}
}
?>
Please feel free to use the following link to see the erros for yourself:
http://www.yzquierdo.com/photos/test/index.php
Here's an example of the code at it's finest and me getting really frustrated with PHP: http://www.yzquierdo.com/photos/test/biteme.php