DPHPEdit User Documentation
2003/01/24 - v 1.03
Although reading usage instructions can be boring and unnecessary for advanced and experienced developers,
it is still recommended because this file is quite short and understandable and it can point to some
things you could have not discovered while just testing DPHPEdit. Please read this "manual" to the end,
if possible. :)
Table of Contents:
About DPHPEdit - Davor's PHP Editor
"DPHPEdit" or - very selfishly called - "Davor's PHP Editor" is an IDE (Integrated Development Environment)
for PHP programming language. That means, it can be used to create, edit and manage applications and
project manager, file browser and internal (Internet Explorer compatible) web page previewer.
Initially developed as quick'n'dirty editor for fast script editing and author's own needs, DPHPEdit has in no time become
a powerful programmer's tool, thanks in the first place to large team of devoted users world-wide.
Using DPHPEdit, like with many other IDEs, you can:
- Create and manage your PHP projects (applications)
- Type code fast using Auto Complete and Completion Proposal
- Preview HTML and PHP scripts using integrated or external Web Browser
- Run your projects from Local or Remote Server URL or Local Path
- Set up extended options to adjust application environment while running projects
Some features that make DPHPEdit different from similar tools and IDEs are:
DPHPEdit can not (yet):
- Simple IDE - organised, multilingual (English and Croatian - more to be added) and with
limited number of toolbars and menus
- Quick loading - you will have your projects opened in a blink of an eye
- Superfast Syntax-Highlighting capable Editor with large "undo" buffer -
SynEdit from SourceForge repository made this tool more than usable
- Code Explorer - quick reference to all variables, functions and classes in all project files
- Instant creation of functions and classes + variable re-inserting routine
- Advanced control of saved and changed/unsaved project files
- Automatic backup of saved files (if allowed in "Options")
- User support - you can use always find new versions of this tool at
problems, BUGs and features on dedicated forum or request additional help
and/or information writing to firstname.lastname@example.org
These features, like many others, are planned for future development.
- Run under operating systems other than Windows. There are plans for Linux version in close future.
- Debug PHP scripts
- Connect to FTP servers
DPHPEdit will remain in constant phase of development and improvement as long as users have enough
imagination to request additional features.
You need (for existing version):
DPHPEdit will of course run without last three things, but then project and files can not be previewed
from it's IDE. You can use any alternative web browser if you are not going to use integrated web page
- Microsoft(tm) Windows(r) Operating System
- Internet Explorer - if using internal web page previewer
- Some local installation of Web Server supporting PHP (for example Apache)
- PHP interpreter properly configured in conjunction with Local Web Server
So far - Nothing. It is free. You can go and download it from
DPHPEdit is basically FREE. However, its author (me) could spend more time improving
it and adding more features if helped by small donation from users.
So, to help DPHPEdit grow, please send me
You can send your donation to next address:
- $10 if you use it
- $20 if you LIKE it
- $30 if you wouldn't like to be without it. :)
Thank you! :)
OK, I know that this usually makes many potential users angry, but in this "Unstable-OS"-driven world,
it simply needs to be written.
Although each version of DPHPEdit is extensively tested by it's author and many users worldwide, the author
can not take responsibility for any local damages or data losses which may accidentaly appear on user's
computer/filesystem for unknown reasons during usage of DPHPEdit.
DPHPEdit was written using Borland's Delphi extended with some additional commercial and freeware
(OpenSource) components and it relies on many (Windows) system functions and modules
like Internet Explorer API. Therefore, any such system module that is (unfortunately) beyond single
programmer's control could cause errors which can bring the system down and damage user data. Although it
has never happened to me (and I have never received any user complaints about such cases), please don't
blame me if exactly you become the lucky one.
There is no (yet) special installation routine for installing DPHPEdit, because it requires only
two (one) files to function properly.
To install DPHPEdit, simply place EXE file (DPHPEdit.exe), and DAT files (php*.dat) in any suitable
directory of your hard drive.
To make this help file (dphpman.html) accessible from IDE, place it in the same folder. Then, create
any desired shortcuts and icons to access it quickly and comfortably.
As soon as you start it for the first time, DPHPEdit will create two working files, DPHPEdit.INI and
DPHPEdit.HIS. If related option is set, it will create backups of any files changed in editor and store
them in the same folder as original file.
DPHPEdit will automatically use system registry key "HKEY_CURRENT_USER/Software/DPHPEdit"
to store some common settings.
System Options should be distinguished from Project Properties.
Although in relation to the last one, System Options are common options which shape global DPHPEdit behaviour.
Individual project options (like path and URL) must be set under Project Properties.
To access System Options at any time, use main menu "Tools/Options".
System Options are divided in three sections: "General", "Editor", "PHP Special" and "PHP/HTML Syntax Coloring".
Changes to System Options become valid as soon as you close the dialogue pressing "OK" button.
Press Cancel button to avoid unwanted changes to system options.
- General - use this page to set up project handling and preview options
- Project Handling
- Open Last Used Project On Startup - setting this options tells DPHPEdit to
open last project you were editing when you start it. Otherwise DPHPEdit starts
with no active project
- Accept Project File Name as Parameter - DPHPEdit can load a project whose name
is sent to DPHPEdit.exe as a parameter; this allows association of "DPHP" file type
with DPHPEdit.exe to enable opening DPHP project via OS shell double-click
- Create Backup of Saved Files - if set, DPHPEdit will make a copy of saved file,
adding '~' to it's extension so that the file can be recovered if something goes
wrong during save or if you simply want to recover prior version
- Site/Page viewer
- Internal or External - specifies which previewer to use; DPHPEdit includes internal
IE-compatible Web Page Previewer. If you want to use an external previewer, you must
specify its executable with a full path (you can use "browse" button next to the external
previewer name which appears when you set "External" option), for example
"C:\Program Files\Internet Explorer\IEXPLORE.EXE"
- Preview Single Files - if this option is set, pressing Ctrl+F9 or starting single
file preview will load a physical file (for example "C:\myprojects\myweb\page1.html")
- Warning on "Save Files" Before Preview - when starting a preview, changed files
(only active one for a single file preview) must be saved; this option tells DPHPEdit
to display warning about saving files before starting a preview
- Editor - integrated editor properties do not require much explanation, right? ;)
You can set fonts, colors and other advanced editor options on this page, and yet set two
Special Editor Functions:
- Completion Proposal - pressing Ctrl+Space will show you the list
of common PHP Keywords and Functions to let you insert them
by pressing 'enter' key, rather than typing whole word
- Auto Complete - if you type in a part of code, for example "class" or "function", or start
marker for code segment and press Shift+Space, a part of code will be
completed (if defined)
Keyword and Function lists used for auto completion are stored inside two .DAT files, "phpkw.dat" and "phpfu.dat".
Structures for auto completion are stored inside "phpac.dat" file. These files can be manually edited
to suite everyone's needs.
- PHP Special
- Show "PHP Variables" when '$' key pressed in Editor - When you press '$' key in editor
and this option is active, DPHPEdit will display "PHP Variables"
dialogue; this only works while editing PHP-type files (INC, PHP and without extension
if next options is set)
- Handle Undefined File Types as PHP by Default - if a file has no extension, it will be
treated as PHP script by default when this option is set, and therefore properly highlighted;
useful for some UNIX and other systems which "don't like" file extensions
- Use Custom Highlighting for PHP File Types - if you check this option, you will get
editable Keywords and Functions list. These keywords and functions will be highlighted
in PHP type files. Please note that custom highlighting is not so accurate as typical
PHP highlighting method.
- PHP/HTML Syntax Coloring -
Use options on this page to set color attributes for PHP/HTML Syntax coloring. These attributes are used
for HTML and PHP file types and DPHPEdit will try to colorize all possible recognized segments using
always surround all code segments with appropriate markers (like HTML and PHP start/end markers).
DPHPEdit is available in four languages from version 1.03: English, Croatian, French and German.
To change IDE language, click "Tools/Language" and choose wanted language.
Selected language remains active until changed again.
Handling Projects and Files
To create a new project in DHPHEdit, simply click "File", then "New Project" or similar button on program's toolbar.
"Project Options" dialogue will be displayed immediately, and default project name will be assigned.
After a project has been created, you should first set it's properties.
Active project's name is displayed in application's window title (together with information if project has been recently changed),
and above project tree (upper left panel), where contained files are listed.
A new project does not contain any files in project tree.
After creation, you should save your new project using Save command ("File/Save"). You can use any filename allowed by your OS file system,
but file extension must be DPHP. Project can later be saved under some other file name using "Save Project As" function.
To save project after some change (adding/removing files, changing properties), click on project name in project tree,
then use "Save" command or press "Save" button. Saving project does not automatically save all changed files.
To save all files and project file at once, use "File/Save All" command.
You can access "Project Properties" dialogue by selecting "File/Project Properties" in main menu,
or clicking the button above project tree. You can then enter following information:
- Project Name: This is the descriptive name of your project.
It can be different from project's physical file name, and will be displayed in EPHPEdit window title.
When you click on project name in project tree, physical project file name and path are displayed in DPHPEdit's status bar.
- Description: Whatever you want to closely describe your project.
- Project Path: Default location of your project physical file and (optionaly) location of
files included in project.
- Server URL: This is an URL used to preview your project or single files.
There are two kinds of project URLs: Server URL
(relative to local or remote server) or Local Path.
Server URL is URL address whch points to some relative location of a Web Server (Apache or similar)
on which your project is located (for example: http://localhost/myapps).
DPHPEdit's behavior when previewing files or running projects depends on both this option and
settings under "Tools/Options/General"-"Site/Page Viewer" options.
- Leave this URL "As-Is" checkbox: DPHPEdit will try to force correct URL syntax adding
"http://" and some other things to your URL unless you check this option. Checking this option will
tell DPHPEdit that you want URL to remain just as you entered it. This option is extremely useful if
you want some parameters to be passed to your site via URL (for example "http://localhost/myapps/index.php?username=dummy")
or if you want to preview your project from a physical path on your computer (for example "C:/webapps/myapp/index.html").
Please keep in mind that PHP files will only be interpreted if you access project files through your Server URL!
To open existing project, use main menu's "File/Open Project", or similar toolbar button.
You will be asked to save any changed files in eventualy changed active project.
Choose project's physical file name (*.dphp) in "Open Project" dialogue and click "Open". Project will be loaded and
project files filled into project tree. If you try to open non-dphp or invalid project file, error message will be
Following that DPHPEdit accepts file name as a parameter, you can also open project by double clicking it's file name
if *.DPHP file type has been associated with DPHPEdit. Associating file types is dependable on operating sytem under
which DPHPEdit is being used.
A project can also be opened via File Browser (downer left panel) - simply double click file name (for example "myproject.dphp")
in File Browser.
It is allowed to drag project file from Windows Explorer or similar program and drop it to DPHPEdit window.
Recently used projects can be opened using "File/Reopen" menu command. Any once opened project will appear in that submenu
for possible reopening.
There is no real need to close a project, as active project is closed when you close DPHPEdit
or before opening another project.
However, if you want to close active project while leaving DPHPEdit running,
you can do that using "File/Close Project" command.
Closing project brings up "Save Changed Files" dialogue, which displays a list of all changed files, including
project file. File name and path are displayed for each file in the project. A mark beside file name tells
DPHPEdit whether to save changes or not for each file. Check out files you do not want to save, and contrary.
You can check/uncheck all files using "All" and "None" buttons. Press "OK" to save checked files or "Cancel"
to cancel your opening/exiting operation.
Project file will appear as changed each time you change something in "Project Properties", or you add/remove
files in project tree.
You can either add existing files or create new files inside your project.
To add existing file(s):
submenu options. To create undefined file (file type will be determined when you save the file), use "Undefined" option.
You can quickly create new files using toolbar buttons.
- Use main menu "File/Add File to Project" command or similar button above project tree
- Double click file name in File Browser
- Drag and drop file into DPHPEdit window - there must be a project active
To remove file(s) from your project, simply click it in project tree and use "File/Remove File from Project" or
similar button above project tree. You will be asked to save the file if it has been changed.
As you add a file to the project, it will be placed at the end of file list. However, to arrange
files in the list you can move them up and down using appropriate buttons in Project Manager pane.
To save changes done to particular file (or a project itself), click it's name in project tree
and then "File/Save" or "Save" button on toolbar. If the file has not yet been saved (if it is new),
"Save File" dialogue appears.
It is possible to choose file format before saving the file. DPHPEdit supports both Windows
(CR/LF) and Unix/Linux (LF, LF/CR) line breaks from version 1.03. To set file format for file in
the project, use "File/Format" from main menu.
Names of changed files are displayed bold in project tree.
To save all changed files (including project file), use "File/Save All" command.
DPHPEdit will create backups of saved files if so ordered in "Options"; files are copied and
their extension added an '~' sign. In case of failure of any kind, these files can be used to recover
version of file before last save.
To print active editor file, use "File/Print" or "Print" button on editor toolbar.
In print dialogue which appears you can:
- set up the printer
- choose to print a selection
- choose text wrapping options
- decide whether to print in colors or not
- set up margins
To run (preview) a project, press "Run/Run" in main menu, or "lightning" button on the toolbar, or
press F9 key. Program will start a browser specified in System Options and start project site
based either on project URL or project path. Default document (index.*) will be loaded unless
something else is specified in project URL and left "As-Is".
While previewing in integrated previewer, last accessed URL is displayed in address bar.
See Setting System Options for details on setting up project preview options.
Before starting project preview (Run), DPHPEdit will attempt to save all changed and unsaved files.
To preview a single project file, first click the file in project tree, then choose "Run/Preview Current File"
in main menu, or press similar button on the toolbar, or press Ctrl+F9. Pressing Ctrl+F9 while editing
file previews that file automatically. The file will be saved before preview. Preview happens in browser
which is specified in System Options. See Setting System Options for details on
setting up single file preview options.
While previewing in integrated previewer, last accessed URL is displayed in address bar.
You can not preview PHP scripts if they are not accessed through Local Web Server URL!
|Delete Last Word||Ctrl+BackSpace|
|Delete to End of Line||Shift+Ctrl+Y|
|Go to Line Number||Ctrl+G|
|Change Word to UpperCase||Ctrl+Alt+U|
|Change Word to LowerCase||Ctrl+Alt+L|
|Insert PHP Variable|
(if enabled in Options)
|Invoke Code Explorer||Ctrl+E|
|Invoke Completion Proposal||Ctrl+Space|
|Preview Active File||Ctrl+F9|
Although appropriate syntax highlighting method is choosen for currently edited file according
to it's type, you can change it manually from drop-down list in editor toolbar.
For more information on syntax highlihting options, see System Options.
To insert variable, function or class while editing PHP script, click the editor with right mouse
button (or editor toolbar "Insert" button), select "Insert" and then "Variable", "Function", or "Class"
to insert any of these into source code.
If a specific option is set in System Options, if you press '$' key while editing
PHP file, a "PHP Variables" dialogue will appear displaying all variables found in edited file. In this
dialogue you can type in variable name (without '$') or select it in a list and press "Insert" to insert
it into edited file.
This option is useful to save time needed for writing long variable names. It also treats class properties
and methods properly.
To locate a function or class definition while editing PHP script, click the editor with right mouse
button (or editor toolbar "Functions" or "Classes" buttons), select "Functions" or "Classes"; in a
list, double-click function or class to locate in source code.
Code Explorer is a powerful tool which reads all your project files and finds PHP variables (must start with
Each file is shown with a list of items found; expanding function (or either) item displays source code
lines where it appears. Double-click source line to go directly to source code line where it appears.
To start Code Explorer, click "View/Code Explorer" in main menu, or click a button above project tree, or
press Ctrl+E. Also accessible via editor popup-menu (right mouse button).
/EOF/ (Copyright (c) 2002 by Davor Pleskina)