PHP Basics

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

tabutcher
Forum Newbie
Posts: 20
Joined: Fri Aug 21, 2009 7:10 am

Re: PHP Basics

Post by tabutcher »

I use notepad as well and find that you learn to pick up errors better than if you used an IDE that highlighted or underline your syntax. Only problem with notepad is that there is no option for viewing line numbers for when your debugging.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: PHP Basics

Post by Eran »

I use notepad as well and find that you learn to pick up errors better than if you used an IDE that highlighted or underline your syntax.
How does that make sense? syntax highlighting is a major visual aid
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: PHP Basics

Post by jackpf »

Why do you use notepad? Most real editors are free.
User avatar
juma929
Forum Commoner
Posts: 72
Joined: Wed Jun 17, 2009 9:41 am

Re: PHP Basics

Post by juma929 »

Hello,

I've already explained why I personally use notepad on certain occasions, not just for the reason of being used to using it for all this time. If you enable the status bar in notepad by the way you can see line numbers but only when you select the line, a few random clicks and you get to the line pretty quickly.

I use Notepad++ at home and for certain clients but as I say there are occasions (more often than you would think) where I have to use notepad, but its not a problem.

:)
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: PHP Basics

Post by jackpf »

Yeah, I understand why you use notepad...but that's because you have to right?

But surely no one would use it out of choice 8O

I was just wondering why tabutcher used it instead of something better.
User avatar
juma929
Forum Commoner
Posts: 72
Joined: Wed Jun 17, 2009 9:41 am

Re: PHP Basics

Post by juma929 »

Hello,

Ah okay :). Yeah I have to in certain circumstances due to certain clients software installations. I could put notepad++ on a usb stick and run from there but certain types of organisations such as Insurance etc arnt too keen on plugging things into their systems! :P

:)
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: PHP Basics

Post by Christopher »

karthik.sreenivasan wrote:Thanks for the reply.

Currently I am using Eclips IDE for PHP. I see that there is an option CTRL+F9 which is run but when I run it it says (Action Cancelled). What does this infer. I tried to make some settings but it seldom works. How am I supposed to link php compilters to the Eclips ?

Am I basically going wrong somewhere ?
As someone said above, PHP does not use a compiler. When you request a PHP script with a browser (e.g., http://www.example.com/foo.php) the webserver will run the script with the PHP interpreter automatically.
karthik.sreenivasan wrote:If there is a step by step procedure for running the PHP code it would be of great help!!!

e.g.

1. Write PHP code.
2. Run server. 3, 4, 5 and so on...

I just want to write a simple PHP code to print on the screen(ECHO).
For a remote web server you might do:

1. Edit the PHP file
2. Copy it to the web server
3. Refresh the browser

Many programmers run a local webserver on the localhost domain. If you do that then:

1. Edit the PHP file
2. Refresh the browser
3. Repeat 1 and 2 until done
4. When done then copy it to the web server
(#10850)
User avatar
karthik.sreenivasan
Forum Newbie
Posts: 6
Joined: Mon Aug 17, 2009 11:00 pm

Re: PHP Basics

Post by karthik.sreenivasan »

Thanks for the reply.

I just have one final clarification. Where do I get PHP Compiler which gets embeded into the browser ? Is it a software which gets attached or a explicit web server ? I think if I know this then I can start right away ?

Thanks in advance.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: PHP Basics

Post by jackpf »

PHP has nothing to do with the browser.

It's SERVER SIDE!!! :P

I think most people install it as an apache/IIS module, but you can use it as CGI binary as well.
klevis miho
Forum Contributor
Posts: 413
Joined: Wed Oct 29, 2008 2:59 pm
Location: Albania
Contact:

Re: PHP Basics

Post by klevis miho »

I have used notepad, notepad++ and some other editors around.
But now im using dreamweaver, i think it's the best.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: PHP Basics

Post by Christopher »

PHP is a server side language that is use to create data to send to browsers. That data is usually HTML+CSS+Javascript, but could be XML, JSON, RSS, PDF, delimited data, etc., etc., etc. PHP can also reveive a request from a browser with GET and/or POST data, plus header information.
(#10850)
User avatar
karthik.sreenivasan
Forum Newbie
Posts: 6
Joined: Mon Aug 17, 2009 11:00 pm

Re: PHP Basics

Post by karthik.sreenivasan »

Thanks guys. I finally figured out to work with PHP with the information you have provided. Thanks.

I just have a small query. How does JQuery corelate with PHP ?
Post Reply