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:
WhatsPHP wrote:
Can PHP be used to change my clients static HTML pages? By themselves?

How do you mean 'By themselves'?


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

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,
.



Relevant Pages

  • Re: HELP - Cant change Include Path
    ... Here is my php.ini path for the php.ini in both php and sql dirs: ... which did work on the remote linux server and sent me some mail ... Although my gmail acct picked the mail up as ... an attachment instead of as html - but gmail is really wierd about ...
    (comp.lang.php)
  • Re: PHP-Yes, HTML-No --- Why?
    ... You are arguing to have .html at the end of every URL even if the file contains PHP or another scripting language. ... We are talking about web servers, not FTP servers. ... I never said the server should parse MP3 files or whatever, ...
    (comp.lang.php)
  • Re: PHP-Yes, HTML-No --- Why?
    ... The .html signifies that the file contains HTML - and pretty ... A php script contains both HTML and PHP code so technically speaking it's not just HTML. ... The user is getting a file from your web server, an HTML file, and it has an extension of something other than HTML. ... I hope you weren't configuring them as per your personal likes and dislikes but instead were configuring them as per the customer requirements and for speed, ...
    (comp.lang.php)
  • Re: PHP-Yes, HTML-No --- Why?
    ... they don't have any PHP in them. ... which does indeed do away with extensions altogether. ... I hit two identical servers, one set to parse html via php, and one ... html-parsing server being quicker, ...
    (comp.lang.php)
  • Re: PHP-Yes, HTML-No --- Why?
    ... When I do generate them, I can still have PHP providing them, AND keep the .mp3 as an extension, because of the tools I use on my site. ... The site is a whole - asking someone to ignore the mess in the address bar because "it's just the way the web server works" is a bit silly. ... The .html signifies that the file contains HTML - and pretty ... mean they "get" it with a browser and thus the URL has a .php at the end of it. ...
    (comp.lang.php)