Category : php

Q(Question): Warning: getimagesize(images/logo.jpeg) [function.getimagesize]: failed to open stream: No such file or directory in /home/s001898/public_html/loja/admin/fpdf/fpdf.php on line 1213 FPDF error: Missing or incorrect image file: images/logo.jpeg function _parsejpg($file) { // Extract info from a JPEG file $a = getimagesize($file); if(!$a) $this->Error(‘Missing or incorrect image file: ‘.$file); if($a[2]!=2) $this->Error(‘Not a JPEG file: ‘.$file); if(!isset($a[‘channels’]) || $a[‘channels’]==3) ..

Read more

Q(Question): Currently the code works fine for uploading images. I can get the image size and extension as well. However, my error occurs in the switch statement. For some reason imagecreatefromjpeg, imagecreatetruecolor, imagecopyresampled, and imagejpeg do not work. This has been a problem in the development of this site from the beginning and I am ..

Read more

Q(Question): How do I display main domain name instead of ip or filename in php? For example suppose I am redirected to file http://example.com/myfolder/test.htm, then instead of specified url I want to display example.com in the address bar for such url. How can it be done? A(Answer): Use ajax function. Then it will be in ..

Read more

Q(Question): I get the error of Duplicate entry ” for key 1 when running a mysql query this comes from a form that has textboxes and then tries to save to student table in mysql. $id=mysql_real_escape_string($_POST[‘txtstudentid’]); $password=mysql_real_escape_string($_POST[‘txtpassword’]); $dob=mysql_real_escape_string($_POST[‘txtdob’]); $firstname=mysql_real_escape_string($_POST[‘txtfirstname’]); $lastname=mysql_real_escape_string($_POST[‘txtlastname’]); $house=mysql_real_escape_string($_POST[‘txthouse’]); $town=mysql_real_escape_string($_POST[‘txttown’]); $county=mysql_real_escape_string($_POST[‘txtcounty’]); $country=mysql_real_escape_string($_POST[‘txtcountry’]); $postcode=mysql_real_escape_string($_POST[‘txtpostcode’]); // Build an sql statment to add the student details ..

Read more

Q(Question): when i am trying to install my script it’s give me the following error : Parse error: syntax error, unexpected T_VARIABLE, expecting T_STRING in C:\wamp\www\ocm\install\index.php on line 313 here is the install file code: <?php session_start(); ob_start(); include(‘../Includes/class.gzip_encode.php’); error_reporting(E_ALL & ~E_NOTICE); //*************************************************************************** if (PHP_VERSION < "4.1.0") { $_GET = &$HTTP_GET_VARS; $_POST = &$HTTP_POST_VARS; $_COOKIE ..

Read more

Q(Question): hi all please help… i would like to get datas between certain intervals. please have a look @ db_table.jpg, it’s the db structure. the red highlighted part is the value i need. condition is select values when both device one & device two are off. db_table_report.jpg is the resulting report format. It contains start ..

Read more