Problem with includes


This problem is the most strange thing that i seen in the last times.
this code works

function conecta () {
	$host = "localhost";
	$senha = "vertrigo";
	$login = "xxx";
	$database = "emprego";
	$conexao = mysql_connect($host,$login,$senha) or die(mysql_error());
	mysql_select_db($database,$conexao)or die;

conecta ();


but this doesn’t work

conecta ();


I never seen something like that. Any ideia? the paths are correct, the bd is correct and the query works when i put the function conecta() directly in the php file.


Require should throw an error if the file doesn’t get included properly, hence the term “require”. However just to humor me, after the require line throw in a get_included_files and print_r it to make sure that the file is being included.

i get this: C:\Users\fel\VertrigoServ\www\login\includes\f_banco.php

so the file is included. Any ideia? the absolute path doesn’t resolve anything. The only way is just copy the function and paste inside the file