jimbo_3000 Posted March 7, 2009 Share Posted March 7, 2009 I have notepad++ and xampp but i can't get the php to display. Where do I configure my the server. This is my xampp directory C:\xampp\htdocs Thanks in advance. Jimbo Link to comment Share on other sites More sharing options...
genericnumber1 Posted March 7, 2009 Share Posted March 7, 2009 Did you read all of the information here? Link to comment Share on other sites More sharing options...
jimbo_3000 Posted March 7, 2009 Author Share Posted March 7, 2009 I have xampp working with Dreamweaver and another text editor. So the problem is not xampp. I am trying out Notepad++ and my php is not working under Notepad++. The main problem is that I don't know how to configure Notepad++ to work with xampp. The same code that works in Dreamweaver won't work with Notepad++. How do I get Notepad++ to work with the sever? Link to comment Share on other sites More sharing options...
wildteen88 Posted March 7, 2009 Share Posted March 7, 2009 What are trying to do in Notepad++? Live preview? You need to explain what you're trying to do more clearly. Link to comment Share on other sites More sharing options...
jimbo_3000 Posted March 7, 2009 Author Share Posted March 7, 2009 I am trying to run php in notepad++. However when I run any php code, notepad++ ask if i want to save or open the file. When I choose open nothing happens. So how do I make php run while using notepad++. Link to comment Share on other sites More sharing options...
Mchl Posted March 7, 2009 Share Posted March 7, 2009 Notepad++ is a text editor... you DO NOT run php in it. Link to comment Share on other sites More sharing options...
jimbo_3000 Posted March 7, 2009 Author Share Posted March 7, 2009 Notepad++ is a text editor... you DO NOT run php in it. Very cute; but wrong answer. So if there is code in php and I want to run my code in my browser and server how do I get that to work. Just never mind the technical terms. How do you check your php once its on notepad++? Link to comment Share on other sites More sharing options...
Mchl Posted March 7, 2009 Share Posted March 7, 2009 You point your browser to http://localhost (or use CLI to run the script) Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted March 7, 2009 Share Posted March 7, 2009 Assuming that you are editing your files in the proper web document folder, you can create a "RUN" command to invoke the browser and pass it the URL - http://notepad-plus.sourceforge.net/uk/run-HOWTO.php firefox "http://localhost/$(FILE_NAME)" Link to comment Share on other sites More sharing options...
jimbo_3000 Posted March 7, 2009 Author Share Posted March 7, 2009 You point your browser to http://localhost (or use CLI to run the script) The problem is I can't connect notepad++ to the server. When I use dreamweaver or phpdesigner the code works. Link to comment Share on other sites More sharing options...
Mchl Posted March 7, 2009 Share Posted March 7, 2009 However it will open a new tab on each run. Personally I find refreshing Firefox directly more convenient Link to comment Share on other sites More sharing options...
redarrow Posted March 7, 2009 Share Posted March 7, 2009 mchi, But if your working with session's then you need to make sure the browser is closed then reopened. and personally i don't use live preview, as i need all my html/css cross browser compliant, I only use my zend package for debugging php mysql . i would use notepad the same way. Link to comment Share on other sites More sharing options...
Daniel0 Posted March 7, 2009 Share Posted March 7, 2009 mchi, But if your working with session's then you need to make sure the browser is closed then reopened. Or you know, remove the cookie. Link to comment Share on other sites More sharing options...
jimbo_3000 Posted March 8, 2009 Author Share Posted March 8, 2009 So does anyone here use notepad++ if so how do you set up to where the browser reads php. assuming you have xampp working fine. Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted March 8, 2009 Share Posted March 8, 2009 Someone already told you how - Assuming that you are editing your files in the proper web document folder, you can create a "RUN" command to invoke the browser and pass it the URL - http://notepad-plus.sourceforge.net/uk/run-HOWTO.php firefox "http://localhost/$(FILE_NAME)" Browsers don't read php, php is parsed and interpreted by the php language engine that is either installed as a web server language extension or as a command line interface. Link to comment Share on other sites More sharing options...
jimbo_3000 Posted March 8, 2009 Author Share Posted March 8, 2009 I just want to use notepade++ to edit php than check the it on the browser. But It won't work. I have XAMPP for all the server stuff. I just need how to srt up notepad++ to funtion right when I have some php. Please with all do respect I don't need an explanation what the server does or what the browser does. I understand that I just have not used the right terms. My php code runs fine under dreamweaver, I am trying to use notepad++ and see how it works. I need an explanation how to setup notepad++. I want to have php code in notepad++ and execute it. My sever is ok because the same code executes when i use a different program. Link to comment Share on other sites More sharing options...
N1CK3RS0N Posted March 8, 2009 Share Posted March 8, 2009 2 windows 1. text editor 2. browser tadaaaaa Link to comment Share on other sites More sharing options...
genericnumber1 Posted March 8, 2009 Share Posted March 8, 2009 Jimbo, like it has been stated numerous times notepad++ is a text editor, it doesn't have a built in browser or the ability to execute php, it only has the ability to modify text, hence it being called a text editor. You'll need to have one window with notepad++ where you edit your code, and a second web browser window opened to your localhost. There's no way to execute PHP in notepad++, it's all done by your server (Xampp) and the resulting html is rendered in your web browser. Link to comment Share on other sites More sharing options...
Softkites Posted March 8, 2009 Share Posted March 8, 2009 Hi Jimbo, I was watching some tutorials online the other day and this You-Tube film shows just how Notepad++ and a Browser are used together. Just to complement what genericnumber1 has said. I hope this helps you. Steady Breezes Robert Link to comment Share on other sites More sharing options...
jimbo_3000 Posted March 8, 2009 Author Share Posted March 8, 2009 OK this is the last try. here is some code <?PHP echo 'Thanks for reading.'; ?> In Dreamweaver my testing server is set up so all I have to do is to choose what browser i want to view the output, firefox or IE. "Thanks for reading." shows up in my browser. Now the same code in the same location with notepad++ i get an error. This is what i did; I choose "RUN" from the tool bar. Then I choose firefox and then I get an error message. It never gets to my browser. So now the problem is notpad++ is not set correctly. Well that is only thing I can think of. So I am thinking the problem is that I have not set up notepad++ correctly. I may not have used the right jargon for all this mess. But; this has nothing to do with what a text editor is, what a server does and what php can do. How do you type some php in notepad++, then go to "RUN" in tool bar and then choose your browser and display "Thanks for reading." in the browser? Link to comment Share on other sites More sharing options...
Mchl Posted March 8, 2009 Share Posted March 8, 2009 PFMaBiSmAd gave you link to instructions. However Notepad++ doesn't do this as good as Dreamweaver and I'm afraid you will have to point your browser manually to location of your file, as it is more convenient. 'launch in Firefox' and 'launch in IE' options in Notepad++ are designed for HTML files, not for PHP. Notepad++ is not an IDE (although it comes pretty close). Link to comment Share on other sites More sharing options...
jimbo_3000 Posted March 8, 2009 Author Share Posted March 8, 2009 Thanks Mchl; You finally got my point. That's all I needed to know. Link to comment Share on other sites More sharing options...
Mchl Posted March 8, 2009 Share Posted March 8, 2009 Yeah... you confused us as a little at first... glad we could eventually sort it out If you're looking for a full fledged PHP IDE, I recommend NetBeans Link to comment Share on other sites More sharing options...
jimbo_3000 Posted March 8, 2009 Author Share Posted March 8, 2009 Thanks I'll try that out. Link to comment Share on other sites More sharing options...
zeppp Posted July 10, 2013 Share Posted July 10, 2013 I've had the same problem. The RUN-function doesn't work right away like it does in NetBeans for example. But actually it is quite easy : Open the RUN dialog box and just type in the following : chrome "localhost\phpproject1\$(FILE_NAME)" Now you can run your PHP files in Chrome. (if you use another browser, just change the "chrome" to your browser-name) Link to comment Share on other sites More sharing options...
Recommended Posts