I use the PHP code above to create a local page using Wamp in the www folder and I’d like to redirect to this page but the redirection with header doesn’t work.
I get the message :
The page isn’t redirecting properly.
Firefox has detected that the server is redirecting the request for this address in a way that will never complete. This problem can sometimes be caused by disabling or refusing to accept cookies
Does someone know how to do this ?
my code :
$myFileName_with_no_lower_case = 'website_name'.$job.$ville;
$myFileName = strtolower($myFileName_with_no_lower_case);
$myFileHandle = fopen($myFileName, 'w') or die("can't open file");
$file_content = file_get_contents('./file_with_content_i_want_to_paste.php');
fwrite($myFileHandle,$file_content);
fclose($myFileHandle);
// eveything works fine until now
header("Location:".$myFileName);
Works now :