Jump to content

[SOLVED] Sub-domain upload file to TLD


Mr.Shawn

Recommended Posts

I guess it depends on how your site is set up. But I would imagine that you could use the absolute server path to denote where you want files to live.

 

if you echo $_SERVER['DOCUMENT_ROOT'] you will get the path like

 

/server/homepages/d150919797/htdocs/name_of_web_root

 

you just need to determine where each site lives and use the proper path.

 

Nate

Link to comment
Share on other sites

No, $_SERVER['DOCUMENT_ROOT'] will give you the root of where the site lives. I gave that as a way to get the path that you want.

 

If you wish to upload the files in /home/myaccount/files, then just point the move_uploaded_files destination to that. I believe that will work. If that does not work, then you can do FTP through PHP. I have done this before when uploading files between TLD and Sub-Domain.

 

Hope this helps a bit.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.