I have two domains. On the first one there is a file upload form which I want to add to the second domain. The point is that I must keep one FTP folder (which is on the first domain).
It looks like that:
SERVER/domains/example.pl/FTP (I want my files to upload here)
SERVER/domains/site2.pl/ (somewhere here will be second php upload form)
Unfortunately, second site is on prestashop and I don't know where exactly script file will be kept (cms created content is in held in database).
Is there a way to create a direct patch to my upload folder, for example now in script I have:
$path = $_SERVER['DOCUMENT_ROOT'] . "/FTP/" . $d . "/"
and change it to:
$path = 'www.domain.pl/FTP/'
I was also thinkg about creating an iframe to the first form inside prestashop article and this way avoid the problem. But will it be functional?
In both domain first print current directory using getcwd() function. Suppose you get var/www/domain1/ in first domain and var/www/domain2 in your second domain and suppose your upload folder be var/www/domain1/uploads then in this case you could use ../domain1/uploads in your second domain to upload those files in your first domain.