• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

What is the difference between client-side and server-side programming?

javascriptphpclient-sideserver-side


PHP Snippet 1:

<script type="text/javascript">
    var foo = 'bar';
    <?php
        file_put_contents('foo.txt', ' + foo + ');
    ?>

    var baz = <?php echo 42; ?>;
    alert(baz);
</script>

PHP Snippet 2:

<script type="text/javascript">
    var foo = 'bar';

    var baz = 42;
    alert(baz);
</script>

Related Snippets

Composer Curl error 60: SSL certificate problem: unable to get local issuer certificate

Trying to iterate over a mongodb cursor twice - failing

PHP Fatal error: Class not found - PHPUnit

api response laravel doesn't show

yii2 and mssql insert varbinary into model

phpmyadmin : Depends: php-twig (>= 2.9) but 2.6.2-2 is to be installed. WHAT?

How to put php code inside opening and closing shortcodes

Symfony there are no commands defined in the "make" namespace

printing all running session variable in laravel 5.1

Redis Command To Sort Keys

Refresh specific HTML content that retrieves data from MySQL

How do I loop through an MS SQL database with VB.NET?

Laravel 8 factory state afterCreating

What is the function of the (new Date()).getTime() in PHP?

How to auto populate preferredCountries from intl-tel-input with db output

About Contact Privacy policy Terms and conditions