Jump to content


Photo

Local path on Mac


  • Please log in to reply
4 replies to this topic

#1 Corinne

Corinne
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 21 May 2006 - 11:06 PM

Hi,

I'm trying to locate my local path for file uploading. I use php and MySql on a Mac, running MacOS 10.3, and using this machine as my staging server.

How can I find my local path? Can it be a permission problem? I have tried User/me/and so on and it does not work.

Thanks in advance,

Corinne

#2 neylitalo

neylitalo
  • Staff Alumni
  • Advanced Member
  • 1,854 posts
  • LocationMichigan, USA

Posted 21 May 2006 - 11:14 PM

If I understand correctly, you're asking about your home directory - check in /home/your_user_name.
http://nealylitalo.net - My personal website, and home of The Netizen's Journal.

#3 Corinne

Corinne
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 21 May 2006 - 11:22 PM

Yes, I have written /home/myusername/Sites/mysitename/images/ and I also tried /Users/myusername etc and the file that is in tmp-dir. won't move to that. Either the path is wrong or permission is wrong. What kind of permissions may there be?

Thanks!



[!--quoteo(post=375888:date=May 22 2006, 01:14 AM:name=neylitalo)--][div class=\'quotetop\']QUOTE(neylitalo @ May 22 2006, 01:14 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
If I understand correctly, you're asking about your home directory - check in /home/your_user_name.
[/quote]


#4 neylitalo

neylitalo
  • Staff Alumni
  • Advanced Member
  • 1,854 posts
  • LocationMichigan, USA

Posted 21 May 2006 - 11:29 PM

OK, can you give a few more details on what you're trying to do?

http://nealylitalo.net - My personal website, and home of The Netizen's Journal.

#5 Corinne

Corinne
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 21 May 2006 - 11:58 PM

I want to upload a file in the image-folder:

$nameoffile=basename($_FILES['imagefile']['name']);
$file_dir="/Users/myname/Sites/mysite/images/";
if size and type is OK (which it is) then:

move_uploaded_file($_FILES['imagefile']['tmp_name'], $file_dir.$nameoffile) or die ("filen laddas inte".$file_dir.$nameoffile);

I hope I copied the code correctly now, but when it dies I can see that the directory seems correct, and I have no idea why it all dies...

Now I need some sleep, but I'll check your answer tomorrow of course! Thank you very much!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users