Jump to content

Recommended Posts

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) [snapback]375888[/snapback][/div][div class=\'quotemain\'][!--quotec--]
If I understand correctly, you're asking about your home directory - check in /home/your_user_name.
[/quote]
Link to comment
https://forums.phpfreaks.com/topic/10147-local-path-on-mac/#findComment-37806
Share on other sites

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!
Link to comment
https://forums.phpfreaks.com/topic/10147-local-path-on-mac/#findComment-37822
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.