6 Replies Latest reply on Sep 11, 2010 6:29 PM by RemyBlair

    php newbie

    RemyBlair

      Hi Guys, having seen the writing on the wall, I'm moving all my asp development to php, but I'm a bit stumped on dreamweavers behavior with php

       

      Whenever I do a php include and place my cursor between the " " and then select the file, dreameaver places the file name outside the quotation marks

       

      Other occaisions I delete a server behaviour from the panel, the code remains and is not deleted!

       

      Any ideas

       

      cheers

      Rem

        • 1. Re: php newbie
          MurraySummers Level 8

          Whenever I do a php include and place my cursor between the " " and then select the file, dreameaver places the file name outside the quotation marks

           

          How are you doing the includes?  What steps are you performing to get to the point where you have empty quotes?  When I use the INSERT | Server -Side Include or the include icon from the Insert toolbar, I am always challenged to browse to the file before the code is inserted.

           

          Other occaisions I delete a server behaviour from the panel, the code remains and is not deleted!

           

          I cannot reproduce this symptom. 

          • 2. Re: php newbie
            RemyBlair Level 1

            Hi Murray,

             

            Thanks for the reply.

             

            I select the include from the php menu

             

            the code is inserted as  <?php include(); ?>

             

            I then place " " as   <?php include(""); ?> my cursor is now between the quotation marks

             

            The screen then requests a refresh after which the filename box appears, I then navigate to the file, select it and  dreamweaver places the code like this outside of the brackets

             

                  modules/mod_CustomerSupport.html
                    <?php include(""); ?>

             

            This happens every time without fail, the code is always inserted a line above the include

             

            Best regards

            Rem

            • 3. Re: php newbie
              Rob Hecker2-uhQIgt Level 2

              Dreamweaver is not a PHP IDE, although it is PHP friendly.

               

              Zend Studio is one of several PHP IDEs available.

              • 4. Re: php newbie
                25 Rabbits

                Dreamweaver sometimes likes to re-write code if it sees problems with basic html , you can modify this in  edit->preferences->code rewriting, if .php isnt there add it.

                 

                you could also just type it in.. <?php include "path/to/file.php"; ?>

                1 person found this helpful
                • 5. Re: php newbie
                  MurraySummers Level 8

                  I select the include from the php menu

                   

                  the code is inserted as  <?php include(); ?>

                   

                  Try it the way I suggested.

                   

                  Place the cursor and use INSERT | Server-Side Include.  That way you never pass through the empty quotes state.

                  • 6. Re: php newbie
                    RemyBlair Level 1

                    Thanks Murray,

                     

                    I'll do it your way, as you say it works.

                     

                    Thanks for the help

                     

                    Cheers

                    Remy