Jump to content


Photo

Help Needed!


  • Please log in to reply
5 replies to this topic

#1 Crypt

Crypt
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 26 March 2006 - 12:36 AM

I am trying to set up this MySpace Train Script but i get this error:


Warning: main(pages/.php): failed to open stream: No such file or directory in /home/content/j/o/i/joinmy/html/pages.php on line 11

Warning: main(): Failed opening 'pages/.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/content/j/o/i/joinmy/html/pages.php on line 11

Here is pages.php:

<?php
Include "config.php";

mysql_connect ($strDBServer, $strDBUser, $strDBPass) or die ('Unable to connect to MySQL: ' . mysql_error());
mysql_select_db ($strDBName) or die ('Unable to select database: ' . mysql_error());

include "includes/precalls.php";

include "theme/header.php";

include "pages/" . $page . ".php";

include "theme/footer.php";


?>


#2 azuka

azuka
  • Members
  • PipPipPip
  • Advanced Member
  • 55 posts
  • LocationNigeria

Posted 26 March 2006 - 01:14 AM

It's simple - for some reason $page was not set. Did you mean page.php? Because $page is empty it tries to include a file called ".php" which it can't find.

Given enough eyeballs all bugs are shallow. My Website

#3 Crypt

Crypt
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 26 March 2006 - 01:33 AM

Ok well you can view the script here:
http://joinmytrain.com/pages.php?=home

There are also several other pages in /pages/ folder on my FTP


#4 azuka

azuka
  • Members
  • PipPipPip
  • Advanced Member
  • 55 posts
  • LocationNigeria

Posted 26 March 2006 - 01:47 AM

I think what you wanted to do is pages.php?page=home. Beware of REGISTER_GLOBALS - better call $_REQUEST['page'];

Given enough eyeballs all bugs are shallow. My Website

#5 Crypt

Crypt
  • Members
  • PipPip
  • Member
  • 13 posts

Posted 26 March 2006 - 01:54 AM

I tried $page = $_REQUEST['page']; and I think that did the trick. THANK YOU SO MUCH! [img src=\"http://www.phpfreaks.com/forums/style_images/1/folder_post_icons/icon4.gif\" border=\"0\" alt=\"IPB Image\" /]

#6 azuka

azuka
  • Members
  • PipPipPip
  • Advanced Member
  • 55 posts
  • LocationNigeria

Posted 26 March 2006 - 02:46 AM

[!--quoteo(post=358437:date=Mar 25 2006, 08:54 PM:name=Krypt)--][div class=\'quotetop\']QUOTE(Krypt @ Mar 25 2006, 08:54 PM) View Post[/div][div class=\'quotemain\'][!--quotec--] I tried $page = $_REQUEST['page']; and I think that did the trick. THANK YOU SO MUCH! [img src=\"http://www.phpfreaks.com/forums/style_images/1/folder_post_icons/icon4.gif\" border=\"0\" alt=\"IPB Image\" /] [/quote]

I checked your site. Glad it's working!

Given enough eyeballs all bugs are shallow. My Website




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users