Questions tagged as 'php'

3
answers

How to get ID from another table and INSERT another?

I have two tables: destinations and entry: In the destinations table: dest_id (AI) and destination; In the entry table: id (id), target_id (relative to destination id of the destinations table) I created a query to insert the first...
asked by 11.04.2014 / 02:18
2
answers

What are .phtml files and when should I use them?

Until recently, I had never heard of phtml , however recently I see that it is being used a lot, mainly by some frameworks (such as Zend2). Since I can usually put html content inside a .php file, I ask myself what is the use of...
asked by 05.12.2014 / 12:01
2
answers

PHP7 anonymous class. What are the advantages?

According to the PHP Manual , from the PHP 7 version you can define anonymous classes. Example: class SomeClass {} interface SomeInterface {} trait SomeTrait {} // Instanciamos a classe anonima aqui: var_dump(new class(10) extends SomeC...
asked by 10.09.2015 / 18:29
3
answers

Is it safe and feasible to minify PHP files?

I was left with this question after reading a HTML question . I have mined only with PHP, only with HTML, with PHP and HTML ... and I did not notice any problems ... Can it become a problem on the server, or in some other way? Will rendering...
asked by 18.02.2016 / 16:47
1
answer

How can I convert DOC and DOCX to TXT with PHP?

I have a system where the files the client is going to send me are all in file DOC or DOCX . However, you may want to download this document in TXT format. Is there any simple way to convert DOC or DOCX to...
asked by 20.11.2015 / 12:05
1
answer

What is the EmptyIterator class for?

In the PHP documentation, there is a class called EmptyIterator When I look at the documentation for the EmptyIterator::rewind() method, it says:    No operation, nothing to do. (No operation, nothing to do) And the...
asked by 03.06.2015 / 13:34
3
answers

How to work with multi tenancy architecture?

I was asked to develop an application with multi tenancy architecture in the PHP language using MySQL as a database. After reading various materials and posts online, I had a question. How to model the application itself? I have two option...
asked by 09.05.2014 / 21:24
2
answers

Rescuing the last insert in the database with PDO lastInsertId

I'm trying to redeem the last id on the bank with lastInsertId() of the PDO, but nothing appears. OBS: I'm using Postgre. <?php try { $dbh = new PDO('pgsql:host=localhost;port=5432;dbname=bancocjweb1', 'postgres', '1...
asked by 02.09.2014 / 07:01
1
answer

How to have two versions of php on the same Apache server?

I have an Apache / 2.4.10 (Ubuntu) server running a website in php 5.5. But I'm creating a new site and it needs php 5.6. Is it possible to have two versions of php installed on my server and use each one in different folders?     
asked by 05.10.2018 / 17:27
1
answer

503 Forwarding on multiple URLs except for one

How to make a redirect 503 (maintenance code) on every site, but leave only one URL that can be accessed? Server: Linux (Apache) with PHP 5.5 and MySQL.     
asked by 15.04.2014 / 18:38