Questions tagged as 'php'

2
answers

How to mount a JSON return?

I have this code, below, where I manipulate some data. But after, I need to transform into a JSON object, like the example below. <?php function mostraContasEntrada($id_empresa){ $pdo = conectar(); $this->mostraDadosEntrada=$pdo-...
asked by 10.11.2015 / 01:00
1
answer

How to get all image properties in upload?

I'm here browsing Google but I did not find it clear how to get all image properties at the time of uploading in the script. I'm using it to get the image: $imagem = $_FILES['arquivo']['name']; How to get all properties of the image at th...
asked by 07.11.2015 / 18:24
1
answer

Declare the variables at the top or near where they are used?

It is best to declare all variables at the very beginning of the file, even if they will only be used, I know, a thousand lines later? Or is it better to declare as the program evolves? My case is that I'm going to merge several scripts int...
asked by 19.04.2015 / 04:31
2
answers

Doubt regarding permanent links to posts

In my project, users can post, and I would like each post to have a permanent link so it can be accessed separately. In what I already thought: Create a post.php file that would receive the post id via GET and display the data, a condit...
asked by 21.04.2015 / 22:21
1
answer

How to make a negation condition with instanceof, without affecting the order of precedence?

I hope the question does not seem strange, but I can clearly explain what I mean. I know that for checks, sometimes you have to be careful about the question of operator precedence or the conditions added in an if. My question is: Which is th...
asked by 18.10.2015 / 00:26
1
answer

Doubt about the error "Strict standards: Only variables should be passed by reference in"

To write some dates in the database in the desired format I'm doing this: mysqli_stmt_bind_param ( $stmt, 's', date("Y-m-d", strtotime($data)) ); Or, to get the current day simply: mysqli_stmt_bind_param...
asked by 22.10.2015 / 19:38
1
answer

How can I set an old version of php in Xampp in localhost?

I'm doing a PHP course and there are errors appearing because the PHP version of Xampp is more up-to-date than the PHP version of the course. Question     
asked by 21.10.2015 / 05:46
1
answer

Web server that receives and sends parameters to C #, is it possible?

I developed a C # (.NET) software that sends / receives text files to an FTP server, but for security I try to work only with parameters of types String / Bytes for security reasons, my question is: "Can I create a web server (I ca...
asked by 18.11.2014 / 19:49
1
answer

How can I get the Input file path?

I need to send multiple attachments via PHPmailer and I'm using jQuery to get the value of input file , now I need to get the file path to be able to send it by email, however when I get the path it comes with C:\fakepath\image.jpg...
asked by 04.12.2014 / 18:04
1
answer

Node.js and PHP on the same server

I have a dedicated CentOS 6.5 server with Plesk Panel 12 installed, with several sites in php. I would like to develop a chat with node.js and integrate it with some sites made in php. Only this chat needs to retrieve some information from the u...
asked by 27.11.2014 / 04:32