sridaran Posted January 24, 2011 Share Posted January 24, 2011 I need to create a new directory and also subdirectories inside that directory in the specific location. I am using the following code, where $msg is displaying perfectly on both if & else condition and $workgrp is the name we are giving in input text box. But no directory created on the specified location. I am using PHP 5.1.6 version in Redhat Linux 5 version. Do I need to make any changes on the php conf file to make mkdir() function to work? $imt_dbpath = "/home/workarea/mailer/development/imtdbpath/"; if(file_exists($imt_dbpath.$workgrp)){ $msg = "Work Group Already Exists"; }else{ umask(0); mkdir($imt_dbpath.$workgrp,0777); $file = fopen($imt_dbpath.$workgrp."/users",'w+'); fclose($file); mkdir($imt_dbpath.$workgrp."/campaigns",0777); mkdir($imt_dbpath.$workgrp."/ftpbox",0777); mkdir($imt_dbpath.$workgrp."/uploadbox",0777); $msg = "Work Group Created Successfully"; }R.Sridaran Link to comment Share on other sites More sharing options...
Synook Posted January 24, 2011 Share Posted January 24, 2011 Do you get any errors? Does PHP have permissions to modify the directory parent to the folders you want to create? Link to comment Share on other sites More sharing options...
sridaran Posted January 24, 2011 Author Share Posted January 24, 2011 I am not getting any errors. If I give new name, it is displaying message "workgroup created successfully". But no folders(workgroup) on the specified location. If I give the existing name, it is displaying message "workgroup already exists".Path Folder PermissionFolder Access : Create and Delete FIlesActually this directory should be created on the Sqlite database path "/home/workarea/mailer/development/imtdbpath/"(PHP & Sqlite are Connected). Also if we create any directory in the db path manually, it is displaying in the front-end php as dropdown list.R.Sridaran Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.