Most voted "php-5" questions
In June 2004 version 5 of PHP was released, introducing a new object orientation model, including redesign of constructors and addition of destructors, access visibility, object abstraction and object interfaces.
Learn more…21 questions
Sort by count of
-
10
votes3
answers1808
viewsSecurity when creating a PDO query function
I am now migrating to PDO because of security, but I don’t know if I am using PDO correctly. I am creating these functions to make faster the use of PDO, but I do not know if this form is safe. It’s…
-
5
votes1
answer545
viewsHow to install php-5 in Ubuntu?
I’m a new user on Ubuntu, and I’m unable to install the PHP-5 via apt-get, since the stable version is PHP-7, get an error saying no package was found. I tried using the following commands sudo…
-
4
votes3
answers1343
viewsEmpty multiple tables in a single run
Via PDO, can do the TRUNCATE (English) of a table as follows: // Matriz de definições $dbcon_new = array( "host" => "localhost", "dbname" => "bubu", "username" => "super_dragon", "password"…
-
2
votes2
answers309
viewsHow to use REST to validate XML receiving via POST
I have an application in Delphi that sends an XML with a code via Post. I have to develop an application in Symfony that needs to validate the receipt of this XML via post. To hear it would be via…
-
2
votes1
answer472
viewsTernary operator " ?: "
I recently got into a discussion with colleagues about the more compact functionality of the if ternary ( x ?: 10) and some of them said it would be removed in php 7. I did a web search and found…
-
2
votes2
answers147
viewsCompressing files with PHP 5.1.6
I need to Compress files using PHP but my version is 5.1.6, I only tried to create the folder .zip using the code below, however, as stated in the manual this functionality is only available from…
-
2
votes1
answer125
viewsPHP - Take a value and modify the date day
I have a question about date manipulation. I need to take a value (given by the user) and turn this value into day of the month. Example : $Valor_Usuario = 30; $Data = 12/10/2018; $Resultado =…
-
1
votes0
answers94
viewsZftool does not work, returns the html of the application [Zend Framework]
Hello, I’m trying to use zftools (terminal) to create modules for Zend but contrary to the expectation that it would be an error message or success zf.php prints the application’s HTML on the…
-
1
votes2
answers1970
viewsAccentuation problem when migrating to PHP7
I’m wearing a leotard latin1 in the bank columns and iso-8859-1 on the pages, while it was on PHP5 it worked normal, but when migrating to PHP7 the accents began to give problems appearing this � in…
-
1
votes2
answers644
viewsActive class in the include menu
On my pages PHP use a include to call a file that contains my menu: <?php include("menu.php"); ?> Menu file: <li class="current-menu-item"><a href="#">Hosting</a> <ul>…
-
1
votes1
answer92
viewsProblem with image loading
That’s the problem that if anyone can help. Here is the HTML code... here is the part where will load the image with the product that will be added. <div class="row"> <div…
-
0
votes0
answers629
viewsPHP7 SOAP problem
I started a project using php 5.6.26 and managed to communicate with the e-mail server via SOAP without problems. This week I decided to update php to version 7.0.13, and communication via SOAP…
-
0
votes1
answer34
viewsProblem iterating an array in php
I have the following code. $array = array(1,2,3); $arr1 = array(3, 4, 5); $data = []; for($i = 0; $i < count($array); $i++){ $data["ca"] = $array[$i]; for($k = 0; $k < count($arr1); $k++){…
-
0
votes0
answers31
viewsHow to get a third variable from a merge of two variables in php
all right? i’m having the following problem getting a variable in php follows the code: <?php $video1="welcome.mp4"; $video2="movie.mp4"; $video3="ends.mp4"; $num_id="1"; $get = '$' . "video" .…
-
0
votes0
answers109
viewsCodeigniter by adding ". html" after controller name
I don’t know why when I try to perform an ajax call to the url "http://localhost/meusite/controller/method" I get a 404 error saying the following "The url…
php codeigniter htaccess php-5 codeigniter-2asked 7 years, 10 months ago Victor Hartur de Carvalho 182 -
0
votes1
answer671
views -
0
votes0
answers206
viewsList folder with files extension htm and open in new page
Daily I receive files with extension in ". htm" with information I need to open to view and, always use the right mouse button feature and 'open with' and choose the browser. Thus: arquivotexto1.htm…
php-5asked 7 years, 1 month ago rogeriocarniel 1 -
0
votes1
answer28
viewsLogin Session in an Application
Good Afternoon Guys, I am making a system for company where I work but I have a problem that I can not solve. This is the Code I’m using: Code to show user and position require('conBanco.php');…
-
0
votes1
answer107
viewsDompdf does not load information
I am using PHP 5.4.43 in a Symfony 2.3.36 application and my PDF is coming blank. Solicitacaopdf.html.Twig Test 1 Solicitacaocontroller.php /** * @Route("/solicitacaopdf") */ public function…
-
-2
votes1
answer876
viewsLaravel Error 4.2 - SQLSTATE[HY000] [2054] Server charset Unknown to the client. Please, report to the Developers
I’m having problems in a web application using Laravel 4.2 the same worked in a Windows 7 environment with IIS + PHP 5.6 but I had to change the machine and create a new development environment.…
-
-2
votes1
answer56
viewsFailed to create array
I’m using php 5.3 with Postgree on a project I’m working on. That way I have to use the array() and not the [ ]. I have a table that I need to send by email but when sending only the last record is…