How can you view a .php document?

  • Thread starter Thread starter Picard
  • Start date Start date
P

Picard

Guest
Got it as an email attachment. Tried opening it in Word but only get garbled text. In which 'text encoding' should I open it in if I can use Word?
 
A php file can be opened using notepad. Should open fine in word aswell though. What do you mean by garbled text?
 
Have you tried viewing it in a web browser and then saving it as a text file?

BTW - did this email come from a trusted source and did they knowingly send you a php file? :confused:
 
Last edited:
if its garbled then its either encrypted or not a PHP file. What the first few characters you see in the file?

Or it's binary (e.g. someone right-clicking on an image that is served via a PHP script and saving)
 
It might also have been encoded using Zend.

But first check the headers of the file to try and see what type of file it is. In Linux you can use the "file" command, with the filename as argument, to determine what type of file it is.

But like sn3rd said, it could also be an image file that was produced by a php-script.
 
Thanks everybody, but I'll just contact this person again and ask her to send a proper image or document or whatever it was. I'm not going to waste anymore time on this.
 
Top
Sign up to the MyBroadband newsletter
X