kkrishieee143 Posted September 17, 2010 Share Posted September 17, 2010 HI Friends, Goal: My website has forms and when the user fills and submits the form with the data.Then the data collected from the forms are getting saved in a new file "data.html". This file is created dynamically on fly and then we are creating a pdf file (html - > pdf) and this pdf generated will be attached to an email which will be sent to administrator or owner of the website. Problem: We are able to create the "data.html" and for generating the pdf file we need to retrieve the data from the "data.html". For this "data.html" need the 777 permissions. For assigning the permissions, we are using chmod function. Problem is that the chmod function is not working. Is there any other alternative to tackle this issue. (Note: Chmod function is working in shared hosted server but not working in dedicated hosted servers. Tried in many servers.) Thanks, Saikrishna. Quote Link to comment Share on other sites More sharing options...
chintansshah Posted September 20, 2010 Share Posted September 20, 2010 Hey kkrishieee143, Can you please change group also of that particular file. Because if you have 777 but group has no permission then it's not generate or change the data. Quote Link to comment Share on other sites More sharing options...
The Letter E Posted December 5, 2010 Share Posted December 5, 2010 you can use php to send a chmod over SSH. ex: <?php $chmod = shell_exec('chmod 755 public_html/folder/file.html'); //if it works if($chmod){ //Do something... } //if it doesn't work else{ //Do something else... } ?> Quote Link to comment 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.