By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,948 Members | 664 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,948 IT Pros & Developers. It's quick & easy.

Downloading PHP files from the web

P: 1
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:
Jul 12 '06 #1
Share this Question
Share on Google+
3 Replies


sashi
Expert 100+
P: 1,754
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..
Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3. ?>
  4.  
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <body>
  3. <?php
  4.  
  5. echo "Hello lala9585";
  6.  
  7. ?>
  8. </body>
  9. </html>
  10.  
pls refer to the link below to learn some tips and tricks when it comes to dealing with php.. good luck my fren.. :)

http://www.w3schools.com/php/default.asp
Jul 12 '06 #2

Banfa
Expert Mod 5K+
P: 8,916
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.
Jul 13 '06 #3

P: 76
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.
Jul 15 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.