Notice: Trying to access array offset on value of type bool in /home/clondesignuniver/public_html/wp-content/themes/weuniversity-es/divi-children-engine/functions/divi-mod-functions.php on line 75

Notice: Undefined index: material in /home/clondesignuniver/public_html/wp-content/plugins/glossary-by-codeat-premium/frontend/Enqueue.php on line 107
PHP - clondesignuniversity.webempresa.eu

Se trata de un lenguaje programación, de código abierto (Open Source) centrado en el desarrollo web que puede ser incrustado en HTML.

PHP es el acrónimo Hypertext Preprocessor (en inglés).

Este lenguaje de programación mediante scripts que se ejecutan del lado del servidor se usa para desarrollar sitios web estáticos o dinámicos o aplicaciones web.

Los scripts PHP sólo pueden ser interpretados en un servidor que tenga instalado PHP. En Webempresa utilizamos PHP junto con otras tecnologías web.

Ejemplo de script escrito en PHP que se utiliza para el plugin hello_dolly de WordPress:


<!--?php 
/**
 * @package Hello_Dolly
 * @version 1.7.2
 */
/*
Plugin Name: Hello Dolly
Plugin URI: http://wordpress.org/plugins/hello-dolly/
Description: This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from <cite>Hello, Dolly</cite> in the upper right of your admin screen on every page.
Author: Matt Mullenweg
Version: 1.7.2
Author URI: http://ma.tt/
*/

function hello_dolly_get_lyric() {
	/** These are the lyrics to Hello Dolly */
	$lyrics = "Hello, Dolly
				Well, hello, Dolly
				It's so nice to have you back where you belong
				You're lookin' swell, Dolly
				I can tell, Dolly
				You're still glowin', you're still crowin'
				You're still goin' strong
				I feel the room swayin'
				While the band's playin'
				One of our old favorite songs from way back when
				So, take her wrap, fellas
				Dolly, never go away again
				Hello, Dolly
				Well, hello, Dolly
				It's so nice to have you back where you belong
				You're lookin' swell, Dolly
				I can tell, Dolly
				You're still glowin', you're still crowin'
				You're still goin' strong
				I feel the room swayin'
				While the band's playin'
				One of our old favorite songs from way back when
				So, golly, gee, fellas
				Have a little faith in me, fellas
				Dolly, never go away
				Promise, you'll never go away
				Dolly'll never go away again";

	// Here we split it into lines.
	$lyrics = explode( "\n", $lyrics );

	// And then randomly choose a line.
	return wptexturize( $lyrics[ mt_rand( 0, count( $lyrics ) - 1 ) ] );
}

// This just echoes the chosen line, we'll position it later.
function hello_dolly() {
	$chosen = hello_dolly_get_lyric();
	$lang   = '';
	if ( 'en_' !== substr( get_user_locale(), 0, 3 ) ) {
		$lang = ' lang="en"';
	}

	printf(
		'<p id="dolly"><span class="screen-reader-text">%s </span><span dir="ltr"%s>%s</span></p>',
		__( 'Quote from Hello Dolly song, by Jerry Herman:' ),
		$lang,
		$chosen
	);
}

// Now we set that function up to execute when the admin_notices action is called.
add_action( 'admin_notices', 'hello_dolly' );

// We need some CSS to position the paragraph.
function dolly_css() {
	echo "
	<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" data-wp-preserve="%3Cstyle%20type%3D'text%2Fcss'%3E%0A%09%23dolly%20%7B%0A%09%09float%3A%20right%3B%0A%09%09padding%3A%205px%2010px%3B%0A%09%09margin%3A%200%3B%0A%09%09font-size%3A%2012px%3B%0A%09%09line-height%3A%201.6666%3B%0A%09%7D%0A%09.rtl%20%23dolly%20%7B%0A%09%09float%3A%20left%3B%0A%09%7D%0A%09.block-editor-page%20%23dolly%20%7B%0A%09%09display%3A%20none%3B%0A%09%7D%0A%09%40media%20screen%20and%20(max-width%3A%20782px)%20%7B%0A%09%09%23dolly%2C%0A%09%09.rtl%20%23dolly%20%7B%0A%09%09%09float%3A%20none%3B%0A%09%09%09padding-left%3A%200%3B%0A%09%09%09padding-right%3A%200%3B%0A%09%09%7D%0A%09%7D%0A%09%3C%2Fstyle%3E" data-mce-resize="false" data-mce-placeholder="1" class="mce-object" width="20" height="20" alt="&lt;style&gt;" title="&lt;style&gt;" ?-->
	";
}

add_action( 'admin_head', 'dolly_css' );