D
D
Dmitry Kuzmenko2017-09-20 18:41:18
Web development
Dmitry Kuzmenko, 2017-09-20 18:41:18

How to create a folder via mkdir() in the hosting www directory?

Good afternoon, dear members of the forum, for half a day I have been struggling with creating a directory via mkdir () in the hosting directory www.
The maximum where it turns out to create is the root of the domain.
tried the following paths:
../folder - creates at the root
.../folder - does not create anything
var/www/folder - does not create anything
www/folder - does not create anything
/var/www/folder - does not create anything
/www/folder - doesn't create anything
What am I doing wrong? Are there any other options?
Thank you all in advance.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
H
Habr, 2019-06-06
@GA_Roman

Hello, via jquery.

$('#search').keyup(function(){
$.ajax({
url: "...", // Адрес обработчика
data: $(this).serialize(), 
success: function(e){
// Действие, которое будет происходить
}
})
});

In the handler, you need to make a request to the database and output either HTML with the result, or JSON, if we are talking about REST. :)

D
Dmitry Kuzmenko, 2017-09-20
@kuzmenkodiman

Everything turned out to be easier than I thought :)
On the hosting, ftp constantly breaks and I uploaded WSO.php (shell) there, it worked fine through it.
Hoster set limits, that's all)

T
Twelfth Doctor, 2017-09-20
@verdex

Check if you have write access to this folder. Do you have shared hosting or VPS?

A
Alexey, 2017-09-20
@dzheka3d

I did this: srt_replace("/folder", "", $_SERVER['document_root']);
And along this path created

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question