Gnub Posted February 17, 2007 Share Posted February 17, 2007 I've set up a small script, where depending on the results, set by the user, the script will put data in 1 file, and place it in 1 of 2 folders. I've searched here for any similar problems, but alas, none were found. Googl'ing wasn't much help either. I can create the folders...and files, but how do i specify which folder to place the file? Link to comment https://forums.phpfreaks.com/topic/38887-solved-files-folder-clarification-needed/ Share on other sites More sharing options...
o3d Posted February 17, 2007 Share Posted February 17, 2007 Try this "psuedo" coded function: function StoreDataInFile($Type, $Descr) { $Folder = ""; switch($Type) { case 1 : $Folder = "/var/logs1/"; break; case 2 : $Folder = "/var/logs2/"; break; default : $Folder = "/var/logs3/"; break } //write $Descr to file or do whatever... in folder $Folder; } Link to comment https://forums.phpfreaks.com/topic/38887-solved-files-folder-clarification-needed/#findComment-187014 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.