Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8

Thread: Error Need Help

  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    271
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Error Need Help

    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

  • #2
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by stevan View Post
    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

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Posts
    271
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by oesxyl View Post
    why the line number is not the same? typo?

    best regards
    OPPS my mistake Yes Typo error

  • #4
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,042
    Thanks
    19
    Thanked 42 Times in 42 Posts
    did you read the strpos() manual?

  • #5
    Regular Coder
    Join Date
    Jun 2002
    Posts
    271
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by rafiki View Post
    did you read the 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

  • #6
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by stevan View Post
    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

  • #7
    Regular Coder
    Join Date
    Jun 2002
    Posts
    271
    Thanks
    4
    Thanked 0 Times in 0 Posts
    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

  • #8
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    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.

    PHP Code:
    if($ps1 || $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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •