Entry
TSE: Language: Computer: Compile: PHP: How to run PHP from TSE v2.x, 3.x, 4.x?
Mar 18th, 2005 12:18
Knud van Eeden,
----------------------------------------------------------------------
--- Knud van Eeden --- 19 February 2002 - 09:16 pm -------------------
TSE: Language: Computer: Compile: PHP: How to run PHP from TSE v2.x,
3.x, 4.x?
---
Steps: Overview:
1. -Make sure you have PHP installed, so that e.g. php.exe can be
found on your computer
e.g.
goto URL:
http://www.zend.com
2. -Make sure your web server runs
3. -Create a batchfile
e.g.
comPHP.bat
containing this text
(adapt it to your system) and store this batchfile in your TSE
directory (e.g. save to c:\mytsedirectory\comphp.bat)
--- cut here: begin --------------------------------------------------
@REM if you use Apache:
@COPY %3 "c:\Program Files\Apache Group\Apache2\htdocs\%1.php"
@start http://localhost\%1.php
@pause
@exit
--- cut here: end ----------------------------------------------------
4. -If you should have PHP installed on your Microsoft Internet
Information Server (IIS), you could instead run your .php pages
via your browser, and use this batch file instead:
--- cut here: begin --------------------------------------------------
@REM if you use Microsoft Internet Information Server (IIS):
@copy %3 c:\inetpub\wwwroot\%1.php
@start http://localhost\%1.php
@pause
@exit
--- cut here: end ----------------------------------------------------
5. -Adapt the compiler information
(in TSE, after loading any file, press <SHIFT><F9>
then 'D' for debug compiler setup
then <ALT><C> to copy one of the compiler settings present
then change the fields:
'Extension' to: .php
'Description' to: PHP
'Command' to: c:\mytsedirectory\comphp.bat &name& &ext& &fn& >
&output&
make sure this information is permanently stored in the compiler
information (via <ENTER>, then <ESCAPE>)
6. -If you now load a .php file, fill in some program code for php,
for example type or copy this text in a file 'mytest.php'
--- cut here: begin --------------------------------------------------
<HTML>
<BODY>
<?php echo( "Hello World" ); ?>
</BODY>
</HTML>
--- cut here: end ----------------------------------------------------
save that text in your TSE directory,
then press <CTRL><F9> or <ESCAPE><M><C> to compile, this will run
that
batch file, which redirects your file into php.exe, then redirects
the
created output to a .htm file, and start your browser, so you can
see that html file in your browser.
---
---
Internet: see also:
---
Computer: Wordprocessor: TSE: Language: Computer: Compile: Run:
Overview
http://www.faqts.com/knowledge_base/view.phtml/aid/24311/fid/895
---
PHP: Install: How to install PHP on Microsoft Internet Information
Server (IIS)?
http://www.faqts.com/knowledge_base/view.phtml/aid/28265/fid/51
----------------------------------------------------------------------