So, for starters, I created a php script inside the Joomla site parent directory, and random prints worked. Then, I tried to make use of some of Joomla libraries' elements.
Despite my final aim,since I ran into problems, I tried to make something simple work, such as printing the site name:
<?php $config = JFactory::getConfig(); echo 'Site name is ' . $config->get( 'sitename' ); ?>
This is the error I get:
Fatal error: Class 'JFactory' not found in /home/ubuntu/workspace/JP-27/testphp.php on line 1
Generally, whenever I try to use any element of Joomla libraries, the elements are not found. Any advice?