Jump to content
php.lv forumi

header un http referer


kapec gan ne

Recommended Posts

ir index.php fails

<?php
require 'header.php';
echo '<a href="http://site.com">link</a>';
?>

un header.php

<?php
header('Location: http://site.com');
exit;
?>

index - http://localhost/

 

1. ja lietotajs atverot lapu tiktu paradresets uz citu lapu no header('Location: http://site.com'); kads bus http_referer (ja bus vispar)

2. kads bus http_referer, ja index fails butu bez ta header.php un lietotajs parietu uz site.com vienkasi pa linku

 

nevaretu ta but ka pirmaja gadijuma referer tiek sutis ka header.php?

Link to comment
Share on other sites

index.php lapā ir:<pre class="prettyprint">require 'header.php';</pre>

headeer.php lapā ir:

<pre class="prettyprint">header('Location: http://site.com');exit;</pre>

Līdz ar to - skripts pārtrauks savu darbību pie exit un nekāda linka vispār nebūs ;)

Link to comment
Share on other sites

index.php lapā ir:<pre class="prettyprint">require 'header.php';</pre>

headeer.php lapā ir:

<pre class="prettyprint">header('Location: http://site.com');exit;</pre>

Līdz ar to - skripts pārtrauks savu darbību pie exit un nekāda linka vispār nebūs ;)

noteikti visu manis rakstito neizlasiji un uzrakstiji kaut ko pilnigi nevajadzigu :D

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...