Re: How to run a php script which contains a pdf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Nov 01, 2009 at 07:13:22AM -0500, Bob McConnell wrote:
> Nigel Henry wrote:
> >On Saturday 31 October 2009 21:29, Athmane Madjoudj wrote:
> >>On Sat, Oct 31, 2009 at 9:25 PM, Nigel Henry
> >>
> >><cave.dnb2m97pp@xxxxxxxxxxxx> wrote:
> >>>I was trying to read an online tool catalogue, and noticed a PDF button
> >>>at the bottom of the webpage. Clicked on it, and it opened the dialog box
> >>>to download. What has been downloaded though is a .php script (27.3MB).
> >>>
> >>>The properties shows that it contains a pdf document, but I've no idea
> >>>how to run it, open it, or whatever needs to be done, to get to see the
> >>>PDF.
> >>>
> >>>Any suggestions folks.
> >>>
> >>>Nigel.
> >>
> >>Try to rename it:
> >>
> >>mv FILE_NAME.php FILE_NAME.pdf
> >>
> >>and open it with Evince
> >>
> >
> >Renaming it has done the job, and it has opened with no problems.
> >
> >Many thanks.
> >
> >Nigel.
> 
> There is a simple way to check a file to see if it really is a pdf. Open 
> it in a text editor. If the first four characters are '%pdf', then it is 
> safe to rename it.

On unix-like systems the offical method is to do:

	file filename

see "man file".

> These first four bytes are the magic number in Unix based systems. This 
> is a much more reliable and flexible way to mark files with a type than 
> the extensions used by Microsoft. I believe the 'type' command will also 
> tell you what this marker means. i.e. 'type FILE_NAME.php'.
> 
> Bob McConnell
> N2SPP
> 
> -- 
> fedora-list mailing list
> fedora-list@xxxxxxxxxx
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
> Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

-- 
---- Fred Smith -- fredex@xxxxxxxxxxxxxxxxxxxxxx -----------------------------
                        The Lord is like a strong tower. 
             Those who do what is right can run to him for safety.
--------------------------- Proverbs 18:10 (niv) -----------------------------

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux