stevan
03-08-2008, 08:56 PM
I am getting this error message and I can not get a hold of the person who wrote It . Any help would be appreciated.
Warning: strpos() [function.strpos]: Offset not contained in string in /home2/cruisew/public_html/crvsearch/lnk2ndpage.php on line 576
Line 176 is
$ps = strpos($scheduletable,'<script language="JavaScript" type="text/javascript" src="/js/popup_library.js"></script>',$ps1);
Thxs for the help
oesxyl
03-08-2008, 09:03 PM
I am getting this error message and I can not get a hold of the person who wrote It . Any help would be appreciated.
Warning: strpos() [function.strpos]: Offset not contained in string in /home2/cruisew/public_html/crvsearch/lnk2ndpage.php on line 576
Line 176 is
$ps = strpos($scheduletable,'<script language="JavaScript" type="text/javascript" src="/js/popup_library.js"></script>',$ps1);
Thxs for the help
why the line number is not the same? typo?
best regards
stevan
03-08-2008, 09:05 PM
why the line number is not the same? typo?
best regards
OPPS my mistake Yes Typo error
rafiki
03-08-2008, 10:38 PM
did you read the strpos() (http://www.php.net/strpos) manual?
stevan
03-08-2008, 10:56 PM
did you read the strpos() (http://www.php.net/strpos) manual?
I do not understand php very well the script was written for me 2 years ago and has a error now and I can get in touch with the person who wrote it . I was just wondering if someone could help me understand what is wrong
oesxyl
03-09-2008, 01:40 AM
I do not understand php very well the script was written for me 2 years ago and has a error now and I can get in touch with the person who wrote it . I was just wondering if someone could help me understand what is wrong
post the correct code, if I can, I help you.
best regards
stevan
03-09-2008, 03:13 AM
That is the line of code that has the error I just put the wrong line number there I posted Line 176 I made a mistake but the coding I posted is right one
oesxyl
03-09-2008, 03:27 AM
and why didn't say so, I thought you solve the problem.
the length of $scheduletable must be > $ps1 and $ps1 must be >= 0,
you must check this and do something in case is not.
if($ps1 < 0 || $ps1 > strlen($scheduletable)){
// show me what's wrong, debug only
echo $ps1."<br/>";
echo $scheduletable."<br/>";
// do something here to fix the problem
}
$ps = strpos($scheduletable,'<script language="JavaScript" type="text/javascript" src="/js/popup_library.js"></script>',$ps1);
best regards