Having trouble creating PHP file in terminal

Discussion in 'HOWTO-Related Questions' started by Woody619, Jun 13, 2011.

  1. Woody619

    Woody619 New Member

    Hello all! I am relatively new to Linux and the whole LAMP environment. I was following this excellent guide . When it came to make the info.php file I ran into a problem.

    I write the code: vi /var/www/info.php
    When I hit enter I get a blank screen with a descending line of blue tildes (~) on the left side. I figured this was creating a new php file and I insert my code into it.

    I went to start the code, but it would not allow the less than (<) sign to be used as a character. When I hit the question mark (?) it allowed me to type, but each time would give an error.

    Is there something I am missing from this step?

    Thanks in advance!
     
  2. Woody619

    Woody619 New Member

    Nevermind. I installed emacs and it works fine!
     
  3. Ben

    Ben Active Member Moderator

    Argl :)

    you have to switch to the Insert Mode by hitting "i". then enter your code, hit :w to just write, :wq (or :x) to save and quit.

    it's not the newest one, but here is a vi manual: http://www.cs.fsu.edu/general/vimanual.html
    Maybe google will help you find a more recent one, in case you use vi once again :)
     

Share This Page