f



I need to create html files from php files using php

I am very new to PHP, although I have been using ASP for a few years.

I use a product in ASP called ASPTear, it's a small dll that my
hosting company happens to have loaded.

Basically you can set up a function that you can pass an ASP page to
and it will read the ASP and write out an HTML file.

I use this to save load on the server and speed up my site, I have a
few include files that look up data and then present it, this data
does not change very often, so I run a routine called rebuildhtml.asp
that will call a few ASP files and create HTML versions.

I am now converting the site to PHP as I want to use mod_rewrite, what
I need is a routine that I can pass a php file to and end up with an
HTML version.

For example

rewrite(somefile.php)

Will create somefile.html

I am sure this can't be too difficult, but as a newbie I cannot find
out how to do it.

Any help appriciated.

Dennis
0
mcderd (4)
10/25/2004 5:39:35 PM
comp.lang.php 32646 articles. 0 followers. Post Follow

7 Replies
1813 Views

Similar Articles

[PageSpeed] 14

Dennis wrote:
> what
> I need is a routine that I can pass a php file to and end up with an
> HTML version.
>
> For example
>
> rewrite(somefile.php)


    http://www.php.net/ob_start


Happy Coding :-)
-- 
USENET would be a better place if everybody read:    | to  mail  me:  simply |
http://www.catb.org/~esr/faqs/smart-questions.html   | "reply" to this post, |
http://www.netmeister.org/news/learn2quote2.html     | *NO* MIME, plain text |
http://www.expita.com/nomime.html                    | and *NO* attachments. |
0
hexkid2 (1017)
10/25/2004 7:17:06 PM
Dennis wrote:

> I am now converting the site to PHP as I want to use mod_rewrite, what
> I need is a routine that I can pass a php file to and end up with an
> HTML version.

I don't know a routine but a program that does what you want. It's
called php.exe. ;-)

php.exe -q filename.php > filename.html

This command will create the HTML page which the script would create
when it is run on a server. But that would make the page static.

The whole point of server side scripting is to have dynamic pages that
can change with user input, database content, etc., so I don't think
making your pages static is a really good idea. Except if the server is
heavily accessed and the content of your pages don't change too often.
Then making everything static might make sense to reduce server load.

Bye!
0
10/25/2004 11:19:39 PM
Thanks Pedro,

That looks promising !

Dennis

Pedro Graca <hexkid@hotpop.com> wrote in message news:<slrncnqihh.oe1.hexkid@ID-203069.user.uni-berlin.de>...
> Dennis wrote:
> > what
> > I need is a routine that I can pass a php file to and end up with an
> > HTML version.
> >
> > For example
> >
> > rewrite(somefile.php)
> 
> 
>     http://www.php.net/ob_start
> 
> 
> Happy Coding :-)
0
mcderd (4)
10/26/2004 9:19:06 AM
Thanks for your response.

It is only a few include files that I want to turn static each time
their content changes, perhaps a couple of times a week, but each of
these pages makes database calls, so if I leave them dynamic the
system will be repeatedly making demands on the database for every
page on my site as some of these includes are in the header.

I need to be able to do this from within a php page rather than from
the command line, so Pedro's solution seems to fit.

Dennis

Anonymous <anonymous@nowhere.invalid> wrote in message news:<417D8A0B.F9ACC726@nowhere.invalid>...
> Dennis wrote:
> 
> > I am now converting the site to PHP as I want to use mod_rewrite, what
> > I need is a routine that I can pass a php file to and end up with an
> > HTML version.
> 
> I don't know a routine but a program that does what you want. It's
> called php.exe. ;-)
> 
> php.exe -q filename.php > filename.html
> 
> This command will create the HTML page which the script would create
> when it is run on a server. But that would make the page static.
> 
> The whole point of server side scripting is to have dynamic pages that
> can change with user input, database content, etc., so I don't think
> making your pages static is a really good idea. Except if the server is
> heavily accessed and the content of your pages don't change too often.
> Then making everything static might make sense to reduce server load.
> 
> Bye!
0
mcderd (4)
10/26/2004 9:22:56 AM
Thanks for your help:

I now have the following:

<?php
function buildhtml($strphpfile, $strhtmlfile) {

echo "Building ".$strhtmlfile."<br>";

// start buffering the output
ob_start();

include($strphpfile);

// write to a file
$data = ob_get_contents();
$fp = fopen ($strhtmlfile, "w");
fwrite($fp, $data);
fclose($fp);
ob_end_clean();
}

// make calls to the buildhtml function here, giving input and output filenames
buildhtml("index.php","index.html");
?>

It works great !

Thanks again

Dennis
0
mcderd (4)
10/26/2004 10:28:52 PM
Dennis wrote:
[snip]
> It works great !

Well done, Dennis! :)

> Thanks again

You're welcome.
-- 
USENET would be a better place if everybody read:    | to  mail  me:  simply |
http://www.catb.org/~esr/faqs/smart-questions.html   | "reply" to this post, |
http://www.netmeister.org/news/learn2quote2.html     | *NO* MIME, plain text |
http://www.expita.com/nomime.html                    | and *NO* attachments. |
0
hexkid2 (1017)
10/26/2004 11:53:51 PM
Dennis wrote:
> 
> Thanks for your response.
> 
> It is only a few include files that I want to turn static each time
> their content changes, perhaps a couple of times a week, but each of
> these pages makes database calls, so if I leave them dynamic the
> system will be repeatedly making demands on the database for every
> page on my site as some of these includes are in the header.

That's correct. But you are aware that database changes are not going to
be reflected on the website until the HTML files are recreated?

> I need to be able to do this from within a php page rather than from
> the command line, so Pedro's solution seems to fit.

You do know that you can execute external programs within a PHP script
using exec(), don't you? :-)

But any solution that works is a good solution.

Bye!
0
10/27/2004 9:51:44 AM
Reply:

Similar Artilces:

PHP does not parse .PHP files
I have this problem with PHP that someone might be able to help. With CLI, I am able to execute my .php files. For example, if I type "php phpinfo.php" , this works fine on my system. If I put the phpinfo.php file is in /var/www/html and I try to access it through the browser, I get the content of the file and not the execution of the file. Instead of display the info of PHP, I got the text of the file as: <?php phpinfo(); ?> Why? Thanks Phong Ho wrote: >I have this problem with PHP that someone might be able to help. > >With CLI, I am able to execute my .php files. For example, if I type >"php phpinfo.php" , this works fine on my system. > >If I put the phpinfo.php file is in /var/www/html and I try to access >it through the browser, I get the content of the file and not the >execution of the file. Instead of display the info of PHP, I got the >text of the file as: > ><?php > phpinfo(); >?> > > >Why? >Thanks Do you have a webserver such as Apache running on the machine where you expect this to happen? Because it's the webserver, not the browser, that needs to know about php. The browser only does html. Margaret -- (To mail me, please change .not.invalid to .net, first. Apologies for the inconvenience.) "Phong Ho" wrote: > I have this problem with PHP that someone might be able to help. > > With CLI, I am able to execute my .php files. For exam...

want to get content of one php file in another php file
i have one php file having content Contents of ex1.php file <body> <?php $content = "c://webserver/www/abc.php"; $handle = fopen($content, "r"); echo fread($handle,filesize($content)); ?> </body> this is reading abc.php file in which i m simply using an echo statement. When i execute ex1.php file i cant see the php statement of abc.php file content of abc.php file is <?php echo "hello";?> sarika wrote: > i have one php file having content > > Contents of ex1.php file > <body> > <?php > $content = "c://webserver/www/abc.php"; > $handle = fopen($content, "r"); > echo fread($handle,filesize($content)); > ?> > </body> > this is reading abc.php file in which i m simply using an echo > statement. When i execute ex1.php file i cant see the php statement of > abc.php file > > content of abc.php file is > <?php echo "hello";?> That's interesting, I've found out that it's the browser that's hiding <?php ?> tags within .phpx pages. Probably to avoid short tags scripts (on a server that doesn't allow them) from getting leaked by visitors who don't know about this browser trick, until the dev' realizes his error. Not a good thing, IMO; dev's should take care, themselves, and it's still not secure since the hidden string is still in the rendered source. And now we don't know how ...

Open .php file with PHP Designer 2007 by clicking the file in XP
In windows XP, I want to be able to click on a .php file and have it opened in PHP Designer 2007, Or right-click on it and have an "edit" menu option presented to me. I know how to tweak the registry to do this in general, but what would the command line look like in this specific case ? PHP Designer does not do this automatically. It is as if the program does not allow commandline options. It only opens with the last file used or a menu of recently opened files. ...

Is a PHP variable supposed to be seen in a .js file included into a .php file
Is a PHP variable supposed to be seen in a .js file included into a .php file? I have a client side javascript code stored in a .js file which is included into a PHP file using <script src="filename.js></script> This code initialises a Javascript variable var u="string"; The string is supposed to be the value of $HTTP_HOST So, when initialise this variable like var u=<? echo $HTTP_HOST;?>; I sterted getting a javascript message Syntax Error Am I doing something wrong, or PHP variables are not seen in included js files? aa wrote: > Is a PHP variable supposed to be seen in a .js file included into a .php > file? > > I have a client side javascript code stored in a .js file which is included > into a PHP file using > <script src="filename.js></script> > > This code initialises a Javascript variable > var u="string"; > > The string is supposed to be the value of $HTTP_HOST > > So, when initialise this variable like > > var u=<? echo $HTTP_HOST;?>; > > I sterted getting a javascript message Syntax Error > > Am I doing something wrong, or PHP variables are not seen in included js > files? js files are not parsed for PHP code unless you specifically tell the webserver to do so. Therefore, "var u=<? echo $HTTP_HOST;?>;" in the .js will error since the browser doesn't know what to do. -- Justin Koivisto - spam@koiv...

SSI Including PHP File Within PHP File Causes Seg Fault and Crash
Can somebody concur or verify the following? I'm having this problem on all of my installations. I've got Apache 2.0.40 and PHP 4.2.2 installed and configured from RedHat RPMs. Nothing out of the ordinary. In the httpd.conf file, PHP files are called with the following: <Files *.php> SetOutputFilter PHP;INCLUDES SetInputFilter PHP LimitRequestBody 524288 </Files> I create two files as follows: /test1.php <!--#include virtaul="/test2.php" --> and /test2.php Testing 1 2 3 By going to http://host/test1.php, it may or may not display the fi...

how do you create a file using php?
hey all - i=B4m new to php and having trouble writing a simple code which should create a file. here is the most simplified version: <?php $content =3D "my content"; $path =3D "test.txt"; if(!chmod($path, 0744)) { echo "error, $path"; exit; } else { $file =3D fopen($path, "w+"); } if(fwrite($file, $content)) echo "writing=3DOk"; else echo "writing=3DError"; fclose($file); ?> if test.txt exists the code works perfect. but if there isn't already a test.txt file it gives this error: Warning: chmod() [function.chmod]: No such file or directory in /home/ littlesc/public_html/bms/simple.php on line 4 error, test.txt I assume this is a permission thing but my permission for the directory is set to 755 - this should be ok right? Just to be clear and a bit redundant: I want to use php to create a new file. if you look at the php manual it says: w : Open for writing only; place the file pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it. the key sentence being the last one - "if the file doesn=B4t exist, attempt to create it". Also in my search i=B4ve seen several other tutorials that, if i understood them correctly, used fopen in this way to create a file... (though i can=B4t get them to work either) - maybe i missing something. if not fopen, is there some...

Parsing a php include (which also contains php code)
Hello, I am using the <?php include() ?> statement on my website for organizational purposes. However, one of my includes contains some PHP code. Is there any way for the server to actually parse the include? I've tried this before, and it did not parse the include. Rather, it included the file as just plain ASCII. ======================= /*EXAMPLE 1*/ /*index.php*/ .... <?php include('global/includes/footer.inc') ?> .... /*footer.inc*/ .... <p>&copy 1993-<?php echo date("Y") ?> Kingswood School. All rights reserved.</p> .... /*EXAMPLE 2*/ /*index.php*/ .... <?php include('global/includes/lastmod.php') ?> .... /*lastmod.php*/ .... <?php echo "This file was last modified: "; echo strftime("%A %B %d %Y"); include('whateverfilename.inc'); ?> ============================= I would like to be able to parse the include if it has php code, and in some cases, create nesting includes (an include within an include). Is this even possible? Any ideas? Any help is certainly appreciated. Thanks! Steven Borrelli Web Developer Kingswood School Steven Borrelli wrote: > Hello, > > I am using the <?php include() ?> statement on my website for > organizational purposes. However, one of my includes contains some > PHP code. Is there any way for the server to actually parse the > include? I've tried this before, and it did not parse the in...

Modify a php file(model) with php
I have an invoice model on my server! and i want to replace some field(like adresse, phone, price, VAT, ....) do you know a tools or class that allows those kind of manipulations Thanks you Yoni Yoni Alhadeff a �crit : > I have an invoice model on my server! and i want to replace some field(like > adresse, phone, price, VAT, ....) > > do you know a tools or class that allows those kind of manipulations > > Thanks you > > Yoni > > Couldn't you replace field with var and have them set when including your template (it become one in fact) ? I didn't understand good! I'm french speaker :p how can i replace field by var ? with a pdf that I make once at home! in my pdf i have line like this Adress: [Adr] Phone : [Tel] Number: [NBR] Article: [Article] And u want to replace the field under bracket! Thanks you Yoni "manu" <manu@netou.com> a �crit dans le message de news: 420e01ef$0$617$636a15ce@news.free.fr... > Yoni Alhadeff a �crit : > > I have an invoice model on my server! and i want to replace some field(like > > adresse, phone, price, VAT, ....) > > > > do you know a tools or class that allows those kind of manipulations > > > > Thanks you > > > > Yoni > > > > > Couldn't you replace field with var and have them set when including > your template (it become one in fact) ? ...

How to invoke remote php file from php?
Hi, I have a local php file and I need to get info back from php file on the server. How do I invoke remote a php? I can access this remote php thru a simple url and it prints some info on the web page. How do I get this info back to store as a variable in local php? Regards, Alex. Alex wrote: > Hi, I have a local php file and I need to get info back from php file > on the server. How do I invoke remote a php? I can access this remote > php thru a simple url and it prints some info on the web page. How do I > get this info back to store as a variable in local php? > > Regards, > Alex. > See example 16-11 here: http://www.php.net/manual/en/function.include.php Alex wrote: > > I have a local php file and I need to get info back from php file > on the server. How do I invoke remote a php? I can access this remote > php thru a simple url and it prints some info on the web page. How do I > get this info back to store as a variable in local php? $info = file_get_contents('http://remoteserver.com/script.php'); Cheers, NC Carl & NC, Thank you very much!!! Both examples work great. Not precisely sure what you mean, something simple like this might do what you want: $contents = file_get_contents('http://www.site.com/alexs_page.php?param=1&id=2'); NC wrote: > Alex wrote: > >>I have a local php file and I need to get info back from php file >>on the server. How do I invoke remote a php? I...

PHP using php var in html
Please help! What is going wrong? $mystring= "part1 part2 part3" // remark the spaces! ..... <td > <input type="text" name="test" size="50" value=<?echo ($mystring);?>> </td> ....... the text field will only show "part1" and not the rest of the string! *** Freak wrote/escribi� (Wed, 06 Oct 2004 14:35:35 GMT): > $mystring= "part1 part2 part3" // remark the spaces! > <input type="text" name="test" size="50" value=<?echo ($mystring);?>> As any basic HTML manual will tell you, you need to use quotes to surround the value of attributes. It's recommended when there aren't spaces, and compulsory when there are. ;-) -- -- �lvaro G. Vicario - Burgos, Spain -- Thank you for not e-mailing me your questions -- Thanks "Alvaro G Vicario" <alvaro_QUITAR_REMOVE@telecomputeronline.com> wrote in message news:1ojp5hfnxfqe6.sxrxxbqwspwb.dlg@40tude.net... > *** Freak wrote/escribi� (Wed, 06 Oct 2004 14:35:35 GMT): > > $mystring= "part1 part2 part3" // remark the spaces! > > <input type="text" name="test" size="50" value=<?echo ($mystring);?>> > > As any basic HTML manual will tell you, you need to use quotes to surround > the value of attributes. It's recommended when there aren't spaces, and > compulsory when there are. ;-) > > > --...

php assembly of multiple php files
I am trying to combine multiple php pages into 1. Basically I have created a shell page and then a seperate php file for each form to be included within the shell. The problem I am having is that when a user submits one of the forms the main shell and the other php files POST values are all returned as NULL and I only get the values pertaining to the form that was submitted?. If all the files were combined into one very long php file, I would get all the POSTs returned how can I do the same but with multiple files? When you submit an include, do the POST values not get passed back to the Main calling page? Thank you, QB Question Boy wrote: > I am trying to combine multiple php pages into 1. > > Basically I have created a shell page and then a seperate php file for > each form to be included within the shell. > > The problem I am having is that when a user submits one of the forms > the main shell and the other php files POST values are all returned as > NULL and I only get the values pertaining to the form that was > submitted?. If all the files were combined into one very long php > file, I would get all the POSTs returned how can I do the same but > with multiple files? > > When you submit an include, do the POST values not get passed back to > the Main calling page? > > Thank you, > > QB This has nothing to do with PHP - it's how HTML works. The browser will only send the data for the form being subm...

Quoting PHP code in a .php file???
I am new to PHP and I want to quote the followong content into a Web page <html> <head><title>Connect Server</title></head> <body> <? $link = mysql_connect("localhost",$_POST['username'],$_POST['password'])or die("Connect Error: ".mysql_error()); print "Successfully connected.\n"; mysql_close($link); ?> </body> </html> The Web page is generated by a xxx.php file and what I want to be q quote is executed rather than displayed. I have tried to surround it with block formatting HTML elements such as <blockquote> or <pre> but the PHP code surrounded by "<?" and "?>" always get executed and throws errors. How can I simply quote it and display it on the page? Thank yoy Georges Georges Trottier wrote [edited]: > How can I simply quote and display [HTML with PHP code] on the page? How do you get the contents you're trying to display? Try these: http://www.php.net/htmlentities http://www.php.net/highlight_file -- Mail to my "From:" address is readable by all at http://www.dodgeit.com/ == ** ## !! ------------------------------------------------ !! ## ** == TEXT-ONLY mail to the whole "Reply-To:" address ("My Name" <my@address>) may bypass my spam filter. If it does, I may reply from another address! Georges Trottier wrote: > <html> > <head><title>Connect Serve...

When does the php interpreter loads the php file?
Hi All, I'm wondering three facts about php, apache and apache module. 1.How can i differentiate the php intepreter if it's running as a apache module or as cgi? 2.When does the php interpretor loads the php file to main memory? 3.and till when it keeps the php file on memory? - in my experience only after installing Zend it caches the php file. Thak you *** Kim Gijung wrote/escribi� (20 Oct 2004 00:03:35 -0700): > 1.How can i differentiate the php intepreter if it's running as a > apache module or as cgi? If I recall correctly phpinfo() calls it "Server API". > 2.When does the php interpretor loads the php file to main memory? In a web page, when the file is requested. In a command line script, when the file is executed. > 3.and till when it keeps the php file on memory? Until the execution ends. > - in my experience only after installing Zend it caches the php > file. Right, if you aren't using a cache the file is not cached. -- -- �lvaro G. Vicario - Burgos, Spain -- Thank you for not e-mailing me your questions -- ...

can i create .exe file of my .php file
is there any way using which i can create .exe file of my php files. actually i am putting my php files on a web server and i don't want my files to be copied and modified by someone else/even not by administrator of web server. if i am putting php files then administrator has right to copy file and he may modify it as per his requirements.. if i put exe file then he can't modify file. if there is any other alternative to solve this problem then let me know. In a binary format similar to .exe, yes. Zend makes an encoder to go along with their long list of PHP products: http://www.zend.com/store/products/zend-encoder.php > is there any way using which i can create .exe file of my php files. vishal wrote: > is there any way using which i can create .exe file of my php files. > > actually i am putting my php files on a web server and i don't want my > files to be copied and modified by someone else/even not by > administrator of web server. > > if i am putting php files then administrator has right to copy file and > he may modify it as per his requirements.. > > if i put exe file then he can't modify file. > > if there is any other alternative to solve this problem then let me > know. > http://www.priadoblender.com vishal wrote: > is there any way using which i can create .exe file of my php files. > > actually i am putting my php files on a web server and i don't want my > files to ...

including a PHP file displays the file's content to the user agent (PHP 5.1)
Hi all I'm having a strange problem when upgrading the content management system eZ publish from PHP 4.4 to PHP 5.1. Some cache files related to i18n are included with the "include" function, but they are being displayed to the user agent instead of being parsed by PHP. With PHP 4.4 there was no problem. You can download a test script from: http://blog.kristofcoomans.be/wp-content/uploads/test.tar Thanks for your help Cheers -- Kristof Cyberwolf wrote: > Hi all > > I'm having a strange problem when upgrading the content management > system eZ publish from PHP 4.4 to PHP 5.1. Some cache files related to > i18n are included with the "include" function, but they are being > displayed to the user agent instead of being parsed by PHP. With PHP > 4.4 there was no problem. > > You can download a test script from: > http://blog.kristofcoomans.be/wp-content/uploads/test.tar > > Thanks for your help > > Cheers > > -- > > Kristof Do any other php pages parse properly? If not, then it will most likely be a problem with your install and/or configuration. If you can parse some php pages, it might be worth checking your PHP 5 configuration, and then Apache's configuration if nothing jumps out at you in there. Is there any particular reason you chose to go with PHP 5? I have heard of lots of people having problems with it, which is why I stay away from it. Well, until I understand it a bit better...

Upgraded php, lost php file association
Hi, I just upgraded my php but ran into a problem. Never seen this before. Somehow it seems I lost php file association. When I do a http://localhost/something.php I get a prompt for dowload of a file. I went to folder options, and changed file associations so that ".php" is associated with php interpreter, but still get the same problem. I am missing someting obvious. Can someone help. Thanks. -- http://www.dbForumz.com/ This article was posted by author's request Articles individually checked for conformance to usenet standards Topic URL: http://www.dbForumz.com/PHP-Upgraded-lost-file-association-ftopict138694.html Visit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbForumz.com/eform.php?p=463590 Upgraded PHP from what version to what version? What OS? What webserver? The fact that your web server (Apache, I presume) is trying to download your ..php files instead of interpreting them points to an Apache problem, not a file association problem in Windows (I assume). You must check your Apache httpd.conf file and check that the 'LoadModule' entry is pointing to the right place. For php 4 I use LoadModule php4_module f:/php4/sapi/php4apache2.dll For php 5 I use LoadModule php5_module f:/php5/php5apache2.dll HTH. -- Tony Marston http://www.tonymarston.net "steve" <UseLinkToEmail@dbForumz.com> wrote in message news:411a4b58$1_2@news.athenanews.com... > Hi, > I just upgraded my php b...

have php create a new .html file on my server...
i have some data in a variable ($message) that is being emailed with the php's mail() function (an html email actually)...i'd like to also take that html data in the $message variable and have my script also make a new .html (with any random name) file on my server with that $message data, any easy way to do that? Cheers! On Jul 4, 11:33 pm, Kurrent <kurr...@gmail.com> wrote: > i have some data in a variable ($message) that is being emailed with > the php's mail() function (an html email actually)...i'd like to also > take that html data in the $message variable and have my script also > make a new .html (with any random name) file on my server with that > $message data, any easy way to do that? Cheers! Suppose you have the HTML you want to store in a variable called $html and you want to put it in a file called foo.html. Then you would do something like this: file_put_contents('foo.html', $html); On Jul 4, 9:41 pm, ZeldorBlat <zeldorb...@gmail.com> wrote: > On Jul 4, 11:33 pm, Kurrent <kurr...@gmail.com> wrote: > > > i have some data in a variable ($message) that is being emailed with > > the php's mail() function (an html email actually)...i'd like to also > > take that html data in the $message variable and have my script also > > make a new .html (with any random name) file on my server with that > > $message data, any easy way to do that? Cheers! > > Suppose ...

IIS could not find .php file, however it finds html files in the same dir
IIS could not find .php file, however it finds html files in the same dir..... http://localhost/test => the default.htm will be hit, no error http://localhost/test/test.php => 404 error not found( it exists in the dir) The security is set ok, something wrong with the php runtime?? Strange because my application on localhost/prog works smooth......... Can anybody help me? geronimi wrote: > IIS could not find .php file, however it finds html files in the same > dir..... > > http://localhost/test => the default.htm will be hit, no error > > http://localhost/test/test.php => 404 error not found( it exists in the > dir) > > The security is set ok, something wrong with the php runtime?? > Strange because my application on localhost/prog works smooth......... > > Can anybody help me? Hi, Your question boils down to "PHP isn't installed right". Many things could be causing this. Did you read and follow the online installationmanuals? You can find them here: http://nl3.php.net/manual/en/install.php Warning: Do not use the windowsinstaller, it will be difficult later on to add extensions. Do it by hand, it is maybe not easy for starters, but you'll have a better understanding of how PHP is integrated into IIS. By the way: In my experience the ISAPI version is stable for PHP5. (In PHP4 it had some issues) Regards, Erwin Moller Mmm, but it is strange that the rest of the prog on that iis is working ...

Why are my PHP files are not being executed (PHP keywords/syntax being ignored)
I have been hosting a website on the same server for roughly 2 years. The entire site is based on a group of PHP scripts. Today, without changing a thing, the server stopped recognizing all PHP keywords and syntax. When I use firefox, the page simply displays a text/plain version of my source code. When I use IE, the page loads as text/html, however, all lines of PHP code (between "<?" and "?>") are displayed as text. My assumption is that my host has stopped providing PHP extensions. Can anybody confirm this or give me another explanation? All help is greatly appreciated! -JR >I have been hosting a website on the same server for roughly 2 years. >The entire site is based on a group of PHP scripts. Today, without >changing a thing, the server stopped recognizing all PHP keywords and >syntax. When I use firefox, the page simply displays a text/plain >version of my source code. When I use IE, the page loads as text/html, >however, all lines of PHP code (between "<?" and "?>") are displayed as >text. > >My assumption is that my host has stopped providing PHP extensions. >Can anybody confirm this or give me another explanation? > >All help is greatly appreciated! Your files are not being treated as PHP, but as text. It is possible that the Apache directive to treat .php files as PHP got lost. (It's possible this was in one of YOUR .htaccess files, rather than the Apache config...

cron jobs in PHP admin to run a PHP file
I want to run a php script every day. The page goes to a directory and parses a file and adds data to the database. Where it says "command" in cron jobs I don't know what it is looking for? Can I put the name of my php file? This is what I have: Minute Hour Day Month Weekday Command 1 8 1-7 1-31 * myPage.php The reason I am asking is I don't have a clue what PHPadmin wants in the command box. All I want to do is run the php script. Thanks, janis JRough wrote: >I want to run a php script every day. The page goes to a directory > and > parses a file and adds data to the database. Where it says "command" > in cron jobs I don't know what it is looking for? Can I put the name > of my php file? > > This is what I have: > > Minute Hour Day Month Weekday Command > 1 8 1-7 1-31 > * myPage.php > > The reason I am asking is I don't have a clue what PHPadmin wants in > the command box. All I want to do is run the php script. > > Thanks, > janis usually you would put the path to the php interpreter followed by any required options followed by the script file name On May 27, 12:17 pm, JRough <jlro...@yahoo.com> wrote: > I want to run a php script every day. The page goes to a directory > and > parses a file and add...

php bug? strange end of php file error
Why this code <?php function X() { // echo("commented ?>"); } X(); ?> give the error "Parse error: syntax error, unexpected $end" ??? ?> is into a string commented! On 07.09.2007 17:31 Fabio wrote: > Why this code > > <?php > function X() > { > // echo("commented ?>"); > } > X(); > ?> > > give the error > "Parse error: syntax error, unexpected $end" > > ??? > > ?> is into a string commented! no, it is not. There's no "strings" inside comments, comment is a stream of characters and does take ?> into account. I don't think this is a good idea either, but so is it. -- gosha bine makrell ~ http://www.tagarga.com/blok/makrell php done right ;) http://code.google.com/p/pihipi "gosha bine" <stereofrog@gmail.com> ha scritto nel messaggio news:46e17257$0$31118$6e1ede2f@read.cnntp.org... > On 07.09.2007 17:31 Fabio wrote: >> Why this code >> >> <?php >> function X() >> { >> // echo("commented ?>"); >> } >> X(); >> ?> >> >> give the error >> "Parse error: syntax error, unexpected $end" >> >> ??? >> >> ?> is into a string commented! > > no, it is not. There's no "strings" inside comments, comment is a stream > of characters and does take ?> into a...

Single PHP file
Hi All, Hoping for some direction here (I have searched, without avail, for a solution already). I was toying with trying to find a way whereby I could have a single PHP file, and then specify whether to either see the processed output or the source code by using the extensions php and phps (respectively). So, with one file called "theFile.php" on the server, going to "www.server.com/theFile.php" would show the end result of the php actions, whereas going to "www.server.com/theFile.phps" would show the actual content of the file itself. I thought this could be done by modifying the htaccess file as follows: AddType application/x-httpd-php-source phps RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.+)\.phps$ $1.php However this does not work: - if a *.php file exists, then accessing *.php or *.phps returns the end result of the php actions. - if a *.phps file exists, then accessing *.php returns a 404 error, and *.phps shows the actual file contents. Looking for any direction, references, or assistance. Thanks On Fri, 26 Jan 2007 02:04:18 +0100, Lucanos <lucanos@gmail.com> wrote: > Hi All, > > Hoping for some direction here (I have searched, without avail, for a > solution already). > > I was toying with trying to find a way whereby I could have a single > PHP file, and then specify whether to either see the processed output > or the source code by us...

PHP is looking for php.ini file in c:\windows
As the installation txt suggests, I have left my php.ini file inside the c:\php directory... but running phpinfo() shows that my php.ini file is in c:\windows as shown below. Configuration File (php.ini path) - C:\WINDOWS Well there is no php.ini file in my windows directory, so I'm not sure where it's getting it's configuration settings from... unless I suppose they're built into the executable somewhere if no php.ini file is found. My questions is - why php is not locating my php.ini file that is located in the c:\php directory? I'd rather not move it to the windows directory so I can keep everything nice and tidy like the installation file suggests. BTW - This is a brand new laptop I'm installing PHP on so there is (I just double checked) no PHP.ini file in the c:\windows directory. The path is set to include c:\php... and opening a DOS prompt and typing "php" is a recognizable command regardless of my current directory. This is the 2nd machine I have had this same problem with. I'm still confused... Any thoughts? thanks ~john wrote: > As the installation txt suggests, I have left my php.ini file inside > the c:\php directory... but running phpinfo() shows that my php.ini > file is in c:\windows as shown below. > > Configuration File (php.ini path) - C:\WINDOWS > > Well there is no php.ini file in my windows directory, so I'm not sure > where it's getting it's configuration settings from... ...

Failed opening required 'PEAR.php' (include_path='F:\www\include') in F:\Program Files\PHP\PEAR\Text\CAPTCHA.php on line 22
Hi, Guys=EF=BC=8Cwhen I run my site ,I got some errors: Warning: require_once(PEAR.php) [function.require-once]: failed to open stream: No such file or directory in F:\Program Files\PHP\PEAR \Text\CAPTCHA.php on line 22 Fatal error: require_once() [function.require]: Failed opening required 'PEAR.php' (include_path=3D'F:\www\include') in F:\Program Files \PHP\PEAR\Text\CAPTCHA.php on line 22 It appears that it cann't find the pear.php ,but i checked my dir,and this file was there,and also I have my php.ini file checked,the include_path=3Dinclude_path=3D".;F:\Program Files\PHP\pear;F:\www \include" ,it looks all right,was there anything I have missed in the config file?Or something wrong ? Wish somebody can help me out. Thanks, Mikay >Warning: require_once(PEAR.php) [function.require-once]: failed to >open stream: No such file or directory in F:\Program Files\PHP\PEAR >\Text\CAPTCHA.php on line 22 >Fatal error: require_once() [function.require]: Failed opening >required 'PEAR.php' (include_path='F:\www\include') in F:\Program Files >\PHP\PEAR\Text\CAPTCHA.php on line 22 So where is the pear.php file? >It appears that it cann't find the pear.php ,but i checked my dir,and >this file was there,and also I have my php.ini file checked,the >include_path=include_path=".;F:\Program Files\PHP\pear;F:\www >\include" ,it looks all right,was there anything I have missed in the >config...

Web resources about - I need to create html files from php files using php - comp.lang.php

Wikipedia:Why create an account? - Wikipedia, the free encyclopedia
This is Wikipedia . You do not have to log in to learn. Almost anyone can edit almost any article at any given time too, but be aware that the ...

Facebook Teams Up With Google, Microsoft, Others To Create WebPlatform.org, A Developer Support Hub
Facebook may have a tricky relationship with HTML5 , but it still wants developers all over the Web to learn how to use it efficiently. The social ...

Tim Nielsen says Redbacks can create their own Sheffield Shield legacy - AdelaideNow Search Search
TIM Nielsen’s band of brothers can’t wait to shed a 20-year reign in folklore as the last South Australian side to win a Sheffield Shield title. ...

This master blacksmith creates incredibly intricate swords
This guy created Wolverine's claws in the X-Men franchise.

These Redbacks can create their own legacy
TIM Nielsen’s band of brothers can’t wait to shed a 20-year reign in folklore as the last South Australian side to win a Sheffield Shield title. ...

Opinion: The iPhone SE is a smart, long-term move – and creates the prospect of a $299 iPhone
I argued a couple of months ago that ‘peak iPhone’ was likely a temporary phenomenon, but that Apple might have to be willing to accept lower ...

Toyota Researchers Create More Stable Solid Batteries
Research in the field of battery technology is normally aimed at increasing capacity, decreasing charge time and decreasing size. All of these ...

Create stylish video slideshows with ScatterShow
ScatterShow is a video slideshow creator from Smith Micro Software. Formerly a $29.99 commercial product, it’s now free to anyone willing to ...

This master blacksmith creates incredibly intricate swords
Tony Swatton is a blacksmith and gem cutter from England. His forgery The Sword and the Stone has been in operation for more than 25 years and ...

UK Startup Creates Riderless Electric Bike Prototype
Originally published on EV Obsession. A riderless (semi-autonomous) electric bicycle prototype has reportedly been created by a crowdfunded London-based ...

Resources last updated: 3/24/2016 3:16:30 AM