[PHP] - function "include"

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Phrona
    So Fucking Banned
    • Nov 2003
    • 96

    #1

    [PHP] - function "include"

    When I try to include something that is in the main folder to some file that is in the subfolder, I get this:

    Warning: main(): stream does not support seeking in /home/phrona/public_html/galleries/01/index.php on line 1

    It works fine, but this warning appears at the top of the page. so I need:

    a) How to do it without getting warnings

    OR

    b) command that hides warnings

    Thanks
  • pornanza
    Confirmed User
    • Jul 2003
    • 238

    #2
    @include('file.php');

    to supress all errors for include or

    error_reporting(0); to supress all errors on a page


    not sure why you're getting that error, i'll have a think

    ryan
    Eskimo Hoe
    QuickWank
    Pornanza!

    Comment

    • Phrona
      So Fucking Banned
      • Nov 2003
      • 96

      #3
      Originally posted by pornanza
      @include('file.php');

      to supress all errors for include or

      error_reporting(0); to supress all errors on a page


      not sure why you're getting that error, i'll have a think

      ryan
      Thanks. Adding @ in front of include worked.

      Comment

      • Libertine
        sex dwarf
        • May 2002
        • 17860

        #4
        Maybe it would be a good idea to actually post the code you are using here?
        /(bb|[^b]{2})/

        Comment

        • Weber
          Confirmed User
          • Mar 2003
          • 1114

          #5
          That's bug
          Look here:

          http://bugs.php.net/bug.php?id=24053

          Solution: just put "@" before include
          Just a sig

          Comment

          • Libertine
            sex dwarf
            • May 2002
            • 17860

            #6
            Solution: if it's a local file, don't use http:// but the server path. If it's a remote file... well, then using include() is in most cases rather dangerous, and quite likely the wrong way to go about things.
            /(bb|[^b]{2})/

            Comment

            Working...