a simple page with simple code:
<?php
header ("location:recap_taxi.php");
?>
works fine. BUT,
if I add an include to log on a server and DB it fails.
<?php
include("../php/connect.php");
header ("location:recap_taxi.php");
?>
read and tried adding the @ symbol on the include line but no cigar.
The connect content is basic security and db similar to the following (changed server, login and passwd for obvious reasons 🙂
<?php
$server="www.myserver.com";
$login_serveur="mylogin";
$passwd="mykeyin";
$connexion=mysql_connect("$serveur", "$login_serveur", "$passwd");
/
if (!$connexion) {echo "no connexion !";}
else {echo "connected to " .$serveur ."<p />";}
/
// connexion to DB
$database=mysql_select_db("mydb");
/ if (!$database) {echo "no connexion to " .$basedonnees ."<p />";}
else {echo "connected to " .$basedonnees ."<p />";} /
?>
--- all this on PHP Version 4.3.9
--- using sucessfully the include of connect.php file in other scripts
Anyone able to solve this mystery ? 🙂