|
Posted by Shelly on 09/21/07 11:12
"Rex" <rex.eastbourne@gmail.com> wrote in message
news:1190352082.687632.118150@k79g2000hse.googlegroups.com...
> Hello,
>
> I am a PHP newbie looking for a PHP editor I can use with a WYSIWYG
> interface for HTML (e.g. like Dreamweaver or Frontpage). I'm running
> Vista. I am having installation problems with both Dreamweaver and
> FCKEditor, so those two seem out of the question, even though they do
> what I want. Basically, I'm looking to make changes mostly to the HTML
> content of a PHP website, and want to do so in the easiest way
> possible, preferably without having to manually FTP my files to and
> from my computer.
>
> Any insights?
>
> Thanks!
>
> Rex
While you are at it and beginning your PHP experience, consider the
structure that I finally adopted for myself. Any page I now write is
actually at least three files. The first file I call my template file. It
includes two other files. I goes something like this:
thePage.php:
-------------
<?php
session_start();
require("thePageProcess.php");
?>
<html>
......more lines down to where it gets specific to this page. This is the
general "look and feel".
<?php require("thePageInclude.php"); ?>
......more trailing stuff to finish up.
</html>
------------
The thePageInclude.php file has the rest of the html stuff (and might have
some embedded <?php ?> pieces as well. All the submittal processing and the
iniitalization stuff is done in the thePageProcess.php file. This greatly
speeds up development of multiple pages for a site and having a common look
and feel. It also reduced the testing time for look and feel and
centralizes it for easier modification (less errors). I also like to break
down other areas with appropriate "require"s as needed. Specifically, I
like to put my constants and common functions in separate files so that I
need to change things in only one place.
I am currently studying aspx.net. I was surprised to learn that they do
exactly the same thing. The have what they call a master page file (my
thePage.php), a page file for specific page that has all the html kind of
stuff (my thePageInclude.php) and a code-behind file that handles all the
submittal stuff (my thePageProcess.php).
Proper organization and design at the beginning save a tremendous amount of
time later on.
Shelly
[Back to original message]
|