skroks609 Posted August 8, 2006 Share Posted August 8, 2006 Ok so i now know the basics of writing text to a txt file. But i've been told that it wont work unless i chmod the file, and i have no idea how you do that. Please answer!Thanx, SkRoks609. Quote Link to comment https://forums.phpfreaks.com/topic/16874-what-is-chmod/ Share on other sites More sharing options...
brown2005 Posted August 8, 2006 Share Posted August 8, 2006 well im not sure but i think it is when u go into the ftp and right click on the file in question it comes up with some options that u must select or deselect depending on wat u want to do Quote Link to comment https://forums.phpfreaks.com/topic/16874-what-is-chmod/#findComment-71020 Share on other sites More sharing options...
xyn Posted August 8, 2006 Share Posted August 8, 2006 CHMOD is permission settings, usually setting it to 0777 or 777.Edit: this is usually to write a new file.i think this works:[code=php:0]<?PHP$filename = "page.php";if(is_writable($filename)){die('Sorry $filename is not writable.');}else{die('$filename is writable');}[/code] Quote Link to comment https://forums.phpfreaks.com/topic/16874-what-is-chmod/#findComment-71021 Share on other sites More sharing options...
skroks609 Posted August 8, 2006 Author Share Posted August 8, 2006 thanx but i dont use ftp... Quote Link to comment https://forums.phpfreaks.com/topic/16874-what-is-chmod/#findComment-71023 Share on other sites More sharing options...
xyn Posted August 8, 2006 Share Posted August 8, 2006 what do you use? Quote Link to comment https://forums.phpfreaks.com/topic/16874-what-is-chmod/#findComment-71025 Share on other sites More sharing options...
brown2005 Posted August 8, 2006 Share Posted August 8, 2006 yeah wat do u use? Quote Link to comment https://forums.phpfreaks.com/topic/16874-what-is-chmod/#findComment-71026 Share on other sites More sharing options...
skroks609 Posted August 8, 2006 Author Share Posted August 8, 2006 i use freewebs browser upload..... Quote Link to comment https://forums.phpfreaks.com/topic/16874-what-is-chmod/#findComment-71028 Share on other sites More sharing options...
skroks609 Posted August 8, 2006 Author Share Posted August 8, 2006 o.O i only started php last week so i dont understand simple questions.... Quote Link to comment https://forums.phpfreaks.com/topic/16874-what-is-chmod/#findComment-71032 Share on other sites More sharing options...
xyn Posted August 8, 2006 Share Posted August 8, 2006 :/ i didn't think freewebs allowed php. Quote Link to comment https://forums.phpfreaks.com/topic/16874-what-is-chmod/#findComment-71035 Share on other sites More sharing options...
xyn Posted August 8, 2006 Share Posted August 8, 2006 well anyway CHMOD is the Permission Settings of a file or directory. Quote Link to comment https://forums.phpfreaks.com/topic/16874-what-is-chmod/#findComment-71038 Share on other sites More sharing options...
skroks609 Posted August 8, 2006 Author Share Posted August 8, 2006 oops sorry i meant ripway.com browser upload :-[ Quote Link to comment https://forums.phpfreaks.com/topic/16874-what-is-chmod/#findComment-71041 Share on other sites More sharing options...
wildteen88 Posted August 8, 2006 Share Posted August 8, 2006 First what is the servers OS your site is hosted off of, you can check this by creating a file called info.php and put this init:[code=php:0]<?phpphpinfo();?>[/code]Now upload it to your site and run info.php. When you run that it generates a page full of info about php and your server. Look for the System row, it should be the first line. To the right of the System row text it should state the server OS. IF it states windows you dont have to worry about CHMOD permissions, as windows doesnt have CHMOD permissions. However if its *unix then you may need to chmod the text file.To CHMOD the file you'll want to use FTP. You can use FTP with ripway by reading [url=http://ripway.com/help/kbase.asp?category_id=1&article_id=15]this FAQ[/url]. Once you have your FTP client logged in you need to navigate to your txt file then right click it and select Properties and there should be a CHMOD/File Permissions somewhere. Just tick all 9 boxes and click OK. You have just changed the permission of your file!Additionally you can chnage file permissions with PHP with the chmod function. Just do this:[code=php:0]chmod('filename.txt', 0777);[/code]That will attempt to change the permissions of the file/folder specified. Quote Link to comment https://forums.phpfreaks.com/topic/16874-what-is-chmod/#findComment-71108 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.