Giving back a bit PHP redirect

by hometutor 0 replies
I couldn't use header since it had already tranfered

I tried a javascript redirect but got an undefined page

I used this

file_put_contents('logs.txt', "<script>window.location =' .$rsslink.'.php</script>".PHP_EOL , FILE_APPEND | LOCK_EX);

to find the problem

The . was appearing in the actual redirect. So I made the whole thing a variable

Code:
$redirect="<script>window.location ='";


$redirect.=$rsslink.'.php';

$redirect.="'</script>";

echo $redirect;
It worked! It redirected to my generated page. I'm sure someone has a smoother solution, but I just wanted to give back a bit.

Rick
#programming #back #bit #giving #php #redirect
Avatar of Unregistered

Trending Topics