Questions tagged as 'php'

5
answers

Import worksheet in text format using PHPExcel

How to import an excel file as the cells in TEXT format code $file_tmp = $_FILES['arquivo']['tmp_name']; try { $FileType = PHPExcel_IOFactory::identify( $file_tmp ); $objReader = PHPExcel_IOFactory::createReader( $FileType );...
asked by 13.11.2014 / 16:25
1
answer

Assigning a key and a value to an object

I assign the result of an SQL query using PDO ( PDO::FETCH_OBJ ) to a variable, and with that variable I access the query values as if it were an object. Example of an array as an object: <?php $obj = (object) array('foo' =>...
asked by 13.11.2014 / 00:40
1
answer

How to return the index of an array and its value in different variables?

I have an array of the following structure Matriz[indice][valor] How do I return the index in one variable, and the value in another? Exdrúxulo example: $indice = $matriz[indice] And for the value: $valor = $matriz[indice][valor]...
asked by 14.05.2015 / 02:56
2
answers

Business Day Script

I'm using a script that I found in this question of the SOen, and to count the working days disregarding Saturday and Sunday (can only do with Sunday tbm, changing $what_day > 5 to $what_day > 6 for example) it works right,...
asked by 05.05.2015 / 07:41
1
answer

Run PHP application (Zend Framework) on the server

I'm already clear that I'm not a PHP programmer but Java, but I have to upload an application from my company to an instance in AWS (Amazon Web Services). Well, I'm having a hard time, because it's the first time I work with projects PHP. I h...
asked by 15.04.2015 / 03:57
2
answers

How to retrieve sent data from a non-angular post requisition

I am making a post request to a php file that needs some data that is sent by the request. My question is how to retrieve this information being sent in the request My code for the request looks like this: //pego a descricao no compa input...
asked by 14.05.2015 / 20:54
3
answers

json_decode returns null

I have a JSON file that is in this link . I need to get and display the data in PHP, I have the following code to test: $linkAnapro = 'http://s.anapro.com.br/a-p/dados/b3gkhu%252f3ohE%253d/estoque.json'; $output = file_get_contents($linkAn...
asked by 06.04.2015 / 19:48
1
answer

Newsletter php (email with empty fields)

Can anyone help me please? I saw this on the net and tried to take advantage of it, however in my email I get the fields "Name:" and "Email:" but they are completely empty, but when sending I send with the fields filled! index.html <fo...
asked by 25.03.2015 / 21:05
2
answers

How to remove a specific part of a string

Let's say I have a file named Icon.png and I'm going to zip it, it will get Icon.png.zip but I want it to just call Icon.zip , how do I remove the .png part of the file name?     
asked by 28.04.2015 / 03:55
2
answers

Customize error messages when connecting to a database

Well here in the stack I found some topics that helped me, I'm new to PHP, and wanted to make my connection return a custom message without making it show those warnings . But when I add verification nothing happens, my full code below. &l...
asked by 26.04.2015 / 22:28