import - importing files in php using require() not working -


i tried following code import 2 files

<?php echo "php";     require('../globalvasr.php') or die("error");     require('../newcosn.php') or die("error2");     $config = new globalconfigs(); ?> 

it not shows error , displays blank page.also unable use variable defined in 2 files. $config->dbname. dont know whats wrong in this. please me find it.

thank you.

require, in contrast include, automatically dies , not have return value. means or die() bad. better:

<?php echo "php";     require('./globalvasr.php');     require('./newcosn.php');     $config = new globalconfigs(); ?> 

Comments

Popular posts from this blog

php - mySql Join with 4 tables -

css - Text drops down with smaller window -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -