Results 1 to 3 of 3

Thread: fileowner numerical?

  1. #1
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default fileowner numerical?

    <?php
    $file_own = fileowner("images/loading.gif");
    echo $file_own;
    ?>

    Why does this return 850? What is 850? I'm testing code on an apache and switching it over to windows IIS after. I read somewhere that chmod doesn't work for windows so I thought i could use chown to change the user. Will the owner be a text representation on windows? Thanks.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    http://www.php.net/manual/en/function.fileowner.php

    Return Values

    Returns the user ID of the owner of the file, or FALSE in case of an error. The user ID is returned in numerical format, use posix_getpwuid() to resolve it to a username.
    I've never used this, though, so that's just what php.net says happens.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. The Following User Says Thank You to djr33 For This Useful Post:

    bluewalrus (11-19-2009)

  4. #3
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Thanks, thats what I need to do and it returned the actual ftp user name.

    PHP Code:
    <?php 
    $file_location 
    "images/loading.gif";
    $file_own fileowner($file_location);
    $it_is posix_getpwuid($file_own);
    echo 
    $it_is[name];
    ?>
    Now to fiddle around with changing the owner.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •