LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   "where php code is to be written in linux "? (https://www.linuxquestions.org/questions/linux-software-2/where-php-code-is-to-be-written-in-linux-795496/)

amritpalpathak 03-15-2010 07:47 AM

"where php code is to be written in linux "?
 
Hello i am using ubuntu 9.10 .AS in window for html code we normally write it in notepad and execute it in browers but now i am using ubuntu . i wanna to create my website with php ,please tell where the php code is written in ubuntu , and how to execute it means how i can check output of my written php code ??///
Thanks

devnull10 03-15-2010 08:25 AM

Write it wherever you want. Choose your favourite text editor. Joe, kate, emacs, vi, nedit, gedit, jedit... there are plenty to choose from! Hell, you can even just use
Code:

cat > myfile.php
if you really want! :)

And to run it - either set up apache (beyond the scope of what I have time to reply to here!) or upload to your web server.

zhjim 03-15-2010 08:53 AM

Take a look at http://bluefish.openoffice.nl/ or check out http://www.eclipse.org/ for a full blown IDE

unSpawn 03-16-2010 02:42 AM

Quote:

Originally Posted by devnull10 (Post 3898931)
Write it wherever you want.

I doubt standards like the FSSTND / LSB / FHS don't mention /var/www and ~/public_html as defaults.

devnull10 03-16-2010 03:39 AM

By wherever I meant "in whatever text editor you want" which was in response to the comment "we normally write it in notepad ".
I always write my files in a separate place in my home directory and then copy them over when I'm ready - I don't like editing the master files on-line! :)

sundialsvcs 03-16-2010 10:51 PM

It works like this ...

(1) There are lots of "programmer's editors" out there which have nice features like syntax-checking, syntax highlighting, and so on. Pick one that you like.

(2) It's certainly possible to run a PHP script from the command line, but usually PHP is part of a web browser. However, note that there are many web-browsers that are designed to be run (by developers...) right from your own session, without requiring an Apache install for example.

I suggest you surf to some PHP-oriented pages and have a look around. You'll be coding with the best of 'em in no time ...

Elv13 03-16-2010 11:22 PM

You have to install Apache web server, php5 and (nornally, if you want) MySQL and phpmyadmin.

They are the tools that you would use on Windows, but they are actually Linux software with a Windows version.

Your www directory is normally in /var/www but LSB ask for /srv/www, but onyl few distro apply that rule.


All times are GMT -5. The time now is 06:17 AM.