Try renaming the original Sample.html to Sample.php

-----Original Message-----
From: web400-bounces@xxxxxxxxxxxx [mailto:web400-bounces@xxxxxxxxxxxx]
On Behalf Of Shannon ODonnell
Sent: Monday, February 02, 2009 4:16 PM
To: 'Web Enabling the AS400 / iSeries'
Subject: [WEB400] PHP On iSeries - Sample HTML not working

Hi,



I'm playing with Zend's PHP for i5 OS (just got it installed and going
through various samples, tests, tc.).



One thing I wanted to try was mixing PHP with HTML so I created this
html file and named it Sample.html



<html>

<head><title>Standard HTML Page with PHP

HelloWorld</title>

<body>

<h1>The text below will be generated by PHP</h1>

<br><br>

<?PHP

print "Hello World";

print "<br> Generated with <b>PHP</b>";

?>

</body>

</html>





And uploaded it to the proper IFS directory.



I also modified my HTTP config file for this instance so that html files
will be treated as PHP files:





AddType application/x-httpd.php .html

AddType application/x-httpd.php .htm





When I run it, I can see the "The text below will be generated by PHP",
but not the actual "Hellow World" and "Generated PHP" text itself which
would have been created by php.





Anyone familiar enough with PHP on the iSeries to explain to me why the
php code does not execute? Actually, it appears like it is trying to
execute, but then doesn't, but not 100% sure about that.



By the way, if I remove all the HTML code and save this as a type .php
file, then it runs fine.



Thanks,







Shannon O'Donnell





--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list To
post a message email: WEB400@xxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.