View previous topic :: View next topic |
Author |
Message |
goose -
Joined: 17 Sep 2002 Posts: 608 Location: The Land Of OZ! come here toto!
|
Posted: Mon Jan 12, 2004 8:09 pm Post subject: php inc files. anyhelp with these suckers would be good! |
|
|
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 |
|
 |
andyshen -
Joined: 08 Dec 2003 Posts: 36
|
Posted: Wed Jan 14, 2004 6:10 am Post subject: Re: php inc files. anyhelp with these suckers would be good! |
|
|
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 |
|
 |
goose -
Joined: 17 Sep 2002 Posts: 608 Location: The Land Of OZ! come here toto!
|
Posted: Wed Jan 14, 2004 2:27 pm Post subject: |
|
|
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 |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Wed Jan 14, 2004 3:29 pm Post subject: Re: php inc files. anyhelp with these suckers would be good! |
|
|
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 |
|
 |
goose -
Joined: 17 Sep 2002 Posts: 608 Location: The Land Of OZ! come here toto!
|
Posted: Wed Jan 14, 2004 6:13 pm Post subject: |
|
|
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 |
|
 |
goose -
Joined: 17 Sep 2002 Posts: 608 Location: The Land Of OZ! come here toto!
|
Posted: Wed Jan 14, 2004 6:16 pm Post subject: |
|
|
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 |
|
 |
Systemsoft -
Joined: 06 Jun 2003 Posts: 59 Location: Krakow, Poland
|
Posted: Thu Jan 15, 2004 4:01 pm Post subject: |
|
|
These files often store configuration. |
|
Back to top |
|
 |
goose -
Joined: 17 Sep 2002 Posts: 608 Location: The Land Of OZ! come here toto!
|
Posted: Thu Jan 15, 2004 5:15 pm Post subject: |
|
|
hmmm any more thoughts? _________________ living in an armish paradise.....no gates here!
mawuahahaha :) |
|
Back to top |
|
 |
jtc970 -
Joined: 24 Mar 2003 Posts: 172
|
Posted: Thu Jan 15, 2004 8:59 pm Post subject: |
|
|
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 |
|
 |
goose -
Joined: 17 Sep 2002 Posts: 608 Location: The Land Of OZ! come here toto!
|
Posted: Fri Jan 16, 2004 5:49 am Post subject: |
|
|
hmmm do you know about offsets too? _________________ living in an armish paradise.....no gates here!
mawuahahaha :) |
|
Back to top |
|
 |
jtc970 -
Joined: 24 Mar 2003 Posts: 172
|
Posted: Fri Jan 16, 2004 6:24 am Post subject: |
|
|
not yet, im still trying to pick it all up |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Fri Jan 16, 2004 4:20 pm Post subject: |
|
|
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 |
|
 |
goose -
Joined: 17 Sep 2002 Posts: 608 Location: The Land Of OZ! come here toto!
|
Posted: Mon Jan 19, 2004 2:48 pm Post subject: |
|
|
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 |
|
 |
jtc970 -
Joined: 24 Mar 2003 Posts: 172
|
Posted: Mon Jan 19, 2004 5:29 pm Post subject: |
|
|
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 |
|
 |
goose -
Joined: 17 Sep 2002 Posts: 608 Location: The Land Of OZ! come here toto!
|
Posted: Mon Jan 19, 2004 6:06 pm Post subject: |
|
|
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 |
|
 |
jtc970 -
Joined: 24 Mar 2003 Posts: 172
|
Posted: Mon Jan 19, 2004 6:39 pm Post subject: |
|
|
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 |
|
 |
goose -
Joined: 17 Sep 2002 Posts: 608 Location: The Land Of OZ! come here toto!
|
Posted: Tue Jan 20, 2004 12:45 am Post subject: |
|
|
correct!
hmmm bad management i guess :lol: _________________ living in an armish paradise.....no gates here!
mawuahahaha :) |
|
Back to top |
|
 |
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Tue Jan 20, 2004 2:34 pm Post subject: |
|
|
Why not using
Code: | if (isset($foo[3]))
{
print $foo[3];
} |
_________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
 |
goose -
Joined: 17 Sep 2002 Posts: 608 Location: The Land Of OZ! come here toto!
|
Posted: Tue Jan 27, 2004 5:16 am Post subject: |
|
|
yes it can be done that way too aprelium. _________________ living in an armish paradise.....no gates here!
mawuahahaha :) |
|
Back to top |
|
 |
|