How will you access the size of the uploaded file in PHP?

I am uploading a file which is an image. I want to get the size of that image every time in bytes only using PHP. I had done this by far


    echo $size;




PHP Php, uploaded 1 Answer

Explain ngModel and How it is Used?

I am just getting started with angular and ran into the directive below. I read a few tutorials already and am reading some now, but I really don't understand what "require: ngModel" does, mainly because I have no idea what ngModel does overall. Now, if I am not insane, it's the same directive that provides two way binding (the whole $scope.blah = "blah blah" inside ctrl, and then {{blah}} to show 'blah blah' inside an html element controlled by directive.

That doesn't help me here. Furthermore, I don't understand what "model: '@ngModel' does. @ngModel implies a variable on the parents scope, but ngModel isn't a variable there.


  1. What does "require: ngModel" do?
  2. What does "model : '@ngModel'" do?

*auth is a service that passes profile's dateFormat property (irrelevant to q)

Thanks in advance for any help.


angular.module('app').directive('directiveDate', function($filter, auth) {

    return {
        require: 'ngModel',
        scope:  {
            model : '@ngModel',
            search: '=?search'
        restrict: 'E',
        replace: true,
        template: '<span>{{ search }}</span>',
        link: function($scope) {

            $scope.set = function () {
                $scope.text = $filter('date')($scope.model, auth.profile.dateFormat );
                $ = $scope.text;

            $scope.$watch( function(){ return $scope.model; }, function () {
            }, true );

            //update if locale changes
            $scope.$on('$localeChangeSuccess', function () {

Android android, ng-model 1 Answer

What is MVC?

I've heard the term MVC (Model View Controller) tossed about with a ton of Buzz lately, but what really is it?

SEO SEO, mvc 0 Answer