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(); //...
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?
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...
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...
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...
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...
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...
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;
}...