file_get_contents doesn't get contents.
AmarioTommaso Apr 21st, 2018 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- $UserName = $_POST["UserName"];
- $UserEmail = $_POST["UserEmail"];
- $UserPassword = $_POST["UserPassword"];
- // Collecting all 3 inputs succesfully.
- $User = $UserName;
- // still don't know why but that's it.
- $UserTempFile = FOpen("TempFile ".$User.".txt", "w");
- // File opens exactly as expected.
- If ($UserName && $UserEmail && $UserPassword)
- // Checks for errors having to do with those Vars.
- FWrite($UserTempFile, $UserName. "\n" .$UserEmail. "\n" .$UserPassword);
- // $UserTempFile gets loaded witht he inputs just fine.
- If ((Is_String($UserName && $UserEmail && $UserPassword)))
- // Yup, they're strings and confirmed so.
- $UserFile = FOpen($User.".txt", "w");
- // File opens but stays empty.
- $UserData = file_get_contents($UserTempFile,true);
- // $UserData stays empty in all cases.
- // Tested with Ifs and checking the file but still empty.
- FWrite($UserFile, $UserData);
- // It has nothing to write on $UserFile cause $UserData stays empty.
RAW Paste Data