Jump to content

Tigers

New Members
  • Posts

    4
  • Joined

  • Last visited

Tigers's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Gudday all I would like to give users the option of viewing or saving downloaded content. I have a window on some sites that allows that. The following code,via an HTML link, button etc. <?php header("Content-disposition: attachment; filename=idolatry.pdf"); header("Content-type: application/pdf"); readfile("idolatry.pdf"); ?> automatically saves the content (in this case idolatry.pdf) into the downloads folder of the user's machine. Could it be set up to ask the user to either see the content or save content (in any location)? Doubtless this question has been asked previously but a search did not reveal any posts that might be of use. Regards Tigers
  2. Et al Being looking further at this and am still confused. Page on wife's site http://www.petalsandpatches.com/pincushions.php uses PHP to display the naviagtion bar on the left. I have stripped out most of that code but leaving the navigation PHP in pace to compare. The new page is http://www.petalsandpatches.com/footer-2.php. The output is the centre but just all just the php is echoed, nothing is done with it. All I want to do is echo the date to at least get me started. The footer-2.php has all the header information of pincushions.php to eliminate all variation causing trouble Why does this not work ? Yet the more complex work? The calling code is <?php include 'navigation.php'; ?> <? include ("footer-1.php"); ?> I have used the '' vs. "" within the includes to see what does or does not work. What am I doing wrong
  3. <html> <head> <title>Footer.php</title> </head> <body> ccfcgfcfccdx <?php include 'footer-1.php'; ?> </body> </html> <?php // outputs e.g. somefile.txt was last modified: December 29 2002 22:16:23. $filename = 'appliqueApr14.htm'; echo "Footer.php"; if (file_exists($filename)) { echo "$filename was last modified: " . date ("F d Y H:i:s.", filemtime($filename)); } ?> <html> <head> <title>Footer.php</title> </head> <body>ccfcgfcfccdx <?php// outputs e.g. somefile.txt was last modified: December 29 2002 22:16:23. $filename = 'appliqueApr14.htm'; echo "Footer.php";if (file_exists($filename)) { echo "$filename was last modified: " . date ("F d Y H:i:s.", filemtime($filename));} ?> </body> </html> (I can't believe I am asking this question ) After a long break I am rewriting some HTML on my wife's site in Php to make updates easier, improve functionality etc. I tried to add some inline PHP to refresh my memory (see above). It wouldn't work'. The output ccfcgfcccdx was seen but the PHP was ignored. I checked that the file appliqueApr14.htm'' was in the same directory as the code. I rewrote the code to have this snippet as an include portion. See 2nd snippet They are linked together as the 3rd snippet. The silly thing is that on the site the nav buttons on the left run as PHP with no apparent trouble. The URL is http://www.petalsandpatches.com/footer.php I can only assume that I am missing something so basic. What have I done or not?
×
×
  • 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.