|
jaybee -> RE: getting php into fp2003 (10/19/2005 12:21:27)
|
For future reference for anyone who is using autopilot and finds this thread...... The confusion above seems to stem from the mis-apprehension that you put the autopilot code into your page. The idea is to set up your page layout in html then extract bits and put them into the autopilot files. So, design your page. Make sure all references to images etc are full URLs or you will have problems later on. So if an image is coded as images/mypic.jpg, change it to http://www.myweb.com/images/mypic.jpg. Once you are happy with the page you chop it up into two parts, header and footer. To make this easier. Put a line in where the split will be. You can use a comment <!-- Autopilot start --> or a bit of text which will show up in design view <p>Autopilot goes here</p> If you use the latter DO NOT include it in the header or footer when you start to cut the page up. The things that you always want at the top of the page become your header and you cut out the code in the page from immediately AFTER the <body> tag down to the line you put in to show where autopilot will sit. You paste this into a new page using a text editor or the FP code view. If you are using the FP code view remove all the code that FP generates before pasting your code in. Save this as header2.php Go back to your built page. Cut everything left between the line you put in to show where autopilot sits and </body> tags. Paste that into a new empty page as described above but this time save it as footer.php discard what is left of your original page. Upload header2.php and footer.php to the host Now, find a file already on your host that you should have uploaded along with the rest of the autopilot script, called header.php and open it in a text editor. Find the following lines <BODY
");
if (ereg("step_one.php", $PHP_SELF)==true)
{
echo"onLoad='select_row(\"plan\", ".$tick.");'";
}
else if (ereg("step_two.php", $PHP_SELF)==true)
{
echo"onLoad='select_row(\"plan\", ".$tick.");'";
}
echo">";
?> Put the cursor after the final > and press enter to make a new line then type the following <?php include('inc/header2.php'); ?> and save the file. Upload it to the host. To see your results open a page called step_one.php in your browser. The exact name depndes on where you've put it on your host.
|
|
|
|