php - include $page; NOT working -


hi have included in index.php

include $page; 

but not working on live server working fine on localhost. have included include ('includes/_ini.php'); on top of index.php page in $page defined. please suggest

on server giving following warning

warning: include(?pgid=1&parid=&rid=1&lang=1) [function.include]: failed open stream: no such file or directory in /opt/lampp/htdocs/mysite.com/index.php on line 290  warning: include(?pgid=1&parid=&rid=1&lang=1) [function.include]: failed open stream: no such file or directory in /opt/lampp/htdocs/mysite.com/index.php on line 290  warning: include() [function.include]: failed opening '?pgid=1&parid=&rid=1&lang=1' inclusion (include_path='.:/opt/lampp/lib/php') in /opt/lampp/htdocs/mysite.com/index.php on line 290 

the include() statement includes , evaluates **specified file**.

look @ warning:

warning: include(?pgid=1&parid=&rid=1&lang=1)  

compare (your code)

include $page; 

so =>

   $page = ?pgid=1&parid=&rid=1&lang=1 

**specified file** not format here: ?pgid=1&parid=&rid=1&lang=1 (it url not path of existing file)

for example:

/* example assumes www.example.com configured parse .php * files , not .txt files. also, 'works' here means variables * $foo , $bar available within included file. */  // won't work; file.txt wasn't handled www.example.com php include 'http://www.example.com/file.txt?foo=1&bar=2';  // won't work; looks file named 'file.php?foo=1&bar=2' on // local filesystem. include 'file.php?foo=1&bar=2';  // works. include 'http://www.example.com/file.php?foo=1&bar=2';  $foo = 1; $bar = 2; include 'file.txt';  // works. include 'file.php';  // works. 

more take here: http://php.net/manual/en/function.include.php


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -