Questions tagged as 'php'

1
answer

How to get the line number in PHP?

How can I be getting the line number on which the method was executed for example? class.php Class Example { function methodExample() { echo __LINE__; } } index.php include "class.php"; Example::methodExample(); //...
asked by 02.07.2016 / 02:24
3
answers

Mail function in php

I'm using php's mail function and would like to check if the emails were successfully sent, but I'm not sure how I can do it. How could I verify that the email was successfully sent?     
asked by 30.12.2014 / 21:10
2
answers

How to code a number in PHP

I would like to know how to display a coded number for the user. I have several rows in my tables and I wanted to encode the user IDs. I was looking for functions for this but I only found md5 and sha1 but these generate very la...
asked by 31.12.2014 / 02:10
1
answer

Functions PHP + MySQLi

I created a function in php for cruid in the database but the function Read is in trouble and I can not understand why, it follows the code: function DBRead($table, $params = null, $fields = "*"){ $table = DB_PREFIX...
asked by 12.07.2015 / 09:12
1
answer

Block upload of .gif images renamed with .jpg or .png in PHP

I have an upload system where the user can only upload images with .jpg or .png extension. Here's part of the code: $imagemNomeAntes = $_FILES["the_image"]["name"]; $imagemNomeAntesExt = basename($imagemNomeAntes); $imagemNomeExt = pathinfo($i...
asked by 09.07.2015 / 00:25
2
answers

Binary cast is available in PHP?

PHP has a cast (which until then I did not know), called binary . Example of Manual : $binary = (binary)$string; $binary = b"binary string"; According to the PHP Manual:    (binary) - convert to binary string I saw t...
asked by 27.01.2015 / 12:13
1
answer

AJAX sends information to PHP but fails to INSERT only one

See this code for me: HTML: <script type="text/javascript" src="js/jquery-2.1.1.min.js"></script> <script type="text/javascript" src="js/criaEvento.js"></script> <form method="post"> <table width="420" align...
asked by 06.02.2015 / 21:22
1
answer

How to call CSS files using Kohana PHP 3.3

I'm new to Kohana Framework and would like to know how to call a CSS file.     
asked by 29.01.2015 / 13:52
2
answers

Problem when comparing hours

In the comparison of schedules I have in the registered database the opening and closing times of an establishment. I'm having a problem when comparing the time to see if the establishment is open or closed, it always appears to me as open when...
asked by 16.02.2015 / 01:09
1
answer

"Call to undefined function" error when calling function from a class

I have a function to convert the date, but it is returning an error that I could not adjust: Follow the code below: <?php class Prog{ private $DtBase; public function setdata($DtBase){ $this->data = $DtBase; }...
asked by 23.03.2016 / 18:26