Contents
On Ubuntu the folder is /var/www/html , NOT /var/www . You will need root access for that. So you save the file as /var/www/html/hello. php .
Where do I put PHP files?
Place your PHP files in the “HTDocs” folder located under the “XAMMP” folder on your C: drive. The file path is “C:xampphtdocs” for your Web server. Make sure your PHP files are saved as such; they must have the “. php” file extension.
Where do I put PHP files in xampp Ubuntu?
Start Mysql and Apache servers.
- Copy file.php to htdocs (C:/Program Files/XAMPP/htdocs)
- You can also create any folders inside htdocs folder and save our codes over there.