Cross domain web application.
Posted: Thu Aug 24, 2006 11:15 am
I have two domains located on the same server which I am trying to copy files from one to the other through an uploading feature on one domain.
The web application is located here: /usr/home/myuser/myfirstsite.com/htdocs/directory/program.php or http://www.myfirstsite.com/directory/program.php
The other domain is located here: /usr/home/myuser/mysecondsite.com/htdocs/ or http://www.mysecondsite.com
This works fine:
... and will copy the uploaded file to /user/home/myuser/myfirstsite.com/htdocs/directory/images/filename.jpg or http://www.myfirstsite.com/directory/im ... lename.jpg
This does not work (and I would like to know why):
Keep in mind that the value of $_FILES['image_file']['tmp_name'] is /var/tmp/RanDomCHaRs
Thanks for the help!
The web application is located here: /usr/home/myuser/myfirstsite.com/htdocs/directory/program.php or http://www.myfirstsite.com/directory/program.php
The other domain is located here: /usr/home/myuser/mysecondsite.com/htdocs/ or http://www.mysecondsite.com
This works fine:
Code: Select all
copy($_FILES['image_file']['tmp_name'], "images/".$filename);This does not work (and I would like to know why):
Code: Select all
copy($_FILES['image_file']['tmp_name'], "/usr/home/myuser/mysecondsite.com/htdocs/images/".$filename);Thanks for the help!