Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

SQLiteManager et PHP5 sur Free... c'est possible

1 réponse
Avatar
Tanguy
renommez le fichier index.php en index2.php
créez un nouveau index.php avec ce contenu
et hop.... ;o)

contenu du nouveau index.php :

<?php

function fecrit($filename,$texte) {
if (!$f = fopen($filename,'a+')) return 0;
$fs = filesize($filename);
fseek($f,0);
if (!strpos('-'.fread($f,$fs),$texte)) {
fseek($f,$fs);
fwrite($f,"\n".$texte);
}
fclose($f);
return 1;
}

if (strstr($_SERVER['SCRIPT_FILENAME'],'free.fr')) {

//activation PHP5 sur free.fr
if (phpversion() < '5.')
@fecrit('.htaccess','php 1');

//activation des sessions sur free.fr
if (!is_readable(session_save_path())) {
mkdir(session_save_path(),0777);
}
}

$redir = str_replace('index.php','index2.php',$_SERVER['PHP_SELF']);

if ($_SERVER['QUERY_STRING'])
$redir .= '?'.$_SERVER['QUERY_STRING'];

header('Location: '.$redir);

?>

--
Ceci est une signature automatique de MesNews.
Site : http://mesnews.no-ip.com

1 réponse

Avatar
Guillaume Mureu
index.php5 ?