Skip to content

Tag: php

Laravel SEO friendly URLs

I started learning laravel and couldn’t figure out how to solve a problem. For example if i want to create a route for products i can use a route like below. In this approach we would get something like this localhost/product/macbook-pro. However i want to create a url like localhost/macbook-pro. In my …

Can’t get Session in controller

I want to alert notify after sent message! I try to get session message after sent in controller but it not working. here my controller code : Answer Use the helpers: for inserting and making seesion : for catch and using the session :

FPDF not working in creating a simple pdf

I’m playing with FPDF library and i try this simple code: But it didn’t do anything. No document or exception is popped out. If i correct, if everything is fine a document should appear. I have no idea why it’s not working. Any help would be very appreciated 🙂 Answer Your problem comes from …

from php 5.4 to php 7 , useing dynamic variables is confused

my php is update from php 5.4 to php 7.0.33 , but php code get an error with Dynamic variables php 5.4 some code like this… when I use in php 7 shome code get epmty, how can I do to resolve this problem I already watching the refer page Using braces with dynamic variable names in PHP , but

PHP not executing a shell exec command

To keep this simple this code works: And this code code doesn’t: Does anyone know how I can get the code that doesn’t work to work? I have ran the command in a normal terminal and they execute as expected, but when ran with PHP it cause a server 500 error – this seems to require a PHP code r…