Questions tagged as 'php'

3
answers

How to run PHP in interactive mode?

How do I run php from the command line, without having to use a script as an argument. Example with script: > php index.php I already know how to execute a certain function or code like this: > php -r "echo 12346;" But is ther...
asked by 30.07.2015 / 17:21
2
answers

use regex in explode function of php

I'm doing a query to my DB, and we can make an identical query to this:    "hello world" "pacific ocean" What happens is that I can search multiple strings at once:    Expected result:       String1: Hello world       string2: paci...
asked by 17.08.2015 / 13:46
1
answer

Access Permissions in Laravel 4

I'm developing a system in Laravel 4 based on Laravel's official tutorials and documentation. I have not seen anything related to (ACL) access permissions in Laravel. Knowing that my system will have several resources available, such as: New...
asked by 07.02.2014 / 13:46
2
answers

Display longblob field contents containing PDF file

I have a question regarding the longblob data that is stored in the Database. I currently have this for the other data: echo "<tr><td>Email:</td>"; echo "<td>"; if ($exibe['Email']) { echo $exibe['Email']...
asked by 14.02.2014 / 11:09
1
answer

What are the correct practices for manipulating events in PHP?

I've created some classes and an interface to handle events for a small MVC application. My intention is to implement the Observer pattern, but I do not know if you agree, since I still confuse it with PHP. In the following code, did I do it the...
asked by 30.12.2013 / 01:38
1
answer

How to create a simple markdown with PHP?

I would like to create a simple markdown, for bold and italic for now only, for example: **foo** turns <b>foo</b> __bar__ turns <i>bar</i> Of course some details are needed, for exam...
asked by 26.07.2018 / 00:57
4
answers

Crossing values in array

I have a X value and I have a array with multiple values. I would like to search for all the equal and lower values that would come in a combination that their sum would give X value. > Example: Array (in real scenario, tho...
asked by 17.07.2018 / 19:37
1
answer

How to get profile image via authentication using facebook API php

I would like to know how to copy an image from a link without extension, that is, I already used several methods that work for images with extension, but without extension I have not yet, where will I use to copy the image of the Facebook profil...
asked by 28.08.2015 / 20:30
1
answer

How to format php mail?

I'm not able to insert formatting into code. Whenever I send, I get the email formatting tags as <html> <body> , <strong> , <b> , <p> , etc ... Follow the code with html formatting that...
asked by 30.07.2015 / 22:17
3
answers

Laravel: Migrations

I have a question about Laravel's Migrations and I believe they can help me. 1 - I created a model with migration by php artisan make:model Evento -m; 2 - In addition to increments and timestamps I added one more field to the migrat...
asked by 12.09.2015 / 23:43