Questions tagged as 'php'

1
answer

Capturing PHP errors and Exceptions

Scenario I know that I can set up the logs for errors and exceptions to be written, that's cool, but sometimes it's too boring to read these files. Question How to catch Errors and Exceptions in order to be able to handle them at r...
asked by 28.01.2014 / 20:58
1
answer

How to Convert RTF to HTML

I'm working on a web system that pulls a bulletin board from a system made in Delphi, which uses the RTF format to format the text. With this I need to use some Server-Side class in PHP to turn it into HTML. The class I am trying and t...
asked by 29.01.2015 / 20:01
1
answer

Date format in an NF-e

Hello, I'm developing a screen that will generate an NF-e and the moment I went to work with the dates I discovered that it needs to be sent in a specific format that I do not know and did not find anything on the internet. p> 2015-02-12T15: 2...
asked by 24.02.2015 / 20:23
2
answers

Strings Comparison

There are several ways of comparison, but I always see that the most indicated are ( ===, strcmp ou strcasecmp ). Among these forms considered the safest (according to some websites), the following doubts follow: Which would be the...
asked by 02.04.2015 / 14:50
1
answer

Error in PDO query

I am creating a registration page where I have several tabs, according to the structure below: <div> Aba 1 </div> <div> Aba 2 </div> <div> Aba 3 </div> <div> Aba 4 </div> e assim vai... Inside...
asked by 04.02.2015 / 15:09
1
answer

What is ~ in regular expression?

I'm with the code: function addhttp($url){ if(!preg_match('~^(http)s?://~i', $url)){ $url = 'http://'.$url; } return $url; } It will add HTTP if the URL you entered does not contain it, but what I'm in doubt is the...
asked by 20.02.2015 / 18:04
1
answer

Working with Silex sessions

Good evening, I have a question on how to add, change, and delete data in the Silex Session. His API documentation is very simple and unexplained. It is the following: I need to create a session containing an array of values I did so to...
asked by 06.02.2015 / 00:08
1
answer

How to translate JS plugins dynamically with Codeigniter?

I'm developing a WebApp using Codeigniter and need to have multiple languages, in quiet PHP, my problem is how to organize the translations of Javascript plugins. Example, I have in the application plugins like DataTables and Datepicker and...
asked by 27.07.2017 / 21:39
2
answers

Doctrine: ManyToMany Relationship with Extra Fields

I have a many-to-many relationship between two tables: Products and Orders. Doctrine then generates a third table. Until then calm down. But I wanted to generate in this third table more fields (qtde and unit value at the time of purchase)...
asked by 26.05.2017 / 15:34
1
answer

How to create webservice using PHP and REST?

I have been researching a lot on webservices lately and would like your help to know how I can build a webservice using REST and PHP. I chose PHP because I'm more familiar with the language, and REST because during my research I saw that it was...
asked by 05.04.2017 / 23:40