php inc files. anyhelp with these suckers would be good!

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
goose
-


Joined: 17 Sep 2002
Posts: 608
Location: The Land Of OZ! come here toto!

PostPosted: Mon Jan 12, 2004 8:09 pm    Post subject: php inc files. anyhelp with these suckers would be good! Reply with quote

anyone know much about .inc files when it comes to php?

and what are offsets?


8O
_________________
living in an armish paradise.....no gates here!

mawuahahaha :)
Back to top View user's profile Send private message
andyshen
-


Joined: 08 Dec 2003
Posts: 36

PostPosted: Wed Jan 14, 2004 6:10 am    Post subject: Re: php inc files. anyhelp with these suckers would be good! Reply with quote

goose wrote:
anyone know much about .inc files when it comes to php?

and what are offsets?


8O


visit http://phpbb.com
Back to top View user's profile Send private message
goose
-


Joined: 17 Sep 2002
Posts: 608
Location: The Land Of OZ! come here toto!

PostPosted: Wed Jan 14, 2004 2:27 pm    Post subject: Reply with quote

what does phpbb forum got to do with inc files ?

i wish to know how to get the guppy forum working coz this forum uses them.

i get offset errors when i run the guppy script. and some variables are not declared.

im so close to having it running , yet so far!

:roll:
_________________
living in an armish paradise.....no gates here!

mawuahahaha :)
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Wed Jan 14, 2004 3:29 pm    Post subject: Re: php inc files. anyhelp with these suckers would be good! Reply with quote

goose,

.inc files are regular PHP files that are meant to be included using

Code:
<?php include("myfile.inc"); ?>


Using the .inc extension is only a convention. You can use any other extension for included files.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
goose
-


Joined: 17 Sep 2002
Posts: 608
Location: The Land Of OZ! come here toto!

PostPosted: Wed Jan 14, 2004 6:13 pm    Post subject: Reply with quote

aprelium,

then why cant i get the guppy portal system (that doesnt need mysql to run :) ) working when i comes to these files im getting offset errors when running guppy with abyss.?

and some variables are undefined aswell.

the guppy authors are not helping much.

i have solved some issues but not all?

scripts should work if the author has done there homework! :roll: not the user.
_________________
living in an armish paradise.....no gates here!

mawuahahaha :)
Back to top View user's profile Send private message
goose
-


Joined: 17 Sep 2002
Posts: 608
Location: The Land Of OZ! come here toto!

PostPosted: Wed Jan 14, 2004 6:16 pm    Post subject: Reply with quote

i also read in me php book that these files can be renamed to the extension .php which should improve things but no such luck. :roll:
_________________
living in an armish paradise.....no gates here!

mawuahahaha :)
Back to top View user's profile Send private message
Systemsoft
-


Joined: 06 Jun 2003
Posts: 59
Location: Krakow, Poland

PostPosted: Thu Jan 15, 2004 4:01 pm    Post subject: Reply with quote

These files often store configuration.
Back to top View user's profile Send private message Send e-mail
goose
-


Joined: 17 Sep 2002
Posts: 608
Location: The Land Of OZ! come here toto!

PostPosted: Thu Jan 15, 2004 5:15 pm    Post subject: Reply with quote

hmmm any more thoughts?
_________________
living in an armish paradise.....no gates here!

mawuahahaha :)
Back to top View user's profile Send private message
jtc970
-


Joined: 24 Mar 2003
Posts: 172

PostPosted: Thu Jan 15, 2004 8:59 pm    Post subject: Reply with quote

if I have in my inc file 'includeme.cfg'
Code:
<?
$foo="stufftoknow";
?>

then in another script i have
Code:
$foo="";
include_once("includeme.cfg");
//now $foo is now  "stufftoknow"
Back to top View user's profile Send private message
goose
-


Joined: 17 Sep 2002
Posts: 608
Location: The Land Of OZ! come here toto!

PostPosted: Fri Jan 16, 2004 5:49 am    Post subject: Reply with quote

hmmm do you know about offsets too?
_________________
living in an armish paradise.....no gates here!

mawuahahaha :)
Back to top View user's profile Send private message
jtc970
-


Joined: 24 Mar 2003
Posts: 172

PostPosted: Fri Jan 16, 2004 6:24 am    Post subject: Reply with quote

not yet, im still trying to pick it all up
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Fri Jan 16, 2004 4:20 pm    Post subject: Reply with quote

goose,

Can you please describe in detail all the problem (the portal, the error messages, etc..). Without these information, it would be difficult to help you.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
goose
-


Joined: 17 Sep 2002
Posts: 608
Location: The Land Of OZ! come here toto!

PostPosted: Mon Jan 19, 2004 2:48 pm    Post subject: Reply with quote

one example of an error is as follows:

undefined offset 7 in the following file log.inc

another is:

undefined variable fields : in fuction.php

etc.....

:?:
_________________
living in an armish paradise.....no gates here!

mawuahahaha :)
Back to top View user's profile Send private message
jtc970
-


Joined: 24 Mar 2003
Posts: 172

PostPosted: Mon Jan 19, 2004 5:29 pm    Post subject: Reply with quote

after some research

undefined offset means that an array you're attempting to use is trying to access an undefined offset. the offset is the number between the brackets of a variable
$foo[0]="test";
0 being the offset
so if I had in my code

$foo[0]="test";
print $foo[1];

i would get an undefined offset error

hope that helps...
Back to top View user's profile Send private message
goose
-


Joined: 17 Sep 2002
Posts: 608
Location: The Land Of OZ! come here toto!

PostPosted: Mon Jan 19, 2004 6:06 pm    Post subject: Reply with quote

so your saying that the offset has not been defined if the number 0 has not been declared?

so how can one define a number ?

my knowledge on this is simple

define goose = 0;

0 is placed into goose then goose can be used like so:

$foo[goose];

print $foo

this should give 0 :)

hmmm you would get the error coz you moved up the array and 1 has not been declared right? :?: :wink:
_________________
living in an armish paradise.....no gates here!

mawuahahaha :)
Back to top View user's profile Send private message
jtc970
-


Joined: 24 Mar 2003
Posts: 172

PostPosted: Mon Jan 19, 2004 6:39 pm    Post subject: Reply with quote

if I had
<?
$foo[0]="apple";
$foo[1]="pear";
$foo[2]="banana";

print $foo[0];
print $foo[1];
print $foo[2];
print $foo[3];
?>

then it would give me an offset error because $foo[3] isnt set
Back to top View user's profile Send private message
goose
-


Joined: 17 Sep 2002
Posts: 608
Location: The Land Of OZ! come here toto!

PostPosted: Tue Jan 20, 2004 12:45 am    Post subject: Reply with quote

correct!

hmmm bad management i guess :lol:
_________________
living in an armish paradise.....no gates here!

mawuahahaha :)
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Tue Jan 20, 2004 2:34 pm    Post subject: Reply with quote

Why not using

Code:
if (isset($foo[3]))
{
  print $foo[3];
}

_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
goose
-


Joined: 17 Sep 2002
Posts: 608
Location: The Land Of OZ! come here toto!

PostPosted: Tue Jan 27, 2004 5:16 am    Post subject: Reply with quote

yes it can be done that way too aprelium.
_________________
living in an armish paradise.....no gates here!

mawuahahaha :)
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group