Web Entwicklung: Unterschied zwischen den Versionen
Aus Vosp.info
F (Diskussion | Beiträge) (→export import) |
F (Diskussion | Beiträge) (→mysql) |
||
(13 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
+ | ==svg== | ||
+ | * http://www.mediaevent.de/2013/04/svg-in-html-seiten/ | ||
+ | * http://stackoverflow.com/questions/6793312/how-to-use-jquery-in-svg-scalable-vector-graphics | ||
+ | |||
== apache == | == apache == | ||
Installation | Installation | ||
Zeile 14: | Zeile 18: | ||
</source> | </source> | ||
+ | |||
+ | == php == | ||
+ | |||
+ | === php4 nogoes in php5 === | ||
+ | ==== fehlende Hochkommatas in Arrays ==== | ||
+ | * php4 | ||
+ | <source lang="php"> | ||
+ | if ($quote) | ||
+ | $val[value]="'".addslashes($val[value])."'"; | ||
+ | $this->fields.="`$val[key]`"; | ||
+ | $this->values.="$val[value]"; | ||
+ | </source> | ||
+ | * php5 | ||
+ | <source lang="php"> | ||
+ | if ($quote) | ||
+ | $val['value']="'".addslashes($val['value'])."'"; | ||
+ | $this->fields.="`".$val['key']."`"; | ||
+ | $this->values.="".$val['value'].""; | ||
+ | </source> | ||
+ | |||
+ | ==== SESSIONS ==== | ||
+ | in php5 wurden folgende Funktionen entfernt | ||
+ | * session_is_registered | ||
+ | * session_register | ||
+ | |||
+ | <source lang="php"> | ||
+ | function session_is_registered($x){ | ||
+ | if (isset($_SESSION['$x'])) | ||
+ | return true; | ||
+ | else | ||
+ | return false; | ||
+ | } | ||
+ | </source> | ||
+ | |||
+ | ==== globale Variablen aus _POST, _GET, _FILES, _SESSIONS ==== | ||
+ | * in php4 waren globale Variablen aus _POST, _GET, _FILES, _SESSIONS nicht im jeweiligen Array gekapselt | ||
+ | |||
+ | aus | ||
+ | <source lang="php"> | ||
+ | $var_post | ||
+ | $var_get | ||
+ | $var_file | ||
+ | $var_sessions | ||
+ | </source> | ||
+ | wird | ||
+ | <source lang="php"> | ||
+ | $_POST['var_post'] | ||
+ | $_GET['var_get'] | ||
+ | $_FILES['var_file'] | ||
+ | $_SESSIONS['var_sessions'] | ||
+ | |||
+ | </source> | ||
+ | |||
+ | === pear === | ||
+ | <source lang="bash"> | ||
+ | apt-get install php5-dev make php-pear | ||
+ | </source> | ||
+ | |||
+ | * http://blog.jerrevds.be/article/install-apc-or-pecl-debian | ||
+ | * [https://de.wikipedia.org/wiki/PHP_Extension_and_Application_Repository wp:PEAR] - PHP Extension and Application Repository | ||
+ | ** [https://de.wikipedia.org/wiki/PHP_Extension_and_Application_Repository#PECL wp:PEAR#PECL] - PHP Extension Community Library | ||
+ | === cairo === | ||
+ | ==== Installation ==== | ||
+ | <source lang="bash"> | ||
+ | pecl install cairo | ||
+ | pecl install cairo channel://pecl.php.net/cairo-0.3.2 | ||
+ | echo "extension=cairo.so" >> /etc/php5/apache2/php.ini | ||
+ | /etc/init.d/apache2 restart | ||
+ | </source> | ||
+ | |||
+ | * http://cairographics.org/cairo-php/ | ||
+ | |||
+ | ==== Beispiel ==== | ||
+ | |||
+ | <source lang="bash"> | ||
+ | $s = new CairoImageSurface(CairoFormat::ARGB32, 400, 400); | ||
+ | $c = new CairoContext($s); | ||
+ | $c->fill(); | ||
+ | $c->setSourceRGB(1, 0, 0); | ||
+ | $c->setLineWidth(50); | ||
+ | $c->arc(200, 200, 100, 0, 2 * M_PI); | ||
+ | $c->stroke(); | ||
+ | $c->setSourceRGB(0, 0, 0.6); | ||
+ | $c->rectangle(0, 160, 400, 75); | ||
+ | $c->fill(); | ||
+ | |||
+ | $s->writeToPng(dirname(__FILE__) . '/test.png'); | ||
+ | </source> | ||
+ | |||
+ | * [http://cambiatablog.wordpress.com/2010/11/06/getting-started-with-cairo-graphics-and-php/ Getting started with PHP Cairo graphics extension on XP ] | ||
=== Probleme === | === Probleme === | ||
Zeile 23: | Zeile 117: | ||
* [http://wiki.debian.org/LaMp LaMp] | * [http://wiki.debian.org/LaMp LaMp] | ||
− | |||
== mysql == | == mysql == | ||
− | + | [[mysql]] | |
− | |||
− | |||
− |
Aktuelle Version vom 1. Juli 2020, 08:28 Uhr
svg
- http://www.mediaevent.de/2013/04/svg-in-html-seiten/
- http://stackoverflow.com/questions/6793312/how-to-use-jquery-in-svg-scalable-vector-graphics
apache
Installation
apt-get install mysql-server mysql-client apache2 php5 php5-mysql libapache2-mod-php5 phpmyadmin
/usr/bin/mysqladmin -u root password 'enter-your-good-new-password-here'
/etc/init.d/apache2 restart
Konfiguration für die Entwicklung
/etc/php5/apache2/php.ini
error_reporting = E_ALL & ~E_DEPRECATED
display_errors = On
php
php4 nogoes in php5
fehlende Hochkommatas in Arrays
- php4
if ($quote)
$val[value]="'".addslashes($val[value])."'";
$this->fields.="`$val[key]`";
$this->values.="$val[value]";
- php5
if ($quote)
$val['value']="'".addslashes($val['value'])."'";
$this->fields.="`".$val['key']."`";
$this->values.="".$val['value']."";
SESSIONS
in php5 wurden folgende Funktionen entfernt
- session_is_registered
- session_register
function session_is_registered($x){
if (isset($_SESSION['$x']))
return true;
else
return false;
}
globale Variablen aus _POST, _GET, _FILES, _SESSIONS
- in php4 waren globale Variablen aus _POST, _GET, _FILES, _SESSIONS nicht im jeweiligen Array gekapselt
aus
$var_post
$var_get
$var_file
$var_sessions
wird
$_POST['var_post']
$_GET['var_get']
$_FILES['var_file']
$_SESSIONS['var_sessions']
pear
apt-get install php5-dev make php-pear
- http://blog.jerrevds.be/article/install-apc-or-pecl-debian
- wp:PEAR - PHP Extension and Application Repository
- wp:PEAR#PECL - PHP Extension Community Library
cairo
Installation
pecl install cairo
pecl install cairo channel://pecl.php.net/cairo-0.3.2
echo "extension=cairo.so" >> /etc/php5/apache2/php.ini
/etc/init.d/apache2 restart
Beispiel
$s = new CairoImageSurface(CairoFormat::ARGB32, 400, 400);
$c = new CairoContext($s);
$c->fill();
$c->setSourceRGB(1, 0, 0);
$c->setLineWidth(50);
$c->arc(200, 200, 100, 0, 2 * M_PI);
$c->stroke();
$c->setSourceRGB(0, 0, 0.6);
$c->rectangle(0, 160, 400, 75);
$c->fill();
$s->writeToPng(dirname(__FILE__) . '/test.png');
Probleme
falls das php nicht interpretiert wird, sondern stumpf ausgegeben wird
/etc/php5/apache2/php.ini da nicht "<?php" verwendet wird, muss der short_open_tag aktiviert werden!!!!
short_open_tag = On