New Life Games Tech Forums

NLG Members who host their own Repair Logs of Various Games. => RickHunters Computer Help 101 => Topic started by: Ron (r273) on March 29, 2010, 10:46:28 AM



Title: How to open PHP files?
Post by: Ron (r273) on March 29, 2010, 10:46:28 AM
How can I open PHP files? :103-     I am running XP with Firefox.


Ron (r273)


Title: Re: How to open PHP files?
Post by: CarruthersIII on March 29, 2010, 11:53:55 AM
What exactly are you trying to open, you actually have a php file open when on thsi website  :97-

You should be able to open a php file using firefox, if not try dreamweaver.


Title: Re: How to open PHP files?
Post by: Ron (r273) on March 29, 2010, 03:32:12 PM
What exactly are you trying to open, you actually have a php file open when on thsi website  :97-

You should be able to open a php file using firefox, if not try dreamweaver.

I have downloaded the files from the site. Some are pictures (Mikhon stuff) which I can open with Firefox and others are manuals and it gives me this:

Warning!
Sorry but you are not authorized to view the " ----------------------Topics"
Please login below or register an account with New Life Games Tech Forums.
Login
Username:    
Password:    
Minutes to stay logged in:    
Always stay logged in:    
Forgot your password?

Ron (r273)


Title: Re: How to open PHP files?
Post by: CarruthersIII on March 29, 2010, 06:59:59 PM
So the pictures are fine, you cant open the manuals? Try to open them in Microsoft word. If you dont have it notepad should work as well.


Title: Re: How to open PHP files?
Post by: StatFreak on March 30, 2010, 11:16:54 PM
I have downloaded the files from the site. Some are pictures (Mikhon stuff) which I can open with Firefox and others are manuals and it gives me this:

Warning!
Sorry but you are not authorized to view the " ----------------------Topics"
Please login below or register an account with New Life Games Tech Forums.
Login
Username:    
Password:    
Minutes to stay logged in:    
Always stay logged in:    
Forgot your password?

Ron (r273)


Ron, I experienced the same issue a couple of days ago. It is an issue with your login authentication. Perhaps something got corrupted in the forum database. :103- At any rate, the solution is to log off of NLG, delete your cookies, your cache, and your temporary files, close and reopen the browser, and log on again. If you are using FireFox, add "Active Logins" to the list of things that you clear. It should then work. Unfortunately, you will have to re-log into other sites that you were previously logged into.

In Firefox, you first might try logging off of NLG, specifically deleting only your NLG cookies, along with your temporary files and cache, closing the browser and restarting. If it doesn't work, then clear the rest.


StatFreak :31-
:nlg-  Global Moderator


Title: Re: How to open PHP files?
Post by: rickhunter on March 31, 2010, 06:01:42 PM
Just for the record. PHP files are just text files that are scripts executed to form html content.  If you were to "open" a PHP file it would look like this: (not much to look at unless you are into this stuff).  All this script does is that it asks for a filename and then displays its contents on your browser.
<?PHP
 if (isset($_POST ["file"]))
 {
   $FileName = $File = $_POST ["file"];
 }
 else
 {
   $FileName = "";
 }
?>

<HTML>
<BODY BGCOLOR=#FFFFFF>

<FORM ACTION=/cgi-bin/cgiwrap/username/Example.php METHOD=POST>

<P>Enter FileName:
<?PHP
  echo " <INPUT TYPE=TEXT NAME=file VALUE=\"$FileName\" SIZE=75>\n";
?>
<P><BR><P>
<INPUT TYPE=SUBMIT VALUE="Show Me!">

</FORM>

<P><BR><P>
<P><BR><P>
<P><BR><P>

<?PHP
 if (isset($File))
 {
   $Handle = @fopen ($File, "r"); // '@' suppresses external errors

   if ($Handle)
   {
     $FileText = fread ($Handle, 10000); // Read up to 10,000 Bytes

     fclose ($Handle);

     // Fix HTML tags that may be there

     $SafeText1 = str_replace ("&", "&amp;", $FileText);
     $SafeText2 = str_replace ("<", "&lt;", $SafeText1);
     $SafeText  = str_replace (">", "&gt;", $SafeText2);

     // Now it is safe to display it

     echo " <H2 ALIGN=CENTER>File: $File</H2>\n";

     echo "<PRE>\n";
     echo $SafeText;
     echo "</PRE>\n";
   }
   else
   {
     echo " <H3>Error: File '$File' is not accessible.</H3>\n";
   }
 }
?>

</BODY>
</HTML>