Jump to content

PHP - fwrite and markup Help


UbH

Recommended Posts

Hi,

after reading the following tutorials:

http://www.tizag.com/phpT/filewrite.php

 

I have figured out how to create new files on my web server, but the next need I have is to not only create a PHP or HTML file on my web server dynamically, but also write the HTML/PHP code of my basic web sites template to this new file.

 

This string of code apparently writes strings to the new file upon creating it, but from all my testing it only can write text not markup language that require quotes:

$stringData = "Tracy Tanner\n";
fwrite($fh, $stringData);

 

So my question is how do I use the fwrite function to write markup in my newly created document with out getting errors for using needed quotes in my markup, something like this.

<div id="some_css_id">
  <?php
  include include("../site_elements/small_navigation.php");
  ?>
</div>

 

Thanks.

UbH.

Link to comment
https://forums.phpfreaks.com/topic/100177-php-fwrite-and-markup-help/
Share on other sites

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.