E
E
Eugene2015-11-01 10:41:09
PHP
Eugene, 2015-11-01 10:41:09

Php handler not giving file address correctly?

the file upload form is Site/content/topic/add
When a file is sent to the server, the handler throws it into the site/uploads/ folder,
but at the same time it gives the wrong address for the file Site/content/topic/add/uploads/file
and you need Site/uploads /file
handler code at jsfiddle.net/dvzuntaL

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Koryukov, 2015-11-01
@Juodvirshis

Most likely the handler's entry point is in the /content/topic/add folder, and it puts the file in the uploads/ folder . Then those two paths add up to /content/topic/add/uploads/ .
You must specify the path relative to the root of the site, for example like this:
$_SERVER['DOCUMENT_ROOT'].'/uploads/'

A
Andrew, 2015-11-01
@R0dger

Update the handler on the site for version 9.11.2,
see examples on the handler site, maybe you are doing something wrong.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question