Jump to content

Php Page Checking.


scheols

Recommended Posts

Alright im editing a IPB forum page <ok

Anyways how would i check to see if im on a page using the if statement.
or how could i check for the file on the IPB index.php page?:heres the index.php part i want to check

[code]
//--------------------------------
// Wrap it all up in a nice easy to
// transport super class
//--------------------------------

[b]$ibforums = new info();[/b]

//--------------------------------
// Require our global functions
//--------------------------------

require ROOT_PATH."sources/functions.php";
require ROOT_PATH."sources/classes/class_display.php";
require ROOT_PATH."sources/classes/class_session.php";
require ROOT_PATH."sources/classes/class_forums.php";
require KERNEL_PATH."class_converge.php";

$std    = new FUNC;
$print  = new display();
$sess   = new session();
$forums = new forum_functions();

//--------------------------------
//  Set up our vars
//--------------------------------

$ibforums->input = $std->parse_incoming();

//--------------------------------
//  Set converge
//--------------------------------
[/code]

Answer either of the questions plz or both thanks. Ive put the bold tags around the Part i want to check for
Link to comment
https://forums.phpfreaks.com/topic/12674-php-page-checking/
Share on other sites

[!--quoteo(post=386976:date=Jun 22 2006, 03:51 PM:name=Eric_Ryk)--][div class=\'quotetop\']QUOTE(Eric_Ryk @ Jun 22 2006, 03:51 PM) [snapback]386976[/snapback][/div][div class=\'quotemain\'][!--quotec--]
[code]if($_GET['page'] == "foobar")
{
   // your code
}[/code]

Just a simple example to show you. Or perhaps if you want a page where there are no URL variables:
[code]if(count($_GET) == 0)[/code]
[/quote]
would this get the page that the code is in? like say i upload a file called thispage.php

woould the $_GET["page"] get thispage.php or would i have to tell the code what page im on?
Link to comment
https://forums.phpfreaks.com/topic/12674-php-page-checking/#findComment-48606
Share on other sites

[!--quoteo(post=386985:date=Jun 22 2006, 05:18 PM:name=scheols)--][div class=\'quotetop\']QUOTE(scheols @ Jun 22 2006, 05:18 PM) [snapback]386985[/snapback][/div][div class=\'quotemain\'][!--quotec--]
if(count($_GET) == 0){

alright what does that do can u plz tell me
[/quote]
If there are no variables in the URL then that express will come out to be true.
Link to comment
https://forums.phpfreaks.com/topic/12674-php-page-checking/#findComment-48614
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.