Search code examples
phpwebfilezilla

Why my PHP script is not running in website


I am C++ develoer and new with web. I bought web space and DNS, when I try to upload HTML changes they are getting reflected on my website, but when I right any PHP script and upload file no changes are getting updated. I am using FileZilla for FTP. Do I need to follow some directory strucutre?


Solution

  • If the server has PHP support than you should be able to place .php files anywhere you can place .html files and it will parse them.

    • Make sure you have PHP support on your server
    • Make sure that the files are placed where you place your normal html files
    • Make sure that the files have an extention that your server is setup to use (default is .php)
    • Make sure the PHP inside the files is contained in <?php and ?>