Notice: Undefined offset: 5 in D:\xampp\htdocs\dianlu2010\sys\inc\function.php on line 237 - function showtable($var,$up,$down,$left) {
-
global $tree,$linktype;
-
-
$a1='<table border="0" cellpadding="0" cellspacing="0" class="mainTB"> <tr> <td ';
-
$a2_w='class="blankFile"';
-
$a2_b='class="blackFile"';
-
$a3='></td> <td rowspan="2" ';
-
$a4_b='class="row"';
-
$a4_w='';
-
$a5='></td> <td rowspan="2"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="tableblack" align="center" valign="middle">';
-
$linktype=array(
-
'<img src="http://bytes.com/topic/php/images/url.gif" width="16" height="16" title="直接连接">'
-
,
-
'<img src="http://bytes.com/topic/php/images/dir.gif" width="16" height="16" title="内含内容">'
-
,
-
'<img src="http://bytes.com/topic/php/images/list.gif" width="16" height="16" title="列表">'
-
);
-
$a6='</td> </tr> </table></td> <td rowspan="2" ';
-
$a7_b='class="row"';
-
$a7_w='';
-
$a8='></td> <td rowspan="2">';
-
$otable='';
-
$a9='</td> </tr> <tr> <td ';
-
$a10_b='class="blackFile"';
-
$a10_w='class="blankFile"';
-
$a11='></td> </tr> </table>';
-
-
$right=0;
-
$tree_readme='<a onmouseover="show_div(event,'.$var->id.','.$var->type.')" style="cursor: hand;">'.$var->name.'</a>';
-
if($var->child_id) $right=1;
-
echo $a1.($up?$a2_b:$a2_w).$a3.($left?$a4_b:$a4_w).$a5.$linktype[$var->type].$tree_readme.$a6.($right?$a7_b:$a7_w).$a8; //237
-
-
if($var->child_id){
-
$new_up=0;
-
$new_left=$new_down=1;
-
for ($i=0;$i<count($var->child_id);$i++){
-
if($i!=0) $new_up=1;
-
if(($i+1)==count($var->child_id)) $new_down=0;
-
showtable($tree[$var->child_id[$i]],$new_up,$new_down,$new_left);
-
}
-
}
-
echo $a9.($down?$a10_b:$a10_w).$a11;
-
}
2 1753 Luuk 1,047
Expert 1GB
you are probably referring to line 31: -
echo $a1.($up?$a2_b:$a2_w).$a3.($left?$a4_b:$a4_w).$a5.$linktype[$var->type].$tree_readme.$a6.($right?$a7_b:$a7_w).$a8; //237
Undefined offset means that the value of '$var-<type' is not a member of the $linktype array.
That why '$linktype[$var->type]' returns the error "Undefined offset"
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Steven |
last post by:
Hi All,
I am moving some php code from a Linux machine to a Windows 2000 machine
with the code belowe I get the following error :
Notice: Undefined offset: 1 in c:\inetpub\wwwroot\test.php on...
|
by: google |
last post by:
Hello,
I'm having major problems trying to get my head round this problem.
I'm trying to generate an error free script, however, I still cannot
sort out this loop.
I get a "Notice:...
|
by: Richard Lawrence |
last post by:
Hi there,
I'm having a problem with PHP which I'm not sure how to best solve.
Here is the code:
$fp = fopen("comments.txt", "r");
while(!feof($fp))
{
$line = fgets($fp, 1024);
list($key,...
|
by: neridaj |
last post by:
Hello,
I'm trying to figure out how to get rid of these errors:
Notice: Undefined offset: 1 in output_fns.php on line 315
Notice: getimagesize() : Read error! in
output_fns.php on line 315...
|
by: raydiamond4u |
last post by:
Hello. My name is Raymond.
My code is generating the following error: Notice: Undefined offset: 2 in C:\wamp\www\imagegallery\supportfile\include\config.php on line 25
How do i correct the error?...
|
by: atang |
last post by:
Hi, I found the code here, it's excately what i am looking for, ie8 give this error "Notice: Undefined offset: 49 in.." which is this line "if ($num_of_chars==$required)", i'm a newbie, i don't know...
|
by: tbebest |
last post by:
Hi , i have a form and it has A problem:
i upload my 3 image and it uploaded in definded path but in insert in db filed there are empty:
Notice: Undefined offset: 0 in C:\wamp\www
Notice:...
|
by: Kevon |
last post by:
Hello,
I'm designing a photo gallery for my website, I've followed several tutorials online about how to go about doing this, with great success, I have come up with a set of codes, however I keep...
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |