• 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

Prestashop cUrl Login

WordPress ACFNotice: get_field() - We've detected one or more calls to retrieve ACF field values before ACF has been initialized

Exact alternate to mcrypt_encrypt in PHP 7.2

How to upload mpdf file after generating to s3 bucket in php

how to identify the web server name of remote host

How to get multiple values with same key from an array PHP

Convert string to lowercase AND then convert it to its original form in PHP, is it possible?

GuzzleHttp Hangs When Using Localhost

Load a .env file with PHP

MongoDB Duplicate Documents even after adding unique key

Inserting Country Selection into MySQL PHP [duplicate]

Symfony process run throws exception - executing on command line works

How to display table header in every page using FPDF library?

Unable to get password for the instance created from AMI

Doctrine 2 mapping referencing unique key

About Contact Privacy policy Terms and conditions