hai all when i try create new file using fopen function in php in "W" mode. it dose not create file. Create test.php file in /var/www/html/ directory on linux machine. past this simple code: <?php $fp = fopen("newfile.file", "w") or die("Couldn't create new file"); ?> through firefox browser run above file: ip address/test.php example : 192.168.0.115/test.php it show Couldn't create new file means not create file. please any one tell me step how to run this file using browser on linux. thanks in advance
you have to chmod the folder and the file you want to work on. chmod determines the operations a user can do on a certain file/folder. For instance 0777 means that any user/group/administrator can read,write and execute the file so if you want to get your code working, try adding these lines: chmod ( 'folder_that_contains_my_file', 0777 ); chmod ( 'myfile.file', 0777 ); PHP: or if it's only this file, use an ftp manager to chmod that specific file and folder
hai dear i done this already. but still it is not working. i know about file permission. after adding two line give by u. it is not working and show same error. thanks for your reply