Re: [PHP] How to use PHP to view the file permision???
On Tuesday 09 December 2003 02:19, Scott Fletcher wrote: Looked up on the manual about the chmod() function for PHP, nice but it wouldn't work if the ownership file permission is set, so that bring up a question. How do I view the file permission or folder permission to see if it have the neccessnary permission before proceeding. That way, I can halt the script if there is no write permission or something. manual Filesystem functions is_*(), lstat() -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* QOTD: Sure, I turned down a drink once. Didn't understand the question. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to use PHP to view the file permision???
Looked up on the manual about the chmod() function for PHP, nice but it wouldn't work if the ownership file permission is set, so that bring up a question. How do I view the file permission or folder permission to see if it have the neccessnary permission before proceeding. That way, I can halt the script if there is no write permission or something. Maybe this help: http://br.php.net/manual/en/function.fileperms.php http://br.php.net/manual/en/ref.filesystem.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to use PHP to view the file permision???
Um, not sure what this meant with the fileperms() function. I have file permission as -rw-r--r-- or 644 and when using hte fileperms() funciton, it spitted a result as 33188. If you know what it is then I'm all ear! Don't know what the hell is 33188 stand for, so will stick to easier functions, is_writeable() and is_readable(). Thank for the response! Scott F. Marcos Thiago Merschamnn Fabis [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Looked up on the manual about the chmod() function for PHP, nice but it wouldn't work if the ownership file permission is set, so that bring up a question. How do I view the file permission or folder permission to see if it have the neccessnary permission before proceeding. That way, I can halt the script if there is no write permission or something. Maybe this help: http://br.php.net/manual/en/function.fileperms.php http://br.php.net/manual/en/ref.filesystem.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] How to use PHP to view the file permision???
Um, not sure what this meant with the fileperms() function. I have file permission as -rw-r--r-- or 644 and when using hte fileperms() funciton, it spitted a result as 33188. If you know what it is then I'm all ear! 33188 (base 10) == 0x100644 (base 8). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to use PHP to view the file permision???
What's the function for converting it to base 8 ??? Thanks Roger B.A. Klorese [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Um, not sure what this meant with the fileperms() function. I have file permission as -rw-r--r-- or 644 and when using hte fileperms() funciton, it spitted a result as 33188. If you know what it is then I'm all ear! 33188 (base 10) == 0x100644 (base 8). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to use PHP to view the file permision???
Alright found it. it is base_convert, just use ... --snip-- echo base_convert($filename,8,10); --snip-- Cheer! Scott Fletcher [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] What's the function for converting it to base 8 ??? Thanks Roger B.A. Klorese [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Um, not sure what this meant with the fileperms() function. I have file permission as -rw-r--r-- or 644 and when using hte fileperms() funciton, it spitted a result as 33188. If you know what it is then I'm all ear! 33188 (base 10) == 0x100644 (base 8). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php