I have problem handling the php filing system and want to ask certain question
[size=10pt]Question 1.[/size]
Is it Possible to Upload a File to a folder on a level above than the php file
For EG:-
The location of upload.php is root/function/file/upload.php
and syntax be
[php]
if (file_exists(“root/” . $_FILES[“file”][“name”]))
{
echo $_FILES[“file”][“name”] . " already exists. ";
}
else
{
move_uploaded_file($_FILES[“file”][“tmp_name”], “root/” . $_FILES[“file”][“name”]);
echo "Stored in: " . “root/” . $_FILES[“file”][“name”];
}
[/php]
But the problem is i am unable to upload a file to folder which is at a higher level than the directory of upload.php file
I want to Upload a file to root
[size=10pt]Question 2.[/size]
Is It Possible to Download a file from a folder which is at a higher level
Here is the Example
I want to Download root/file/iwant.php
and to do that i want to execute the file down.php (location root/function/file/down.php)
the syntax i was able to use was
[php]
[/php]
but this wont work because of the location problem i think
i apologize if i am not able to make myself clear , if u want i can try to explain a little better.
Please Let me Know Asap
Regards