prcollin Posted May 30, 2008 Share Posted May 30, 2008 i have this code right now <?php if(isset($_POST['submit'])) { $path = $_SERVER['DOCUMENT_ROOT'] . '/userpages/'; $file_name = $_POST['page_title']; $file_contents = "<b>Email Address:</b> <br> {$_POST['user_email']} <br /> <br /> <b>About Me:</b> <br /> {$_POST['about_you']} <br /> <br /> <hr height=\"5\" width=\"100%\">"; //make sure the file exists and is writable first. if (is_writable($path)) { // In our example we're opening $filename in append mode. // The file pointer is at the bottom of the file hence // that's where $somecontent will go when we fwrite() it. if (!$handle = fopen($path . $file_name . '.html', 'a')) { echo "Cannot open file $file_name"; exit; } // Write $somecontent to our opened file. if (fwrite($handle, $file_contents) === FALSE) { echo "Cannot write to file $file_name"; exit; } echo "Success, created $file_name"; fclose($handle); } else { echo "The file $path is not writable"; } } else { echo 'Form not submitted! $_POST contents:'; echo '<pre>' . print_r($_POST, true) . '</pre>'; } ?> how do i make it so the new file link that is created is not case sensitive??? Link to comment https://forums.phpfreaks.com/topic/108048-making-a-submitted-file-link-not-case-sensitive/ Share on other sites More sharing options...
DarkWater Posted May 30, 2008 Share Posted May 30, 2008 Linux filenames are case-sensitive. Link to comment https://forums.phpfreaks.com/topic/108048-making-a-submitted-file-link-not-case-sensitive/#findComment-553836 Share on other sites More sharing options...
craygo Posted May 30, 2008 Share Posted May 30, 2008 best thing to do is make sure everything is in lowercase. When you save files use strtolower(). Link to comment https://forums.phpfreaks.com/topic/108048-making-a-submitted-file-link-not-case-sensitive/#findComment-553846 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.