473,507 Members | 3,112 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Jun 29 '06 #1
2 1589
Rik
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,
--
Rik Wasmus
Jun 29 '06 #2
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,

Jun 29 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
17290
by: Csaba2000 | last post by:
I have set onmousedown to change the cursor, but this setting is ignored (IE 5.5; NN 6.1 on Win 2K Pro) until the mouse is either moved or the mouse button is released. On Opera 7.01, the setting...
1
5783
by: OM | last post by:
I've found out that I can use <div id = "variable"><div> to change text and pictures on mouseovers. All I have to do is change "variable" to be the HTML text I want. I can even change the text...
10
9093
by: TheKeith | last post by:
I don't know much about javascript, so take it easy on me. Is there a way to dynamically change a CSS layers dimensions on the fly. Here is what I'm doing. I have a bunch of thumbnails that when...
34
4873
by: Andrew DeFaria | last post by:
I thought this would be fairly straight forward but apparently it's not. Given the following html file: <!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en"> <html> <head>...
4
2591
by: Richard Cornford | last post by:
For the last couple of months I have been trying to get the next round of updates to the FAQ underway and been being thwarted by a heavy workload (the project I am working on has to be finished an...
11
19570
by: Yeah | last post by:
I have a multiple choice quiz where I would like to use CSS to change the color of the answers upon clicking them. I would like to present the right and wrong answers up front, rather than direct...
3
4185
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - I have window.status="Moomin"; why doesn't the statusbar change?...
2
1880
by: JasonP27 | last post by:
I want to change the href destination of a link, based upon the page title or document's filename of an iframe. For example: If the TITLE of the iframe is Poem1, or the document loaded in the...
6
4504
by: gavy7210 | last post by:
hello i am using struts 1.2,Eclipse Platform Version: 3.4.2,mySql 5.0.1,jdk 1.5.. i have a login form(jsp) in which a user logs in,in case he doesnt enter his username and/or password an error...
0
7221
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7109
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7313
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5619
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5039
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1537
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.