string strtoupper ( string $string )

Example:

$filename=$_FILES["fileToUpload"]["name"];
$ext = substr(strrchr($filename, "."), 1);
echo "<br>File Type is: ".strtoupper($ext);

When you convert NULL into String it will always return a empty value.
<span></span> as an in-line element and a <div></div> as a block level element.


While a span allows you to separate things from the other elements around them on a page or within a document, it does not cause a line break. This is why it is perfect for in-line styling, like coloring a single word in a sentence to draw more attention to it.

But a div, by default, creates a line break because it is used to make separate containers or boxes within a page or document, hence the name division. So the proper way to use a div is as a containing element, rather than an inline styling element.

SQL Injection is possible to alters the existing SQL commands to expose hidden data or to override the valuable ones, or even to execute dangerous system level commands on the database host. This is accomplished by the application taking user input ($_GET and $_POST) and combining it with static parameters to build an SQL query.
PHP does not support unsigned Integers and Integer size can be determined using the constant PHP_INT_SIZE, and maximum value using the constant PHP_INT_MAX.
for ($col = 0; $col < $highestColumnIndex; ++ $col) {
    $cell = $worksheet->getCellByColumnAndRow($col, $row);
    $val = $cell->getValue();
    echo "Print Value is: ".$VAL;   
}

OUTPUT:

Notice: Undefined variable: VAL in C:\xampp\htdocs\trunk_release_cycle04\application\importstatus.php on line 28

SOLUTION:

Variable name in PHP is case-sensitive. Replace $VAL into $val.
Project
Current stable version
Agavi
1.0
Aiki Framework
0.9.1
AppFlower
1.3
Ayoola Framework
1.4.1
CakePHP
2.6.1
Cgiapp
1.0
ClanCatsFramework
2.0.6
CodeIgniter
2.2.1
Drupal
7.34
Fat-Free
3.4.0
FuelPHP
1.7.2
Hazaar MVC
1.3
Joomla
3.3.6
Kajona
4.5
Laravel
4.2.16
Lithium
0.11
Nette Framework
2.2.7
Phalcon
1.3.4
PHPixie
3
PRADO
3.2.4
Qcodo
0.4.22
Seagull
1.0.4
Silex
1.2.3
Symfony
2.6.4
TYPO3 Flow
2.3.1
Xyster Framework
02 Build 01
Yii
2.0.2
Zend Framework
2.3.4
Laravel is a free, open source PHP web application framework, designed for the development of model–view–controller (MVC) web applications.

Features:
  • Laravel uses Composer as a dependency manager to add framework-agnostic and Laravel-specific PHP packages available from the Packagist repository.
  • Eloquent ORM (object-relational mapping) is an advanced PHP implementation of the active record pattern, providing at the same time internal methods for enforcing constraints to the relationships between database objects. 
  • Application logic is part of developed applications, either by using controllers, or as part of route declarations. 
  • Reverse routing defines a relationship between links and routes, making it possible for later changes to routes to be automatically propagated into relevant links. When links are created by using names of existing routes, appropriate uniform resource identifiers (URIs) are automatically created by Laravel.
  • Restful controllers provide an optional way for separating the logic behind serving HTTP GET and POST requests.
  • Class auto loading provides automated loading of PHP classes, without the need for manual maintenance of inclusion paths. On-demand loading prevents loading of unnecessary components; only the components which are actually used are loaded.
  • View composers are logical code units that can be executed when a view is loaded.
  • IoC container makes it possible for new objects to be generated by following the inversion of control principle, with optional instantiating and referencing of new objects as singletons.
  • Migrations provide a version control system for database schemas, making it possible to associate changes in the application's code base and required changes in the database layout, easing deployment and updating of applications.
  • Unit testing plays an important role in Laravel, which itself contains numerous unit tests that detect and prevent regressions in the framework. Unit tests can be run through the artisan command-line utility.
  • Automatic pagination simplifies the task of implementing pagination, replacing the usual manual implementation approaches with automated methods integrated into Laravel.
move_uploaded_file (string $filename , string $destination )

Example:

<?php
if( isset($_POST['submit']) )
{
     $uploads_dir = '/uploads';
     foreach ($_FILES["fileToUpload"]["error"] as $key => $error)
    {
      if ($error == UPLOAD_ERR_OK)
     {
        $tmp_name = $_FILES["fileToUpload"]["tmp_name"][$key];
        $name = $_FILES["fileToUpload"]["name"][$key];
        move_uploaded_file($tmp_name, "$uploads_dir/$name");
    }
   }
}
else
{
    echo "<br><br><br><center>";
    echo '<form action="" method="post" enctype="multipart/form-data">';
    echo 'Select file to upload:';
    echo '<input type="file" name="fileToUpload" id="fileToUpload"><br><br><br>';
    echo '<input type="submit" value="Upload" name="submit">';
    echo '</form>';
    echo "</center>";
}

?>
$filename=$_FILES['fileToUpload']['name'];

Note: "fileToUpload" will be taken from name of the input type '<input type="file" name="fileToUpload" id="fileToUpload">'
The behavior of an automatic conversion to array is currently undefined in PHP. Because PHP supports indexing into strings via offsets using the same syntax as array indexing.

E.g.,

<?php
 

$a    'car'; // $a is a string
$a[0] = 'b';   // $a is still a string
echo $a;       // bar 

?>

When you declare a variable, there is no need to mention a specific type explicitly. PHP will take care of the automatic type conversion implicitly. That is to say, if you assign a string value to variable var, var becomes a string. If you then assign an integer value to var, it becomes an integer.
 
<?php
 

$var "0";                         // OUTPUT: ASCII 48 ($var is now string) 
$var += 2;                          // OUTPUT: 2 ($var is now an integer)  
$var $foo 1.3;                  // OUTPUT: 3.3 ($var is now a float)  
$var "10 Little Piggies";     // OUTPUT: 15 ($var is integer)  
$var "10 Small Pigs";         // OUTPUT: 15 ($var is integer)  

?>
$b = (bool) array();

echo $b;

Output : FALSE
The value FALSE is not a constant for the number 0, it is a boolean value that indicates FALSE.  The value TRUE is also not a constant for 1, it is a special boolean value that indicates TRUE.  It just happens to cast to integer 1 when you print it or use it in an expression, but it's not the same as a constant for the integer value 1 and you shouldn't use it as one.

A boolean expresses a truth value. It does not say "a boolean expresses a 0 or 1".

The symbolic constants are specifically designed to always and only reference their constant value.  But booleans are not symbolic constants, they are values.

Blog Archive

Total Pageviews

Popular Posts