snipt

Ctrl+h for KB shortcuts

PHP

Imprimir shortcode en Wordpress

<?php echo do_shortcode("[shortcode]"); ?>
https://snipt.net/embed/23bf9045ed96b8de96e3233ae3871728/
https://snipt.net/raw/23bf9045ed96b8de96e3233ae3871728/
23bf9045ed96b8de96e3233ae3871728
php
PHP
1
2016-09-30T02:33:55
True
False
False
/api/public/snipt/41352/
imprimir-shortcode-en-wordpress
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> <span class="k">echo</span> <span class="nx">do_shortcode</span><span class="p">(</span><span class="s2">&quot;[shortcode]&quot;</span><span class="p">);</span> <span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
echo, php, shortcode, wordpress

Bash

Disable ping reply on GNU/Linux

1
2
3
4
5
# Disable ping reply temporarily
echo "1" >  /proc/sys/net/ipv4/icmp_echo_ignore_all

# Enable the ping reply back
echo "1" >  /proc/sys/net/ipv4/icmp_echo_ignore_all
https://snipt.net/embed/5063d2b6586f01564ef8b213ac66fa30/
https://snipt.net/raw/5063d2b6586f01564ef8b213ac66fa30/
5063d2b6586f01564ef8b213ac66fa30
bash
Bash
5
2016-09-24T10:38:15
True
False
False
/api/public/snipt/16453/
disable-ping-reply
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="c"># Disable ping reply temporarily</span> </span><span id="L-2"><a name="L-2"></a><span class="nb">echo</span> <span class="s2">&quot;1&quot;</span> &gt; /proc/sys/net/ipv4/icmp_echo_ignore_all </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a><span class="c"># Enable the ping reply back</span> </span><span id="L-5"><a name="L-5"></a><span class="nb">echo</span> <span class="s2">&quot;1&quot;</span> &gt; /proc/sys/net/ipv4/icmp_echo_ignore_all </span></pre></div> </td></tr></table>
bash, echo, linux, ping, reply

PHP

hello snipt

1
2
3
<?
echo "Hello Snipt ;)";
?>
https://snipt.net/embed/ff280bb743d9ce70261e1e34052d34b0/
https://snipt.net/raw/ff280bb743d9ce70261e1e34052d34b0/
ff280bb743d9ce70261e1e34052d34b0
php
PHP
3
2016-09-22T16:08:29
True
False
False
/api/public/snipt/9994/
hello-snipt-1
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?</span> </span><span id="L-2"><a name="L-2"></a><span class="k">echo</span> <span class="s2">&quot;Hello Snipt ;)&quot;</span><span class="p">;</span> </span><span id="L-3"><a name="L-3"></a><span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
echo, hello, php, snipt

PHP

Mostrar texto en pantalla con ECHO y PRINT

1
2
3
4
5
6
7
//////////ECHO///////////

<? echo'Texto a imprimir'; ?>

/////////PRINT//////////

<? print'Texto A Imprimir'; ?>
https://snipt.net/embed/067f652f7d3cf3e0c8906078f1aa2233/
https://snipt.net/raw/067f652f7d3cf3e0c8906078f1aa2233/
067f652f7d3cf3e0c8906078f1aa2233
php
PHP
7
2016-09-30T02:46:28
True
False
False
/api/public/snipt/7229/
sample-3
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="x">//////////ECHO///////////</span> </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a><span class="cp">&lt;?</span> <span class="k">echo</span><span class="s1">&#39;Texto a imprimir&#39;</span><span class="p">;</span> <span class="cp">?&gt;</span><span class="x"></span> </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a><span class="x">/////////PRINT//////////</span> </span><span id="L-6"><a name="L-6"></a> </span><span id="L-7"><a name="L-7"></a><span class="cp">&lt;?</span> <span class="k">print</span><span class="s1">&#39;Texto A Imprimir&#39;</span><span class="p">;</span> <span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
"imprimir en pantalla", echo, print
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.