Jump to content


Photo

[SOLVED] Notepad++


  • Please log in to reply
24 replies to this topic

#1 jimbo_3000

jimbo_3000

    Member

  • Members
  • PipPip
  • 17 posts

Posted 06 March 2009 - 10:46 PM

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

#2 genericnumber1

genericnumber1

    Advanced Member

  • Members
  • PipPipPip
  • 1,858 posts

Posted 07 March 2009 - 12:30 AM

Did you read all of the information here?

#3 jimbo_3000

jimbo_3000

    Member

  • Members
  • PipPip
  • 17 posts

Posted 07 March 2009 - 12:53 PM

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? 

#4 wildteen88

wildteen88

    Advanced Member

  • Staff Alumni
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 07 March 2009 - 12:59 PM

What are trying to do in Notepad++? Live preview?

You need to explain what you're trying to do more clearly.

#5 jimbo_3000

jimbo_3000

    Member

  • Members
  • PipPip
  • 17 posts

Posted 07 March 2009 - 01:18 PM

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++.

#6 Mchl

Mchl

    Advanced Member

  • Staff Alumni
  • 8,507 posts
  • LocationHigh Memory Area

Posted 07 March 2009 - 01:40 PM

Notepad++ is a text editor... you DO NOT run php in it.
NetBeans fanatic | ExtJS masochist | C++ denier
PHP4 & MySQL4 are no longer supported.
PHPFreaks Tutorials | PHP Debugging: A Beginner's guide | PHP Security Tutorial || How To Ask Questions The Smart Way
Flingbits tutorials | Class Autoloading

#7 jimbo_3000

jimbo_3000

    Member

  • Members
  • PipPip
  • 17 posts

Posted 07 March 2009 - 01:53 PM

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++?

#8 Mchl

Mchl

    Advanced Member

  • Staff Alumni
  • 8,507 posts
  • LocationHigh Memory Area

Posted 07 March 2009 - 01:59 PM

You point your browser to http://localhost (or use CLI to run the script)
NetBeans fanatic | ExtJS masochist | C++ denier
PHP4 & MySQL4 are no longer supported.
PHPFreaks Tutorials | PHP Debugging: A Beginner's guide | PHP Security Tutorial || How To Ask Questions The Smart Way
Flingbits tutorials | Class Autoloading

#9 PFMaBiSmAd

PFMaBiSmAd

    Advanced Member

  • Staff Alumni
  • 16,767 posts
  • LocationColorado, U.S.A.

Posted 07 March 2009 - 02:06 PM

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....k/run-HOWTO.php

firefox "http://localhost/$(FILE_NAME)"

Signature: (not a comment about anything you posted unless specifically indicated)
Debugging step #1: To get past the garbage-out equals garbage-in stage in your code, you must check that the inputs to your code are what you expect.

Programming is just problem solving, but it is done in another language. You must learn enough of the programming language you are using to be able to read and write code.

#10 jimbo_3000

jimbo_3000

    Member

  • Members
  • PipPip
  • 17 posts

Posted 07 March 2009 - 02:12 PM

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.

#11 Mchl

Mchl

    Advanced Member

  • Staff Alumni
  • 8,507 posts
  • LocationHigh Memory Area

Posted 07 March 2009 - 02:13 PM

However it will open a new tab on each run. Personally I find refreshing Firefox directly more convenient
NetBeans fanatic | ExtJS masochist | C++ denier
PHP4 & MySQL4 are no longer supported.
PHPFreaks Tutorials | PHP Debugging: A Beginner's guide | PHP Security Tutorial || How To Ask Questions The Smart Way
Flingbits tutorials | Class Autoloading

#12 redarrow

redarrow

    Advanced Member

  • Members
  • PipPipPip
  • 7,145 posts
  • Locationlondon

Posted 07 March 2009 - 02:19 PM

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.

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#13 Daniel0

Daniel0

    Advanced Member

  • Administrators
  • 11,955 posts

Posted 07 March 2009 - 02:30 PM

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.

#14 jimbo_3000

jimbo_3000

    Member

  • Members
  • PipPip
  • 17 posts

Posted 07 March 2009 - 08:48 PM

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. 




#15 PFMaBiSmAd

PFMaBiSmAd

    Advanced Member

  • Staff Alumni
  • 16,767 posts
  • LocationColorado, U.S.A.

Posted 07 March 2009 - 08:53 PM

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....k/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.
Signature: (not a comment about anything you posted unless specifically indicated)
Debugging step #1: To get past the garbage-out equals garbage-in stage in your code, you must check that the inputs to your code are what you expect.

Programming is just problem solving, but it is done in another language. You must learn enough of the programming language you are using to be able to read and write code.

#16 jimbo_3000

jimbo_3000

    Member

  • Members
  • PipPip
  • 17 posts

Posted 07 March 2009 - 09:09 PM

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.



#17 N1CK3RS0N

N1CK3RS0N

    Advanced Member

  • Members
  • PipPipPip
  • 103 posts
  • LocationMassachusetts

Posted 07 March 2009 - 09:30 PM

2 windows

1. text editor
2. browser

tadaaaaa

#18 genericnumber1

genericnumber1

    Advanced Member

  • Members
  • PipPipPip
  • 1,858 posts

Posted 07 March 2009 - 10:16 PM

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.

#19 Softkites

Softkites

    Newbie

  • New Members
  • Pip
  • 6 posts

Posted 08 March 2009 - 03:53 AM

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.Posted Image



Steady Breezes
Robert
All kite fliers are equal from a kites point of view

#20 jimbo_3000

jimbo_3000

    Member

  • Members
  • PipPip
  • 17 posts

Posted 08 March 2009 - 04:15 PM

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?






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com