Call a wordpress page in PHP page [closed]

0

I tried using the following command to go to a wordpress page, but it did not work.

echo '<meta HTTP-EQUIV='Refresh' CONTENT='0;URL=$buscahttp>';
<script>location.href = 'http://www.xxx/¨'.$buscahttp</script>');

header('Location: '.$buscahttp);

Can anyone help me?

    
asked by anonymous 12.07.2016 / 20:25

1 answer

4

Apparently you're mixing PHP with Javascript there.

To do this redirect (correct me if you're wrong) you can do the following:

Using PHP : (remembering that to work must be done before any html output that php can execute)

$redirect = 'http://suaurl.com.br';
header("location:$redirect");

Using Javascript :

<script>
  location.href = 'http://uol.com.br';
</script>
    
12.07.2016 / 20:41