Process() to selective folder

See all posts Reply

Process() to selective folder new!
by KonstRuctor, 15 years, 9 months ago
Hi!
It is necessary to upload pictures into a certain folder.
The folder name comes from the filled HTML form:
$folder = $_POST["folder"];
......
$handle->process('../images/".  $folder  ."/');
....
and I have an error.
How I should specify the path correctly?
Thanks!Reply
Re: Process() to selective folder new!
by colin, 15 years, 9 months ago
Can you copy here the error that you have as well as the log from the class?

Note that it is very dangerous to get the folder from the HTML form. A malicious attacker could use this to overwrite important files on the server, or get unautorized privileges.Reply
Re: Process() to selective folder new!
by KonstRuctor, 15 years, 9 months ago
Hi, Colin!
I understand danger of such loading, but in this case I develop the panel of the administator which will not harm to itself :-)

I have read your answer and have understood, that it is necessary to search for an error in my code!

The error was in double inverted commas, it is necessary to use unary inverted commas:
$handle->process('../images/'.  $folder  .'/');

Thanks a lot! Good LuckReply