chesemonkyloma
08-27-2006, 11:31 PM
Is there a way to write PHP into a new file? I can make the file and write text to it but I want to write javascript and PHP into the new file. Can someone show me how to do this? Thanks in advance, although I'll thank you again so there's no point in thanking in advance lol...
Heres what I have:
fwrite($fp, "
<HEAD><SCRIPT language="JavaScript">
<!-- Begin
function movepic(img_name,img_src) {
document[img_name].src=img_src;
}
// End -->
</SCRIPT></HEAD>
<?php include('http://www.sockigami.com/includes/header.inc'); include('http://www.sockigami.com/includes/logo.inc'); include('http://models.sockigami.com/includes/modelsnavigation.inc'); include('http://www.sockigami.com/includes/navigation.inc');?>
<DIV CLASS="content">
<DIV ID="leftcolumn">$steps</DIV>
<DIV ID="rightcolumn"><IMG SRC="http://models.sockigami.com/images/models/{modelname}.jpg" NAME="sock_ball"></DIV></DIV>
<?php include('http://www.sockigami.com/includes/footer.inc');?>
");
I have fopen and fclose so all I need is this. Do I need escape characters or something?
Heres what I have:
fwrite($fp, "
<HEAD><SCRIPT language="JavaScript">
<!-- Begin
function movepic(img_name,img_src) {
document[img_name].src=img_src;
}
// End -->
</SCRIPT></HEAD>
<?php include('http://www.sockigami.com/includes/header.inc'); include('http://www.sockigami.com/includes/logo.inc'); include('http://models.sockigami.com/includes/modelsnavigation.inc'); include('http://www.sockigami.com/includes/navigation.inc');?>
<DIV CLASS="content">
<DIV ID="leftcolumn">$steps</DIV>
<DIV ID="rightcolumn"><IMG SRC="http://models.sockigami.com/images/models/{modelname}.jpg" NAME="sock_ball"></DIV></DIV>
<?php include('http://www.sockigami.com/includes/footer.inc');?>
");
I have fopen and fclose so all I need is this. Do I need escape characters or something?