Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
This is an excellent tutorial to get started with fat free because you address the questions that inevitably go though your head as you try to get fat free working.
The only thing to mention which will confirm what to do is that if using xampp, download the fatfree zip file to /opt/lampp/htdocs.
Then after unzipping you can rename the fatfree-master directory to something shorter using:
#mv fatfree-master fatfree
the url to get your welcome page up after stating xampp will then be:
mines up & working & what I want to do next is the equivalent of:
public function page($page =‘not_found’) {
if ( !file_exists('application/views/'.$page.'.php'))
{
$page = "not_found";
}
$data['title'] = $page;
$data['description'] = $page;
$data['tags']= $this->metatags3->getTags($page);
$this->load->view('header',$data);
$this->load->view('nav');
$this->load->view($page);
$this->load->view('footer');
}
This is my codeigniter controller which which load a view page , when an argument of the name of the page wanted is passed to the function page ( ) I also use the parameter to query from a simple list what the <meta tag information will be to populate the page title ,and key word meta tags.
Suggestions on ways to do something similar in fat free are most welcome
ok this seems to load any page using url:
http://localhost/fatfree/sompage
$f3->route(‘GET /@page’, function($f3) { $view = new View; $page = $f3->get(‘PARAMS[“page”]’); echo $view->render(“ui/{$page}.htm”); } );
The next thing is to populate metatags with keywords relevant to page
I would like to use a simple contact form in web page using fat free (a view) <input type =“text” etc …
and get the message sent to my own email address with codeigniter you just use:
$this->email->from(‘webmaster@ginbrookes.tk’,‘andy’); $this->email->to($theirEmail); $this->email->subject($subject); $this->email->message($message ); $this->email->send();
I read somewhere fat free uses smtp ; any idea of the equivalent of the above?
@andybrookestar: You can simply use <a href=“http://php.net/manual/en/function.mail.php”>PHP’s mail() function</a>. As far as I know, Fat Free does not come with a mail library.
cheers Kamal
thats exactly what I did and its now working :
http://www.accra-guesthouse.com/contact_us ; I might pursue smtp later I read doing it that way is heavy on web resources.
The smtp syntax for a web domain is:
$smtp = new SMTP (mail.domain.com , 25 , $scheme, $user, $pw );
scheme I think you can leave out. im using for my web hosting user and password is going to be the user & password for my hosting account ?
See (http://fatfreeframework.com/smtp)
mail ($to, etc …) will do for now. All in all i’m likeing fat free a lot and have managed to use my own class for populating the meta tags in the header. Each view results in different relevant keywords in the header , which is used for all views.
HI @andybrookestar,
while PHP’s native mail() will work most of the times, and Fat Free’s SMTP() is certainly decent, I would also suggest using Swift Mailer, a rock solid library that I have been using for years now.
Marco
A think a new section that would help a lot of people would be on pagination since in the docs it follows a section on crud and it seems to use pagination you have to follow getting records using a crud style. Personally I prefer this style $result = $db->exec(‘SELECT field FROM table WHERE id = “1”’);
By the way if id is an int should that not be WHERE id=1’);
Personally I wouldn’t use a framework that aims to copy a lot of the early work of Slim v1/v2 and Laravel. The fastest and most performant framework to date is Lumen.