SitePoint Sponsor

User Tag List

Results 1 to 11 of 11

Thread: Add a link php?

  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2011
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Add a link php?

    I've gone through the book and become more comfortable with HTML and CSS,
    how to add links etc to my web page.
    I'd like to add a link to a site with that ends in index.php i can't save that in notepad
    then upload as before - what do I do to add a link?
    Thanks,
    Barry

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,208
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Are you using the basic notepad that comes with Windows? Perhaps use a better code editor. It doesn't matter whether a web file is called .html or .php—they are the same thing, so there's no difference in the code itself.

  3. #3
    SitePoint Enthusiast
    Join Date
    Nov 2011
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I'm just using note pad bundled with windows. Can you suggest a code editor?
    So I can just add my link in html code where I want it save it to the code editor then upload to the sever with the new link
    and the sky won't fall in? even if it has the .php at the end?
    Thanks

  4. #4
    Non-Member
    Join Date
    Apr 2011
    Location
    no fixed address
    Posts
    851
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't follow

    If all you want to do is add a html link to a php file you can use any text editor and save the file. Both html and php files are ascii/text files. The only difference is that with a web page that has php code in it as well as potentially html code (and hence a php extension) you need a web server to open the php page in your browser. A free local web server you can use for testing a php file is xampp (more info on google).

  5. #5
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,208
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by Barry360 View Post
    Yes, I'm just using note pad bundled with windows. Can you suggest a code editor?
    If Notepad is having a fit saving a file when it has a .php extension, then there are lots of code editors you can try. Here are few free Windoze ones I know of:

    NotePad2
    DocPad
    Notepad++
    Crimson Editor

    There are lots of licensed ones, of course, like Dreamweaver et al.

  6. #6
    SitePoint Enthusiast
    Join Date
    Nov 2011
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, yes I've downloaded xampp all very new will look into it further.
    Will give notepad 2 a try as notepad 1 would not save .php for me?
    Thanks all for your help.

  7. #7
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,208
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    You only need xampp if you want to test your pages on your desktop. If you are just uploading them straight to the web, you don't need a local server environment. You just need a code editor that will save changes you make.

  8. #8
    SitePoint Enthusiast
    Join Date
    Nov 2011
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Great Thanks!

  9. #9
    SitePoint Wizard cranial-bore's Avatar
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    2,634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Change the Save as type drop down to All files. That will let you save as .php instead of .php.txt
    Then get a better text editor anyway. I use Crimson Editor, even though it hasn't been updated for 20 years. The inline calculator is very handy. I'd like to use Notepad++, but it's just not stable enough on my system.

  10. #10
    SitePoint Wizard
    Join Date
    Jul 2003
    Location
    Kent
    Posts
    1,921
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cranial-bore View Post
    Change the Save as type drop down to All files. That will let you save as .php instead of .php.txt
    Then get a better text editor anyway. I use Crimson Editor, even though it hasn't been updated for 20 years. The inline calculator is very handy. I'd like to use Notepad++, but it's just not stable enough on my system.
    There must be something wrong with your computer if you have trouble running Notepad++ ! It has been a stable program all the years I've used it.

  11. #11
    SitePoint Wizard cranial-bore's Avatar
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    2,634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's one of those things where Notepad++ is stable in thousands of installations, but not mine, and my computer is stable in just about everything I do, but NP++ crashes.
    Not sure if it's a plugin like Zen Coding, but even with them disabled it's not perfect. Latest version was better, but not enough.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •