Any PHP experts around?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Danielle
    Confirmed User
    • Jun 2002
    • 1227

    #1

    Any PHP experts around?

    What is correct????

    header("Content-Disposition: attachment; filename=\"$filename\"");

    or

    header("Content-Disposition: attachment; filename=$filename");

    Hugs,
    Danielle
  • Danielle
    Confirmed User
    • Jun 2002
    • 1227

    #2
    bump for the php expert mourning crew

    Hugs,
    Danielle

    Comment

    • mlove
      the guy
      • Apr 2005
      • 764

      #3
      according to php.net/header the correct syntax is


      PHP Code:
      header('Content-Disposition: attachment; filename="$filename"'); 
      
      If you won't feel as good, I won't feel as cheap.

      Comment

      • Nookster
        Confirmed IT Professional
        • Nov 2005
        • 3744

        #4
        yes, like mlove said. double quotes nested inside single quotes.
        The Best Affiliate Software, Ever.

        Comment

        • woj
          <&(©¿©)&>
          • Jul 2002
          • 47882

          #5
          Originally posted by mlove
          according to php.net/header the correct syntax is


          PHP Code:
          header('Content-Disposition: attachment; filename="$filename"'); 
          
          come on, that can't be correct... $filename won't work if it's inside single quotes...

          you need this:
          header("Content-Disposition: attachment; filename=\"$filename\"");
          Last edited by woj; 01-26-2007, 12:10 AM.
          Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
          Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
          Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager

          Comment

          • mlove
            the guy
            • Apr 2005
            • 764

            #6
            Originally posted by woj
            come on, that can't be correct... $filename won't work if it's inside single quotes...

            you need this:
            header("Content-Disposition: attachment; filename=\"$filename\"");
            ahh yeah, forgot about that.
            If you won't feel as good, I won't feel as cheap.

            Comment

            • Danielle
              Confirmed User
              • Jun 2002
              • 1227

              #7
              So this is correct?

              header("Content-Disposition: attachment; filename=\"$filename\"");

              Hugs,
              Danielle

              Comment

              • Danielle
                Confirmed User
                • Jun 2002
                • 1227

                #8
                Are the "\" back slashes needed?

                Hugs,
                Danielle

                Comment

                • woj
                  <&(©¿©)&>
                  • Jul 2002
                  • 47882

                  #9
                  Originally posted by Danielle
                  So this is correct?

                  header("Content-Disposition: attachment; filename=\"$filename\"");

                  Hugs,
                  Danielle
                  looks correct, but why are you sweating about the details? just try both versions in IE and Firefox and if it works in both, you are good to go
                  Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
                  Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
                  Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager

                  Comment

                  • Juicy D. Links
                    So Fucking Banned
                    • Apr 2001
                    • 122992

                    #10
                    header("Content-Disposition: attachment; filename=\"$filename\wojismydad"if a=b then JDL is A end");

                    Comment

                    • Danielle
                      Confirmed User
                      • Jun 2002
                      • 1227

                      #11
                      Originally posted by woj
                      looks correct, but why are you sweating about the details? just try both versions in IE and Firefox and if it works in both, you are good to go
                      Both versions seem to work.... So I am trying to find out what version is correct.

                      Hugs,
                      Danielle

                      Comment

                      • Chariott
                        Confirmed User
                        • Nov 2006
                        • 361

                        #12
                        There is no difference. Quotes allow you to send file which contains spaces in its name. Nothing more.

                        UUGallery v3.37 builder plugin for Wordpress!
                        Now it builds FLV VIDEO Galleries! It grabs galleries from FHG's, generates thumbnails, resizes originals,
                        arranges within your template and posts a gallery within 1 click!
                        Start making money right now!
                        ICQ# 475-719-552, Email+MSN: msnaddress[-~at~-]uusoftware.com

                        Comment

                        • Chariott
                          Confirmed User
                          • Nov 2006
                          • 361

                          #13
                          You can find original information here: http://www.ietf.org/rfc/rfc2183.txt

                          UUGallery v3.37 builder plugin for Wordpress!
                          Now it builds FLV VIDEO Galleries! It grabs galleries from FHG's, generates thumbnails, resizes originals,
                          arranges within your template and posts a gallery within 1 click!
                          Start making money right now!
                          ICQ# 475-719-552, Email+MSN: msnaddress[-~at~-]uusoftware.com

                          Comment

                          Working...