Questions tagged as 'php'

1
answer

PHP Built-in and htaccess - Routing System / Friendly URL

I have a .htaccess file for route deviation on the server (production) and a router.php file for route deviation using the PHP 7 Built-in server. php -S 0.0.0.0:8000 router.php However, I would like to use router.php also in production, w...
asked by 19.10.2016 / 20:21
1
answer

How to access a variable array codeigniter

I have difficulty getting values inside an array variable in codeigniter Help me understand how this works once and for all I made a search in the database that is sent to the view by an array: Controller $dados= array( 'perfil' => $this-&g...
asked by 14.10.2016 / 20:18
1
answer

"\ n" be converted to "br" automatically

I'm developing a PHP post system with MySQL. I need the line breaks that the user enter in textarea to be converted to <br /> . The variable $texto (contains the contents of the post) goes to the database in the colu...
asked by 15.10.2016 / 19:11
2
answers

WordPress Posts Summary

I need the post summary size on my frontpage to be different from the summary size of the page where all the posts are displayed ( home.php ). In my file functions.php I put the following code: //adiciona um novo tamanho de res...
asked by 13.10.2016 / 21:02
1
answer

PHP - Turning a table with values generated by for $ i / for $ j into a variable

Good afternoon everyone. I have a form that shows the fields in the form of a table: echo "<table style='text-align: center; widtd: 280pt;' border='1'>"; // Cabeçalho da tabela: echo '<tr><td>AAA</td><td>B...
asked by 26.02.2017 / 22:29
1
answer

Prevent indexing of page clippings

If you cut a page by separating head , nav , etc ... And pull everything with include on index.php , will Google index those cut pages? I want to separate some parts by creating head.php and nav.php , the...
asked by 15.03.2017 / 12:41
1
answer

What is the purpose of the INPHINIT_START, INPHINIT_ROOT, INPHINIT_PATH, and INPHINIT_COMPOSER constants?

I'm studying the micro-framework Inphinit . And in the index.php file are declared some constants that left me confused as to its purposes. Index.php code: define('INPHINIT_START', microtime(true)); define('INPHINIT_ROOT', rtrim(strtr(dirn...
asked by 13.03.2017 / 00:05
1
answer

Implementation of Abstract Factory, Factory Method and Adapter standards

I have read the following sentence:    AbstractFactory defines an interface for creating a family of related or dependent products without having to explicitly specify classes. Consider the following adapter: Adapter.php      names...
asked by 28.02.2017 / 21:43
3
answers

How do I know if a record has been added to the database?

Hello, I'm working on an alert system, when a larger than normal data is registered in the database an alert has to appear on the page where the user is browsing. The problem is that I do not know how to check if an element has been added to the...
asked by 15.07.2016 / 23:08
1
answer

PHP Fatal error: Call to undefined function exif_read_data ()

I created a site for a joinery where the user uploads photos of the work done by the joinery, but when the user uploads photos taken from a certain cell phone, the photos are displayed horizontally on the site, I was able to solve the problem (X...
asked by 02.05.2016 / 02:32