config.php
Code: Select all
<?php
<?
$absolute_path = "/hsphere/local/home/twatters/gwatters.com/ta2/Uploads"; //upload path
$size_limit = "no"; //use limit size
$limit_size = "20000000"; //limit size
$limit_ext = "yes"; //limit the file type uploads
$ext_count = "6"; //number of types allowed
$extensions = array(".gif", ".jpg", ".jpeg", ".png", ".txt", ".doc"); //allowed file extensions
?>
?>Code: Select all
<?php
require ("config.php");
$endresult = "<font size="2">File Was Uploaded</font>";
if ($file_name == "") {
$endresult = "<font size="2">No file selected</font>";
}else{
if(file_exists("$absolute_path/$file_name")) {
$endresult = "<font size="2">File Already Existed</font>";
} else {
if (($size_limit == "yes") && ($limit_size < $file_size)) {
$endresult = "<font size="2">File was to big</font>";
} else {
$ext = strrchr($file_name,'.');
if (($limit_ext == "yes") && (!in_array($ext,$extensions))) {
$endresult = "<font size="2">File is wrong type</font>";
}else{
copy($file, "$absolute_path/$file_name");
}
?>Warning: Unable to create '/Uploads/BnetLog.txt': No such file or directory in /hsphere/local/home/twatters/gwatters.com/ta2/upload.php on line 92
Line 92 is:
Code: Select all
<?php
copy($file, "$absolute_path/$file_name");
?>CoW
P.S. The permissions for the folder are set to be able to write to it.