29 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| use FeedReaderCentral\Data;
 | |
| use FeedReaderCentral\Security;
 | |
| 
 | |
| include '../../start.php';
 | |
| 
 | |
| $db = Data::getConnection();
 | |
| Security::verifyUser($db, redirectIfAnonymous: false);
 | |
| 
 | |
| page_head('About the CLI | Documentation'); ?>
 | |
| <h1>About the CLI</h1>
 | |
| <p class=back-link><?=hx_get('./', '⟨⟨ Documentation Home')?>
 | |
| <article class=docs>
 | |
|     <p>Feed Reader Central’s low-friction design includes having many administrative tasks run in a terminal or
 | |
|         shell. “CLI” is short for “Command Line Interface”, and refers to commands that are run
 | |
|         via PHP’s <code>php-cli</code> command. Ensure that the version of PHP installed also has that feature
 | |
|         enabled. (If you are using the recommended
 | |
|         <a href=https://frankenphp.dev target=_blank rel=noopener>FrankenPHP</a> environment, it has PHP CLI support;
 | |
|         use <code>frankenphp php-cli</code> instead of <code>php-cli</code> when following instructions here.)
 | |
|     <h2>Running CLI Commands</h2>
 | |
|     <p>CLI commands should be run from the same directory with <code>start.php</code>; this will be one directory level
 | |
|         up from <code>/public</code>, the web root directory. CLI utilities are in the <code>/util</code> directory, so
 | |
|         an invocation will follow the pattern:
 | |
|     <p><code>php-cli util/some-process.php command option1 option2</code>
 | |
| </article><?php
 | |
| page_foot();
 | |
| $db->close();
 |