Created
July 8, 2017 21:23
-
-
Save PCianes/55a9de1586e3da9f5f6545537a69a908 to your computer and use it in GitHub Desktop.
Shortcode into php with ob_start()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php ob_start(); ?> | |
<CENTER> | |
<FORM> | |
<input type="button" value="Submit"> | |
</FORM> | |
</CENTER> | |
<?php $to_lock = ob_get_contents(); ob_end_clean(); ?> | |
<?php echo do_shortcode('[sociallocker]'.$to_lock.'[/sociallocker]');?> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include('carga-previa.php'); | |
ob_start(); | |
echo '<h1>Hola mundo</h1>'; | |
if (!is_readable('chao.txt')) $msgStack->add('No se encontró el archivo!'); | |
else $msgStack->add('Se encontró el archivo!'); | |
$titulo = 'Hola mundo'; | |
$contenido = ob_get_contents(); | |
ob_end_clean(); | |
include('cabecera.php'); | |
echo $contenido; | |
include('pie-pagina.php'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment