Click here to Skip to main content
15,895,740 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i am try to run my first php program in notepad++,but the problem is that it doesnot execute php code execept html code in the .php file.i have installed xampp server and my file is saved in a folder in my root folder htdocs,but i dont know the problems please i need help.

What I have tried:

i have google it out and ask question in other forum but solution yet.
Posted
Updated 9-May-17 8:32am
Comments
Richard MacCutchan 9-May-17 13:51pm    
I think notepad++ is just an editor so would not expect it to run PHP code.
alertfrancis 9-May-17 14:09pm    
but the tutorial am using use text editor to execute their code.
Dave Kreskowiak 9-May-17 14:32pm    
I seriously doubt that. Not unless there is some plugin for Notepad++ that is doing it. Which plugin would that be? I have no idea. Check with the people that wrote the tutorial you're talking about.
Kornfeld Eliyahu Peter 9-May-17 14:44pm    
Notepad++ can execute almost everything that has a command line interface...
Kornfeld Eliyahu Peter 9-May-17 14:44pm    
Notepad++ can execute almost everything that has a command line interface...

Hi In Xampp control panel ensure that apache is started and running and mysql/mariadb.
Then navigate to localhost on your browser to see if its running.

if localhost displays the xammp homepage, you can navigate to "localhost/mywebsite" where "mywebsite" is the folder you have created under htdocs.

regards
 
Share this answer
 
As a general rule, you need to put the files in your "website" folder of your server.

This is, for example, www in WAMP/LAMP servers. In simple terms, items in this folder are treated as website pages. If you have one of the aforementioned servers, the P stands for PHP and if the server is running it will parse the PHP and things will make sense. IIS has a similar location - likely won't contain PHP. You do not create this 'www' folder yourself! It's created when you install the server. It's a very specific place!

This is a special place, so to speak, on your system, whose contents are treated treated as web pages.

Perhaps your examples are doing their editing in the web folder to begin with? Even then, you'd need to open the file with a browser for the it to be displayed as a web page.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900