Most voted "php-7" questions
PHP7 is a new version of the language, which has new features like: Several errors are now treated as exceptions. Removed the old SAPI API and extensions Null coalescing Operator (`?`) Combined comparison Operator (`<=>`) Return typed in methods. Declaration of scalar types. Anonymous classes Use this tag only when the question has any problem or doubt about the resources cited.
Learn more…198 questions
Sort by count of
-
1
votes0
answers197
viewsPHP 7 (Debian) connection error with Sybase 16
I have the following difficulty: I need to configure the PHP environment to connect to a Sybase 16 base. I am not a PHP programmer and I am helping another colleague. Everything that has been tried…
-
1
votes2
answers326
viewsError when trying to connect to SQL Server with Codeigniter and PHP 7
Good afternoon, I started having problems with my CI when updating my development environment (windows + xammp) and production (Ubuntu + apache) to the latest version of PHP 7.1.10. When trying to…
-
1
votes1
answer34
viewsQuery the database using ORDER BY kills my search
My code displays a list of people and a search field at the top. everything works normal, including the search. But I need people to show up at random. The problem is that when I use ORDER BY Rand()…
-
1
votes1
answer296
viewsPrinting directly to the printer
I have a password system where the user clicks on a button and a password is printed for it. I needed the print to be direct, because using the js window.print() a dialog box opens. How to resolve…
-
1
votes0
answers38
viewsReceive $POST data to validate login
A little help hehe I’m having trouble creating a login validation in a pattern MVC. I think I managed to structure it right and my login screen appear in the index. So far everything okay. When I…
-
1
votes1
answer45
viewsClass not found on remote server
I have the following file index php. <?php require_once 'global/erros/erros.ini'; require_once 'vendor/autoload.php'; use CLASSES\INIT\Init; new Init(); ?> And the next class Init.php <?php…
-
1
votes0
answers36
viewsHow to do a Cron task with Laravel?
I have a Function in php/Laravel, and would like to fire this Function every 2 hours and 35 minutes. My question is: Using Laravel, as I create correctly, a cron to trigger this function in this…
-
1
votes0
answers19
viewsproblems with redirecting in . httacess
What do you have to wrong in this code: <ifModule mod_rewrite.c> RewriteEngine on RewriteBase /crud/ RewriteRule ^(.*)$ index.php RewriteCond %{REQUEST_URI} !/manutencao.php$ [NC] RewriteCond…
-
1
votes0
answers20
viewsuse . htacces appropriately for links
So, I have in my . htaccess the following condition: RewriteCond %{REQUEST_URI} !.(jpe?g?|png|gif|css|js) [NC] that tells me to release the above extensions in case of the redirect below RewriteRule…
-
1
votes1
answer545
viewsAndroid app does not connect on local webservice
I’m studying webservices but came across a problem, The API works because I can already enter data into the database, I’m using wamp, but in the app, I followed several steps and just don’t send,…
-
1
votes1
answer40
viewsprint array in the amount of values of another array
I’m new to php and have the following problem, I wanted to print an array with string values in the amount of values of another array with integer values. That must be it. $string =…
-
1
votes1
answer813
viewsPHP SOAP - SOAP-ERROR
Good afternoon Guys, I’m doing a WEBSERVICE to consume a company API. But with the code below the return is always "SOAP-ERROR: Encoding: Object has no 'Active' Property" I don’t know what else to…
-
1
votes1
answer25
viewserror in wordpress query
I have the following appointment : <?php $footerlocal = array( 'numberposts' => 2, 'post_type' => 'page', 'meta_query' => array( 'relation' => 'OR', array( 'key' => 'zona', 'value'…
-
1
votes4
answers440
viewsHow to Fill in the field when the field is empty in PHP?
The LIMITE_SUPERIOR field is of the real type. I’d like to know how to tell him that if it’s empty fill in the number 0 field and when it’s not empty can fill in the number he found inside the…
-
1
votes2
answers152
viewsreceiving null or void field
I have a class object that appears like this on print_r(); Membros Object ( [idMembro:Membros:private] => [dataCadastro:Membros:private] => 2019-01-10 [nome:Membros:private] => Cleonice P…
-
1
votes1
answer49
viewsHow to duplicate a Csv field in PHP?
I have an id field in a csv file that is read as an array. This id field comes with two id in a field because id has an identical answer field called "answer". Instead of repeating this identical…
-
1
votes2
answers1025
viewsAccess private attributes of a class within another class
I started studying PHPOO and I’m having difficulty accessing the attributes of the class Pessoa that are private within the class Login, follows the code class person class Pessoa { private $nome;…
-
1
votes1
answer559
viewsPicpay integration: Problem
I’m having trouble with the Gateway Picpay to make a integration. I’m following the manual informed by them on link down below: https://ecommerce.picpay.com/doc/ Good I’m doing so: <?php $urlLoja…
-
1
votes1
answer62
viewsProblem instantiating two models in a php controller
I made a mini framework, where the Models extends from a standard class that contains a crud, the only thing the models have is the table information to be used. But when I try to use two models in…
-
1
votes1
answer44
viewsFunction to edit returning NULL PHP and MYSQL
Good night to you all, I am a beginner in programming and am following a tutorial to create a stock control system. if(isset($_GET['id'])) { $idFabricante = $_GET['id']; var_dump($resp =…
-
1
votes1
answer80
viewsDownload two Zipped files in PHP
I am trying to compress two files together in PHP, but I get the following error while trying to open . zip: ! C:\Users\gpsilva\Downloads\your_name (19).zip: Final inesperado do arquivo This problem…
-
1
votes0
answers145
views -
1
votes1
answer109
viewsPHP code to send a sms via API to a phone list
Please would like a light for the code below, as it connects in an SMS sending API, but would like to send to more numbers at the same time, but the code below sends to a single number. <?php $ch…
-
1
votes2
answers436
viewsHow do I go through the data of an array, to make a draw with odds proportions?
Next guys, I was studying how I could create a small draw application that was simple and fair and at the same time has probabilities, in my researches I found several ways to make a random choice…
-
1
votes0
answers32
views -
1
votes3
answers563
viewsView information in Modal with foreach
I’m having a lot of trouble displaying the database information via a modal. I’m accessing the database by a foreach, but the problem is that it only displays the modal with the last table record.…
-
1
votes1
answer550
viewsPHP Friendly URL: Does not load files from Folder
I have in my root directory the index.php file and config.php. Inside the root folder of my site I have the pages folder with the home.php, login.php and Register.php files, but when I try to access…
-
1
votes0
answers84
viewsHow to do an if or while in php for time out in the API
Well, When the api takes a time out it jumps the Cpf that needs to query to validate the data and goes to the next one, I would like when the time out error happened it stayed in loop until it…
-
1
votes1
answer38
viewsHow to create an array with strings in the amount of values contained in another array
I’m trying to create a new array with the string being displayed in the same amount of values contained in another array. This should be easy, but I’m not getting the logic to create a new array and…
-
1
votes0
answers14
viewsError Extension=php_pdo_sqlite.dll
Hey, how you doing? I am trying to implement a web system using PHP + apache without installer in Windows 10, but when I access the DB data the error "could not find driver" for lack of…
php-7asked 4 years, 2 months ago Gabrielle De Souza Santos 11 -
1
votes0
answers51
viewsError when setting a constant
I’m getting the following error in my code, and I’m not getting the reason why. Got error 'PHP message: PHP Warning: Constants may only evaluate to scalar values in config.php on line 85 On the…
-
0
votes0
answers78
viewsError in Curl adapter using Solarium - Solr with php 7
I use Sorl version 5.4, working perfectly the interface of Solr itself. I installed the Solarium to facilitate application development. However, when testing the examples following the initial…
-
0
votes1
answer55
viewsError in anonymity function does not allow compiling
I am studying a PHP OO book. There is an example of anonymous function, but is giving error: # FUNÇÂO ANONIMA $remove_acento = function($str) { $a = array( 'à', 'á', 'â', 'ã', 'ä', 'ç', 'è', 'é',…
-
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
votes0
answers2428
viewsWamp Server upgrading PHP to version 7
Good evening guys, I’m having the following problem, I’m trying to upgrade my PHP to be able to follow the course with Laravel but I’m not succeeding. I have environment : Windows 10 Wamp 2.5 PHP…
-
0
votes1
answer95
viewsVariable value does not update
Hello, I installed WAMP from Bitnami and am using php 7.1.7 and when I edit the value of a variable, and give F5 in the browser, the value of the variable does not change on the web page. I tested…
-
0
votes3
answers5033
viewsFind Strings in Text Files in PHP
I have a file called "test.txt" inside it has several words, I have an input where I get the word inserted and I would like to check if that word is contained within this ".txt file". Someone knows…
-
0
votes1
answer118
viewsSilex can’t find the routes
I have a Silex 2.0 application with PHP 7.0 and Apache 2.4 (on port 8080) with the following structure: silex/ | - vendor/ | - web/ | - index.php | - composer.json | - .htaccess Composer.json {…
-
0
votes3
answers1847
viewsCalling PHP file in HMTL form
I want to call a. PHP file, but I can’t. I have this script: ======== <html> <header> <title>Home Page</title> </header> <body> <form method="post">…
-
0
votes1
answer550
viewsLaravel 5.4 cache problems
Hi, I’m having apparent cache issues on Laravel 5.4. When I give a UPDATE in a form, I direct the user to the listing of records. When you return to the editing form, the old data (before making the…
-
0
votes1
answer28
viewsOauth2 Authorization Problem using Wamp in Laravel 5.1
Good evening, I am studying API Restfull with Laravel 5.1 and came across a problem to request a request in Oauth. When running the built-in PHP server works normally…
-
0
votes0
answers31
viewsProblem installing Oracle XE and PHP 7 on Windows 10
I’m having trouble solving this installation. Does it relate to oracle support for Win10? I tried several forums and I couldn’t. I’m using the Dlls directly from the pecl. But I always have the same…
-
0
votes0
answers42
viewsProblems with Php and Mysqli
I recently uploaded an old code for Mysqli and it’s giving errors. Erro: Notice: Undefined variable: connection in /var/www/public_html/includes/functions.php on line 8 Warning:…
-
0
votes0
answers148
viewsPhpmailer Addattachment does not work
good night. I’m trying to make an attachment on Phpmailer as follows: $arquivo = '../enviados/planilha.xlsx'; $mail->AddAttachment($arquivo); This way, the attachment does not go along with the…
-
0
votes0
answers90
viewsPHP - How to sort lottery table values
I have the following problem: -let’s imagine that we have the records of a lottery, but we need to sort the values. I have tried the documentation code of the php - asort, but it doesn’t work! I’m…
-
0
votes2
answers100
viewsInstall Composer in Windows 2012
My operating system has two Apaches running two phps (5 and 7.1 respectively). I am trying to install Composer for PHP7, but it is giving the following message: The PHP exe file you specified Did…
-
0
votes1
answer503
viewsRun stored Procedure in oracle database in PHP
I have the procedure "exemplo1" which receives 3 input parameters and no output parameters, as I do to execute it in PHP. In case it would be so. EXEC "exemplo1"('para1','para1','para3'); How does…
php oracle stored-procedures php-7 oracle11gasked 6 years, 3 months ago Maicon Fernando Stefene da Sil 141 -
0
votes1
answer37
viewsChange apache in Cpanel
I made an application in Laravel 5 and I need to go up to a server that is not mine, I only have an FTP account for this. The problem is q p Cpanel server is configured for PHP 5 and the Laravel…
-
0
votes1
answer161
viewsMSSQL query on Ubuntu 18.04 LTS has stopped working
I have a program that has been running on Ubuntu-server 17 for some time. This system performs queries on a database server with MSSQL 2008. I performed the installation of Ubuntu 18.04 LTS, and did…
-
0
votes1
answer38
viewsDoubts in the PHP float function
$valorBaixa = (float)$this->input->post('valorBaixa'); I have this float function where it turns a string into a float value, only it cuts the values. Example: if "8.75" is entered the…