Downloading PHP files from the web

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lala9585
    New Member
    • Jul 2006
    • 1

    #1

    Downloading PHP files from the web

    Okay, I've never done script before in my life. I am trying to update two different websites: one is in html format and uses Netscape Composer as the editing software, and then I use WS_FTP to transfer the pages online (and this one I've learned how to do no problem), the other I've only been recently asked to do. All the webpages are in PHP format and they were originally edited using FrontPage and then also transferred online with WS_FTP. The only problem is the original files are gone, and when I try to save a file from the internet, it always saves as ".htm" rather than ".php", so when I edit the pages in FrontPage and try to repost through WS_FTP, they obviously don't show up because they aren't replacing the PHP documents.

    Maybe I don't make any sense, but to me it seems that the problem is I can't edit the pages in PHP format and therefore can't repost them.

    I would like to either A) change the files on the web, and in WS_FTP, to ".htm" instead of ".php" and start there, or B) learn how to save the pages from the web as ".php" instead of ".htm" (if possible) and start from there.

    Can anyone help me? :confused: :confused: :confused:
  • sashi
    Recognized Expert Top Contributor
    • Jun 2006
    • 1749

    #2
    Hi there,

    first of all i suggest you to pick up a little knowledge on .php file format as well as some basic syntax of php.. learning php is nothing much easier in that way..

    below is a sample .php format file.. always include the php script block when it comes to php..
    Code:
    <?php
    
    ?>
    Code:
    <html>
    <body>
    <?php
    
    echo "Hello lala9585";
    
    ?>
    </body>
    </html>
    pls refer to the link below to learn some tips and tricks when it comes to dealing with php.. good luck my fren.. :)

    W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.

    Comment

    • Banfa
      Recognized Expert Expert
      • Feb 2006
      • 9067

      #3
      If you can upload the files with WS_FTP then downloadload them first using WS_FTP so that they keep the correct extension and so they keep the correct code.

      If you download php files from the web by navigating to them in your browser and selecting File -> Save As you will have run the script already and there will be no php left in the file. If you do this you will break whatever functionality the php scripts where giving the web pages.

      Download using ftp.

      Comment

      • Arielle
        New Member
        • Jul 2006
        • 76

        #4
        Okay you need to "download" these files rather than saving them from your web browser.

        If you open up WS_FTP and go to your site you should have a two-pane menu (if you are using the same set-up/version I am) with your local computer's heirarchy of folders on the left and the remote webserver on the right.

        Browse where you want them to go on the left, and where they are on the right... and instead of "uploading them" click the arrow that points left to "download" them. This will save the PHP files.

        Comment

        Working...