Q&A for How to Open a PHP File

Return to Full Article

Search
Add New Question
  • Question
    PHP file is running in xampp only when it is stored or copied in htdocs. I want to know why we aren't able to run the php files in their current locations instead of changing their directories?
    Community Answer
    When you are running XAMPP, it is creating a web server which runs the file. The web server expects the files to be stored in the public directory, which is configurable, and defaults in the case of XAMPP to htdocs.
  • Question
    Can I print a PHP file?
    Community Answer
    Yes, you could just click File > Print. Or you could copy it into another text editor and print it from there.
  • Question
    Which is the best to use on a .PHP in my documents?
    Community Answer
    At the very least, you want a plain text editor, as PHP will be plain text. However, PHP is a programming language, so you are better off using a proper PHP editor which will make it look easier to read and edit. There are many available, depending on your operating system and budget, but if you just want to see what the file is, notepad will do.
  • Question
    What are the differences between MY SQL and PHP?
    Community Answer
    MySQL is a software for using SQL, a database query language. PHP is a general-purpose scripting language that is often used in web development. As programming languages, they are not really comparable as they are for different purposes, but they are often used in conjunction with data-driven websites.
  • Question
    What does it mean to back up a file?
    Community Answer
    Backing up a file means storing a copy of your file somewhere else (like a flash drive or external drive). You can still use the file on your computer, but if something happens to the original file, you'll have an extra copy stored to use.
  • Question
    How do I open a PHP picture file with Notepad+?
    Community Answer
    There is no such thing as a PHP picture file. If you have a file with the PHP extension, then it should be plain text. You can create picture files using PHP, but they will have the usual extensions you would expect (.JPG, .PNG etc). You would need a graphics package like PAINT to view them, as the data is not text, but binary.
Ask a Question

      Return to Full Article