Community
    • Login

    How do I get Notepad++ to launch my pages?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    8 Posts 2 Posters 9.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • martha SayersM
      martha Sayers
      last edited by

      Hello - new to Notepad++. I was using Web Matrix and decided to switch to Notepad++. I write in php and javascript etc. I tried “Run” but it doesn’t launch like it did in Web Matrix.
      I have IIS Express 8. How do I do this?

      Claudia FrankC 1 Reply Last reply Reply Quote 1
      • Claudia FrankC
        Claudia Frank @martha Sayers
        last edited by Claudia Frank

        Hello martha-Sayers

        do you refer to the fact that you want to view your page using http://localhost…/mywebsite.php?
        If so put the following into F5 inputbox and save it with a meaningful name.

        INSTALLATION_PATH\MyBrowser.exe http://localhost…/$(FILE_NAME)
        

        $(FILE_NAME) refers to the current active document, which of course must be saved
        in the correct path (your serverroot/…)

        If this wasn’t your question, then can you clarify what web matrix did and npp doesn’t)

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • martha SayersM
          martha Sayers
          last edited by

          @Claudia-Frank said:

          INSTALLATION_PATH\MyBrowser.exe http://localhost…/$(FILE_NAME)
          Thank you for respomding…
          Installation_path refers to what? where I have Notepad++ or my web documents?
          $(FILE_NAME) would be $(Index.php)

          Claudia FrankC 1 Reply Last reply Reply Quote 1
          • Claudia FrankC
            Claudia Frank @martha Sayers
            last edited by

            @martha-Sayers said:

            @Claudia-Frank said:

            INSTALLATION_PATH\MyBrowser.exe http://localhost…/$(FILE_NAME)
            Thank you for respomding…

            Installation_path refers to what? where I have Notepad++ or my web documents?
            Neither, the installation path of your webbrowser.

            $(FILE_NAME) would be $(Index.php)
            No, this is a variable which get resolved by notepad++ automatically to your current document.
            If you edit index.php and it is the active document when running F5, $(FILE_NAME) gets automatically replaced
            with index.php.

            Cheers
            Claudia

            martha SayersM 1 Reply Last reply Reply Quote 0
            • martha SayersM
              martha Sayers @Claudia Frank
              last edited by

              @Claudia-Frank
              I am still having problems launching my pages.
              I created a directory under the default directory for NotePadd++ for my files.
              I made sure all my web pages are associated with NotePad++ instead of Web Matrix 3.
              I selected “Run” from the menu options and I entered the following line:
              C:\Program Files (x86)\Internet Explorer\iexplore.exe http://localhost:14684/$(login.php)

              and saved as RunMyWeb.php

              localhost :14684 is what I see when I used Web Matrix.

              Here’s what happens - nothing…it just sits there…
              And I search for RunMyWeb.php and can not find it even though I clicked saved…
              What am I misunderstanding???

              Claudia FrankC 1 Reply Last reply Reply Quote 0
              • Claudia FrankC
                Claudia Frank @martha Sayers
                last edited by

                Hello @martha-Sayers,

                could it be that you didn’t setup a web server like apache, IIS etc…?
                If not, then maybe WebMatrix has its own web server builtin but Notepad++ doesn’t.

                The call itself is wrong
                C:\Program Files (x86)\Internet Explorer\iexplore.exe http://localhost:14684/$(login.php)

                Encase the call by double quotes like
                “C:\Program Files (x86)\Internet Explorer\iexplore.exe” http://localhost:14684/$(login.php)
                to prevent that windows thinksC:\Program is the program and the rest parameters.

                $(login.php) variable doesn’t exist, as of npp, npp only knows $(FILE_NAME) and others.
                I assume login.php is the webpage you edited and you want to view in the webbrowser, correct?
                so you stick with the call

                "C:\Program Files (x86)\Internet Explorer\iexplore.exe" http://localhost:14684/$(FILE_NAME)
                

                npp takes care that it gets replaced by the real name login.php. Npp will always uses the
                current active documents name and replaces the $FILE_NAME variable with it.

                After saving the Run configruation, the command appears now in the Run menu, I assume its the last entry.
                If you want to modify its command you need to edit shortcuts.xml, there it is stored.

                But, coming back to the webserver setup - if you didn’t have a webserver setup, than all of this won’t work.
                Setting up one is easy, especially when using XAMPP, but you need to decide what you want.
                You can load local webpages from IE or Firefox but as soon as you have server side scripts you need
                something which can execute it and reports the resulting page back.

                Cheers
                Claudia

                1 Reply Last reply Reply Quote 0
                • martha SayersM
                  martha Sayers
                  last edited by

                  oh, I see now. Thank you for being so patience. I am going to try to use XAMP.
                  I tried it before, using MySql, but I am using MS SQL. But I didn’t understand how to launch pages with it either. I am going to try it again. Thank you for your patience, it is appreciated.

                  Claudia FrankC 1 Reply Last reply Reply Quote 0
                  • Claudia FrankC
                    Claudia Frank @martha Sayers
                    last edited by

                    @martha-Sayers

                    MYSql and MSSql are database servers, you can’t used it as webservers.
                    I would recommend you download XAMP together with XAMP Control Panel,
                    makes life even easier.
                    And if you have portableapps installed you could download it from there.
                    If you have problems setting it up let me know.

                    Cheers
                    Claudia

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    The Community of users of the Notepad++ text editor.
                    Powered by NodeBB | Contributors