Connecting Tech Pros Worldwide Help | Site Map

Change HTML

 
LinkBack Thread Tools Search this Thread
  #1  
Old June 29th, 2006, 05:45 PM
WhatsPHP
Guest
 
Posts: n/a
Default Change HTML

Can PHP be used to change my clients static HTML pages? By themselves?

Instead of having to download the HTML from the server, then use
dreamweaver and upload the file back?

Thanks
Rohan


  #2  
Old June 29th, 2006, 08:55 PM
Rik
Guest
 
Posts: n/a
Default Re: Change HTML

WhatsPHP wrote:[color=blue]
> Can PHP be used to change my clients static HTML pages? By themselves?[/color]

How do you mean 'By themselves'?

[color=blue]
> Instead of having to download the HTML from the server, then use
> dreamweaver and upload the file back?[/color]

You can manipulate files on the same server without effort: look into
fopen(), fwrite() and the like. If PHP runs on a different server, it's
something different. A possible solution would be to let PHP connect through
FTP, download the html-file, change it, and upload it again. Should be no
problem.

Grtz,
--
Rik Wasmus


  #3  
Old June 29th, 2006, 10:35 PM
Garbage Monster
Guest
 
Posts: n/a
Default Re: Change HTML

PHP - server side based approach
Java Script - could be embedded into HTML and with a use of document.write() you can modify HTML page without refreshing it from the server

Example:

=========== Code Starts Here =============
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>An Example of JavaScript code</title>
<head>
<body>
<script language="JavaScript">
<!-- Use the HTML comment to hide JavaScript from old browsers
document.write("This text was written using JavaScript.")
// End hiding JavaScript -->
</script>
<NOSCRIPT>
You see this if your browser won't run JavaScript.
</NOSCRIPT>
</body>
</html>

=========== Code Ends Here =============

Rik wrote:[color=blue]
> WhatsPHP wrote:[color=green]
>> Can PHP be used to change my clients static HTML pages? By themselves?[/color]
>
> How do you mean 'By themselves'?
>
>[color=green]
>> Instead of having to download the HTML from the server, then use
>> dreamweaver and upload the file back?[/color]
>
> You can manipulate files on the same server without effort: look into
> fopen(), fwrite() and the like. If PHP runs on a different server, it's
> something different. A possible solution would be to let PHP connect through
> FTP, download the html-file, change it, and upload it again. Should be no
> problem.
>
> Grtz,[/color]
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.