Jump to content

[SOLVED] Read content generated by php


DutchYoda

Recommended Posts

HI,

 

I'm building a CMS with can contain multiple projects / websites...

The idea is that I can download a complete site into a zip, so it can be exported easily...

 

If the site uses PHP and MySQL (default database) it is easy to generate te zip file...

 

But when the site has to be just plain HTML, I want the zipfile to contain the generated HTML files...

 

Can somebody tell me what is the best way to do that?

Link to comment
https://forums.phpfreaks.com/topic/145713-solved-read-content-generated-by-php/
Share on other sites

Instead of getting the php file.

I want the generated content, which I would get if I went to the php file via URL;

 

ex:

 

<?php

  echo "test";

?>

 

If I add a file with this code to a zip it will contain the exact same text from '<?php' till '?>'

But I also want to be able to just get 'test'.

Never mind. I found a solution.

Instead of requesting for the generated content, I let a function give it back as a string to fill a virtual file in the zip.

 

Don't know how to explain it to you, but when it is finishe I will post some example code here and I hope that it will make some sense.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.