Posts by jflizandro • 299 points
17 posts
-
0
votes3
answers1021
viewsA: Customized Angular 2/4 validator
I found the problem. Actually my validation was correct, but a CPF mask directive I created was causing this bug. I don’t know why, but when removing the mask the validation worked perfectly. The…
angularanswered jflizandro 299 -
1
votes3
answers1021
viewsQ: Customized Angular 2/4 validator
I’m trying to implement a custom validator (Cpf and cnpj) in an angular project using Formbuilder, but when testing the validator, it can’t get the field value. I created the validator as follows (I…
angularasked jflizandro 299 -
1
votes1
answer227
viewsQ: Use html attribute as javascript variable
I’m developing a PHP system that uses an extension for dynamic forms, where I can click a button to add fields (EX: A request can have multiple items, where the items are the fields added…
-
-1
votes4
answers399
viewsA: Select Option does not search or save the value selected by the user
Check if it works by replacing echo "<option value='$marca1'>$marca1</option>"; for echo "<option value='{$marca1}'>{$marca1}</option>";
phpanswered jflizandro 299 -
-1
votes3
answers5839
viewsA: Namespace declaration statement has to be the very first statement or after any declare call in the script
Apparently the error is being caused by the comment just after opening the PHP tag. Try to remove the comment and put the command namespace shortly after the <?php.…
-
1
votes0
answers541
viewsQ: Dialog to take only the local path of a folder
I have a field in an html form, where the path (path) of a Windows folder (EX: C: pasture1 pasture11) should be inserted, where this field is of the type text even. However, to make it easier, I…
-
1
votes2
answers6765
viewsA: How to create a REST service with PHP and Mysql and . htaccess
Zend, the company responsible for PHP and the famous Zend Framework, has developed a web service generator called Apigility. I believe it is the easiest way and on Youtube there are several videos…
-
2
votes1
answer523
viewsA: Grab parameter from URL
To get URL parameters in Codeigniter, you use: $this->input->get('nome_do_parametro'); You can take the parameter by the URI segment as well: $this->uri->segment(3); // Onde segmento 1 =…
-
0
votes1
answer701
viewsA: Accentuating problems on the most up-to-date server
Assuming you are using Yii version 2.x, check the database configuration file (config/db.php) if the charset is set to utf-8: return [ 'class' => 'yii\db\Connection', 'dsn' =>…
-
1
votes4
answers3752
viewsA: Error inserting Object of class Pdostatement database could not be converted to string
Your logic is wrong... $cnpj = "000001"; $sth = $lokos->prepare("INSERT INTO CLENTES (CNPJ) VALUES (?)"); $sth->bindParam(1, $cnpj, PDO::PARAM_STR); $sth->execute(); // Até aqui está mais…
phpanswered jflizandro 299 -
0
votes2
answers2267
viewsA: Install Image Magick (Imagick)
Make sure that the DLL you are using is the same as provided in the PECL repository: https://pecl.php.net/package/imagick
-
6
votes5
answers169
viewsA: What is the fastest is_null($y) or $y == null?
It all depends on what you want to check, not just the performance. For example: <?php $str1 = ""; $str2 = null; $str3 = 0; var_dump(is_null($str1)); // retorna false var_dump(is_null($str2)); //…
phpanswered jflizandro 299 -
0
votes1
answer40
viewsA: Load Datatime field
you are forgetting to wrap the name of the field with QUOTES (in your case, single quotes) <input value="<?php echo @$linha['DAT_EHORA_EVENT'];?>" id="DAT_EHORA_EVENT"…
phpanswered jflizandro 299 -
1
votes1
answer4523
viewsA: How do I select in PHP With FIREBIRD PDO?
Do so: $user = "SYSDBA"; $pass = "masterkey"; try{ $lokos=new PDO("firebird:localhost=ja sei 0;dbname=ja sei também",$user,$pass); }catch(PDOException $e) { echo "Falha na…
-
1
votes1
answer861
viewsA: Export Mysql database data to Excel
You don’t think it’s better to use your own class for this? I recommend the class Phpexcel, that is easy to work and well complete. I can export thousands of records without complications.…
-
0
votes2
answers3113
viewsA: Obsolete PECL/PHP PDO_OCI extension. How to proceed?
Thank you @guilerme-birth. I was able to install it as follows (remembering that I use Centos 6.6): Download the PHP $ wget http://ar2.php.net/get/php-5.6.10.tar.gz/from/this/mirror Unzip and switch…
-
2
votes2
answers3113
viewsQ: Obsolete PECL/PHP PDO_OCI extension. How to proceed?
I need to install the pdo_oci extension of PHP to work with Oracle database, via PDO. However, I checked that the extension available via PECL is obsolete and will no longer be maintained. From what…