Skip to content

Instantly share code, notes, and snippets.

@serhanozcan
Created December 4, 2017 11:17
Show Gist options
  • Save serhanozcan/06dd272046f1ab6a200ba662eaf44830 to your computer and use it in GitHub Desktop.
Save serhanozcan/06dd272046f1ab6a200ba662eaf44830 to your computer and use it in GitHub Desktop.
Php'de Basit Yönlendirme Fonksiyonu
<?php
function go ($url, $time = 0){
if ($time) header("Refresh: {$time}; url={$url}");
else header("Location: {$url}");
}
// Alttaki gibi kullanılır ise 10 saniye sonra yönlendirir.
go("siteadi.com", 10);
// Alttaki gibi kullanılır ise direkt olarak yönlendirir.
go("siteadi.com");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment