cvs: phpdoc /nl Translators /nl/features connection-handling.xml cookies.xml error-handling.xml images.xml persistent-connections.xml
remote-files.xml

From: Date: Wed, 11 Oct 2000 19:57:00 +0000
Subject: cvs: phpdoc /nl Translators /nl/features connection-handling.xml cookies.xml error-handling.xml images.xml persistent-connections.xml
remote-files.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969332461@lists.php.net to get a copy of this message
mathieu Wed Oct 11 12:57:00 2000 EDT Modified files: /phpdoc/nl Translators /phpdoc/nl/features connection-handling.xml cookies.xml error-handling.xml images.xml persistent-connections.xml remote-files.xml Log: Changed my personal data in Translators and translated most of features/ Index: phpdoc/nl/Translators diff -u phpdoc/nl/Translators:1.1 phpdoc/nl/Translators:1.2 --- phpdoc/nl/Translators:1.1 Tue Oct 10 16:05:48 2000 +++ phpdoc/nl/Translators Wed Oct 11 12:56:59 2000 @@ -2,28 +2,27 @@ and understand what is here, and where we are with the Dutch tranlations... -The hungarian manual is edited by Matthieu Kooiman en Derick Rethans. -(CaPS and OpenSrc on #php). +The Dutch manual is edited by Mathieu 'CaPS' Kooiman en Derick 'OpenSrc' Rethans. -Translators (in abc order): +Translators (in alphabetic order): CVS Name Email(s) ============================================================================= derick Derick Rethans d.rethans@jdimedia.nl - Matthieu Kooiman matthieu@gginter.nl +mathieu Mathieu Kooiman mathieu@gginter.net -Filename Translator Status +Filename Translator Status ============================================================================= -bookinfo.xml Derick done -preface.xml Derick done +bookinfo.xml Derick done +preface.xml Derick done ------- appendices ---------------------------------------------------------- debugger.xml escaping.xml -history.xml Derick done -http-stuff.xml Derick done +history.xml Derick done +http-stuff.xml Derick done migration.xml phpdevel.xml -regexp.xml Derick done +regexp.xml Derick done ------- chapters ------------------------------------------------------------ config.xml copyright.xml @@ -31,14 +30,14 @@ intro.xml security.xml ------- features ------------------------------------------------------------ -connection-handling.xml -cookies.xml -error-handling.xml +connection-handling.xml Mathieu done +cookies.xml Mathieu done +error-handling.xml Mathieu done file-upload.xml http-auth.xml -images.xml -persistent-connections.xml -remote-files.xml +images.xml Mathieu done +persistent-connections.xml Mathieu done +remote-files.xml Mathieu done ------- functions ----------------------------------------------------------- apache.xml array.xml @@ -80,7 +79,7 @@ misc.xml msql.xml mssql.xml -mysql.xml +mysql.xml Mathieu Being worked on network.xml nis.xml oci8.xml @@ -120,4 +119,4 @@ operators.xml types.xml variables.xml ----------------------------------------------------------------------------- \ No newline at end of file +---------------------------------------------------------------------------- Index: phpdoc/nl/features/connection-handling.xml diff -u phpdoc/nl/features/connection-handling.xml:1.1 phpdoc/nl/features/connection-handling.xml:1.2 --- phpdoc/nl/features/connection-handling.xml:1.1 Tue Oct 10 15:07:53 2000 +++ phpdoc/nl/features/connection-handling.xml Wed Oct 11 12:56:59 2000 @@ -2,12 +2,12 @@ <title>Connection handling</title> <note> - <para>The following applies to 3.0.7 and later.</para> + <para>Het volgende is alleen actief in PHP 3.0.7 en hoger.</para> </note> <para> - Internally in PHP a connection status is maintained. There are 3 - possible states: + Intern in PHP wordt de connectie status bijgehouden. Er zijn 3 + mogelijke statussen mogelijk: <itemizedlist> <listitem><simpara>0 - NORMAL</simpara></listitem> <listitem><simpara>1 - ABORTED</simpara></listitem> @@ -16,60 +16,58 @@ </para> <simpara> - When a PHP script is running normally the NORMAL state, is active. - If the remote client disconnects the ABORTED state flag is - turned on. A remote client disconnect is usually caused by the - user hitting his STOP button. If the PHP-imposed time limit (see - <function>set_time_limit</function>) is hit, the TIMEOUT state flag - is turned on.</simpara> + Als een PHP script normaal draait is de NORMAL status actief. + Zogauw een gebruiker de HTTP connectie sluit is de ABORTED status + actief. Dit gebeurt meestal als de gebruiker op z'n STOP knop klikt. + Als de door PHP bijgehouden tijdlimiet (zie <function>set_time_limit</function>) + overschreden word, is de TIMEOUT status actief. + </simpara> <simpara> - You can decide whether or not you want a client disconnect to cause - your script to be aborted. Sometimes it is handy to always have your - scripts run to completion even if there is no remote browser receiving - the output. The default behaviour is however for your script to be - aborted when the remote client disconnects. This behaviour can be - set via the ignore_user_abort php3.ini directive as well as through - the corresponding php3_ignore_user_abort Apache .conf directive or - with the <function>ignore_user_abort</function> function. If you do - not tell PHP to ignore a user abort and the user aborts, your script - will terminate. The one exception is if you have registered a shutdown - function using <function>register_shutdown_function</function>. With a - shutdown function, when the remote user hits his STOP button, the - next time your script tries to output something PHP will detect that - the connection has been aborted and the shutdown function is called. - This shutdown function will also get called at the end of your script - terminating normally, so to do something different in case of a client - diconnect you can use the <function>connection_aborted</function> - function. This function will return true if the connection was - aborted.</simpara> - + Je kan er voor kiezen of je wel of niet je script wil eindigen zogauw + een gebruiker z'n connectie sluit. Soms is het handig om je scripts + altijd tot het einde te laten lopen, zelfs als er geen browser aan de + andere kant is om de output te ontvangen. Standaard word echter je + script gestopt zogauw de gebruiker de connectie sluit. Dit gedrag kan + gewijzigd worden met de ignore_user_abort php.ini directive of met + de corresponderende php_ignore_user_abort Apache .conf directive of + het makkelijkst met de <function>ignore_user_abort</function> functie. + Als je PHP niet vertelt het sluiten van een connectie te negeren zal + je script gestopt worden zogauw dit gebeurd. Er is een uitzondering, + als je een shutdown functie hebt geregistreerd met de <function>register_shutdown_function</function> + functie zal PHP zogauw hij ontdekt dat er geen connectie meer is, proberen + deze shutdown functie aan te roepen. Deze functie wordt echter ook + aangeroepen als je script op een normale manier eindigd. Als je alleen + actie wilt ondernemen als de gebruiker de connectie sluit kan je + gebruik maken van de <function>connection_aborted</function> functie. + Deze functie geeft TRUE als de connectie gesloten is. + </simpara> <simpara> - Your script can also be terminated by the built-in script timer. - The default timeout is 30 seconds. It can be changed using - the max_execution_time php3.ini directive or the corresponding - php3_max_execution_time Apache .conf directive as well as with - the <function>set_time_limit</function> function. When the timer - expires the script will be aborted and as with the above client - disconnect case, if a shutdown function has been registered it will - be called. Within this shutdown function you can check to see if - a timeout caused the shutdown function to be called by calling the - <function>connection_timeout</function> function. This function will - return true if a timeout caused the shutdown function to be called.</simpara> - + Je script kan ook be&euml;indigd worden door de ingebouwde script timer. + De standaard timeout is 30 secondes. Het kan veranderd worden met + de max_execution_time php.ini directive of met de corresponderende + php_max_execution_time Apache .conf directive alsmede met de + <function>set_time_limit</function> functie. Als de toegestane tijd + word overschreden wordt het script be&euml;indigd en net zoals in + het geval dat de gebruiker de connectie sluit word er een shutdown + functie aangeroepen mits deze geregistreerd is. In deze shutdown + functie kan je controleren of een timeout de oorzaak is van het aanroepen + van de shutdown function. Dit doe je met de <function>connection_timeout</function> + functie. Deze functie geeft TRUE als een timeout de oorzaak was + </simpara> <simpara> - One thing to note is that both the ABORTED and the TIMEOUT states - can be active at the same time. This is possible if you tell - PHP to ignore user aborts. PHP will still note the fact that - a user may have broken the connection, but the script will keep - running. If it then hits the time limit it will be aborted and - your shutdown function, if any, will be called. At this point - you will find that <function>connection_timeout</function> - and <function>connection_aborted</function> return true. - You can also check both states in a single call by using the - <function>connection_status</function>. This function returns a - bitfield of the active states. So, if both states are active it - would return 3, for example.</simpara> + Een ding om te onthouden is dat de ABORTED status en de TIMEOUT status + allebei actief kunnen zijn op het zelfde moment. Dit is pas mogelijk + als je PHP verteld om zgn. 'user aborts' (gebruikt sluit connectie) + te negeren. PHP zal merken dat de gebruiker de connectie gesloten heeft + maar het script blijft draaien. Als het tijdslimiet bereikt word, wordt + het script be&euml;indigd en de shutdown functie aangeroepen. + Je zal merken dat als dit het geval is zowel <function>connection_timeout</function> + als <function>connection_aborted</function> TRUE geven. Je kan deze + statussen met 1 functie controleren, namelijk <function>connection_status</function>. + Deze functie geeft een bitfield met de huidig actieve statussen. Dus als + beide statussen actief zijn zou het 3 geven. + </simpara> </chapter> Index: phpdoc/nl/features/cookies.xml diff -u phpdoc/nl/features/cookies.xml:1.1 phpdoc/nl/features/cookies.xml:1.2 --- phpdoc/nl/features/cookies.xml:1.1 Tue Oct 10 15:07:53 2000 +++ phpdoc/nl/features/cookies.xml Wed Oct 11 12:56:59 2000 @@ -2,21 +2,22 @@ <title>Cookies</title> <para> - PHP transparently supports HTTP cookies. Cookies are a mechanism - for storing data in the remote browser and thus tracking - or identifying return users. You can set cookies using the - <function>setcookie</function> function. Cookies are part of the - HTTP header, so <function>setcookie</function> must be called before - any output is sent to the browser. This is the same limitation that - <function>header</function> has.</para> + PHP ondersteunt HTTP cookies op een transparante manier. Cookies zijn + een manier om data te plaatsen in de browser van de gebruiker. Op deze + manier kan een gebruiker gevolgd en/of geidentificeerd worden. Je kan + cookies plaatsen met de <function>setcookie</function> functie. Cookies + maken deel uit van de HTTP header, dus <function>setcookie</function> moet + aangeroepen worden voordat enige output is gegenereerd. Dit beperking werkt ook + op de <function>header</function>. + </para> <para> - Any cookies sent to you from the client will automatically be - turned into a PHP variable just like GET and POST method data. If - you wish to assign multiple values to a single cookie, just add - <emphasis>[]</emphasis> to the cookie name. For more details see - the <function>setcookie</function> function.</para> - + Alle cookies die van jou naar de gebruiker gestuurd worden, worden + automatisch tot een PHP variable gemaakt zoals gebeurd met + GET en POST method data. Als je meerdere waarden wil toekennen moet + je <emphasis>[]</emphasis> aan de cookie naam toevoegen. Voor meer + informatie met betrekking tot cookies zie de <function>setcookie</function> functie. + </para> </chapter> <!-- Keep this comment at the end of the file Index: phpdoc/nl/features/error-handling.xml diff -u phpdoc/nl/features/error-handling.xml:1.1 phpdoc/nl/features/error-handling.xml:1.2 --- phpdoc/nl/features/error-handling.xml:1.1 Tue Oct 10 15:07:53 2000 +++ phpdoc/nl/features/error-handling.xml Wed Oct 11 12:56:59 2000 @@ -2,30 +2,29 @@ <title>Error Handling</title> <para> - There are several types of errors and warnings in PHP. They are: - + Er zijn verschillende types fouten en waarschuwingen in PHP, namelijk: <table> - <title>PHP error types</title> + <title>PHP fout types</title> <tgroup cols="4"> <thead> <row> - <entry>Value</entry> - <entry>Constant</entry> - <entry>Description</entry> - <entry>Note</entry> + <entry>Waarde</entry> + <entry>Constante</entry> + <entry>Omschrijving</entry> + <entry>Opmerking</entry> </row> </thead> <tbody> <row> <entry>1</entry> <entry>E_ERROR</entry> - <entry>fatal run-time errors</entry> + <entry>fatale run-time fouten</entry> <entry></entry> </row> <row> <entry>2</entry> <entry>E_WARNING</entry> - <entry>run-time warnings (non fatal errors)</entry> + <entry>run-time waarschuwingen (niet fatale fouten)</entry> <entry></entry> </row> <row> @@ -38,36 +37,35 @@ <entry>8</entry> <entry>E_NOTICE </entry> <entry> - run-time notices (less serious than warnings) + run-time opmerkingen (minder belangrijk dan waarschuwingen) </entry> <entry></entry> </row> <row> <entry>16</entry> <entry>E_CORE_ERROR</entry> - <entry>fatal errors that occur during PHP's initial startup</entry> - <entry>PHP 4 only</entry> + <entry>fatale fouten die gebeuren terwijl PHP opstart</entry> + <entry>alleen in PHP 4</entry> </row> <row> <entry>32</entry> <entry>E_CORE_WARNING</entry> <entry> - warnings (non fatal errors) that occur during PHP's initial - startup + waarschuwingen (niet fatale fouten) die gegeven worden terwijl PHP opstart </entry> - <entry>PHP 4 only</entry> + <entry>alleen in PHP 4</entry> </row> <row> <entry>64</entry> <entry>E_COMPILE_ERROR</entry> - <entry>fatal compile-time errors</entry> - <entry>PHP 4 only</entry> + <entry>fatale compile-time fout</entry> + <entry>alleen in PHP 4</entry> </row> <row> <entry>128</entry> <entry>E_COMPILE_WARNING</entry> - <entry>compile-time warnings (non fatal errors)</entry> - <entry>PHP 4 only</entry> + <entry>compile-time waarschuwingen (niet fatale fouten)</entry> + <entry>alleen in PHP 4</entry> </row> <row> <entry>256</entry> @@ -78,19 +76,19 @@ <row> <entry>512</entry> <entry>E_USER_WARNING</entry> - <entry>user-generated warning message</entry> - <entry>PHP 4 only</entry> + <entry>door de gebruiker gegenereerde waarschuwing</entry> + <entry>alleen in PHP 4</entry> </row> <row> <entry>1024</entry> <entry>E_USER_NOTICE </entry> - <entry>user-generated notice message</entry> - <entry>PHP 4 only</entry> + <entry>door de gebruiker gegenereerde opmerking</entry> + <entry>alleen in PHP 4</entry> </row> <row> <entry></entry> <entry>E_ALL</entry> - <entry>all of the above, as supported</entry> + <entry>alle bovenstaande, indien ondersteunt</entry> <entry></entry> </row> </tbody> @@ -99,135 +97,132 @@ </para> <para> - The above values (either numerical or symbolic) are used to build - up a bitmask that specifies which errors to report. You can use the - <link linkend="language.operators.bitwise">bitwise operators</link> - to combine these values or mask out certain types of errors. Note - that only '|', '~', '!', and '&amp;' will be understood within - <filename>php.ini</filename>, however, and that no bitwise - operators will be understood within <filename>php3.ini</filename>. + De bovenstaande waarden (danwel numeriek of symbolisch) worden gebruikt + om een bitmask te maken dat aangeeft welke errors er gemeld moeten worden. + Je kan <link linkend="language.operators.bitwise">bitwise operators</link> + gebruiker om waarden danwel toetevoegen danwel te verwijderen uit het bitmask. + Let op: alleen '|', '~', '!' and '&amp;' worden ondersteund + in <filename>php.ini</filename> maar er worden helemaal geen bitwise operatoren + ondersteund in <filename>php3.ini<filename> </para> <para> - In PHP 4, the default <link - linkend="ini.error-reporting">error_reporting</link> setting is - <literal>E_ALL &amp; ~E_NOTICE</literal>, meaning to display all errors - and warnings which are not E_NOTICE-level. In PHP 3, the default - setting is <literal>(E_ERROR | E_WARNING | E_PARSE)</literal>, - meaning the same thing. Note, however, that since constants are not - supported in PHP 3's <filename>php3.ini</filename>, the <link - linkend="ini.error-reporting">error_reporting</link> setting there - must be numeric; hence, it is <literal>7</literal>. + In PHP 4 is de standaard <link linkend="ini.error-reporting">error_reporting</link> + instelling <literal>E_ALL &amp; ~E_NOTICE</literal>, wat betekend + dat alle foutmeldingen/waarschuwingen gemeld worden tenzij deze + een E_NOTICE is. In PHP 3 is de standaard instelling + <literal>(E_ERROR | E_WARNING | E_PARSE)</literal>, wat precies hetzelfde + betekend. Let op: gezien het feit dat constante niet ondersteund worden + in PHP 3's <filename>php3.ini</filename> de <link linkend="ini.error-reporting">error_reporting</link>, + moet de instelling numeriek of wel <literal>7</literal> zijn. </para> - <para> - The initial setting can be changed in the ini file with the <link - linkend="ini.error-reporting">error_reporting</link> directive, in - your Apache <filename>httpd.conf</filename> file with the - php_error_reporting (php3_error_reporting for PHP 3) directive, and - lastly it may be set at runtime within a script by using the - <function>error_reporting</function> function. + De standaard instelling kan worden veranderd in het .ini bestand met het + <link linkend="ini.error-reporting>error_reporting</link> directive, + in je Apache <filename>httpd.conf</filename> bestand kan dit gedaan worden + met het php_error_reporting (php3_error_reporting for PHP3) directive en als + laatste kan het ook run-time gewijzigd worden met de <function>error_reporting</function> functie. </para> - + <warning> <para> - When upgrading code or servers from PHP 3 to PHP 4 you should - check these settings and calls to - <function>error_reporting</function> or you might disable - reporting the new error types, especially E_COMPILE_ERROR. This - may lead to empty documents without any feedback of what happened - or where to look for the problem. + Als je code or servers upgrade van PHP3 naar PHP4 moet je controleren + of deze instellingen en/of aanroepen naar de <function>error_reporting</function> + juist zijn. Als je dit niet doet kan het zijn dat belangrijke nieuwe + fout types zoals E_COMPILE_ERROR niet gebruikt kunnen worden. Dit kan + leiden tot lege resultaat document zonder enige informatie over wat er + fout is gegegaan. </para> </warning> <para> - All <link linkend="language.expressions">PHP expressions</link> can - also be called with the "@" prefix, which turns off error reporting - for that particular expression. If an error occurred during such - an expression and the <link - linkend="ini.track-errors">track_errors</link> feature is enabled, - you can find the error message in the global variable + Alle <link linkend="language.expressions">PHP expressies</link> kunnen + aangeroepen met de '@' prefix. Dit zorgt er voor dat mocht er een fout + optreden in deze expressie deze niet gemeld word. Als er een fout optreedt + in een expressie en de <link linkend="ini.track-errors">track_errors</link> + mogelijkheid word gebruikt, kan je de foutmelding in de globale variable $php_errormsg. </para> <warning> <para> - Currently the <link linkend="language.operators.errorcontrol">@ - error-control operator</link> prefix will even disable error - reporting for critical errors that will terminate script - execution. Among other things, this means that if you use <link - linkend="language.operators.errorcontrol">@</link> to suppress - errors from a certain function and either it isn't available or - has been mistyped, the script will die right there with no - indication as to why. + Op het moment meld de <link linkend="language.operators.errorcontrol">@ + error-control operator</link> prefix zelfs geen fatale fouten die het + script be&euml;indigen. Dit betekent onderandere dat als je <link + linkend="language.operators.errorcontrol">@</link> gebruikt om + foutmeldingen te onderdrukken op een functie die niet bestaat of + fout getypt is, het script zal stoppen zonder enige indicatie van + waarom het misgegaan is. </para> </warning> <para> - Below we can see an example of using the error handling capabilities in - PHP. We define a error handling function which logs the information into - a file (using an XML format), and e-mails the developer in case a critical - error in the logic happens. + Hieronder staat een voorbeeld over hoe je de error handling mogelijkheden + in PHP kan gebruiken. We definie&euml;ren een error handling functie die + fout informatie naar een bestand logt gebruikmakend van een XML formaat. + Mocht er een kritieke fout optreden dan wordt de ontwikkelaar een emailtje + gestuurd. <example> - <title>Using error handling in a script</title> + <title>Gebruik van error handling in PHP</title> <programlisting role="php"> &lt;?php -// we will do our own error handling +// We regelen onze eigen fout rapportage. error_reporting(0); -// user defined error handling function +// Onze eigen error handler function userErrorHandler ($errno, $errmsg, $filename, $linenum, $vars) { - // timestamp for the error entry + // timestamp voor de log entry $dt = date(&quot;Y-m-d H:i:s (T)&quot;); - // define an assoc array of error string - // in reality the only entries we should - // consider are 2,8,256,512 and 1024 - $errortype = array ( - 1 =&gt; &quot;Error&quot;, - 2 =&gt; &quot;Warning&quot;, - 4 =&gt; &quot;Parsing Error&quot;, - 8 =&gt; &quot;Notice&quot;, - 16 =&gt; &quot;Core Error&quot;, - 32 =&gt; &quot;Core Warning&quot;, - 64 =&gt; &quot;Compile Error&quot;, - 128 =&gt; &quot;Compile Warning&quot;, - 256 =&gt; &quot;User Error&quot;, - 512 =&gt; &quot;User Warning&quot;, - 1024=&gt; &quot;User Notice&quot; + // definie&euml;r een associatieve array met mogelijk fouten + // in realiteit zouden we alleen kijken naar de fouten + // 2,8,256,512 en 1024 + + $fouttype = array ( + 1 =&gt; &quot;Fout&quot;, + 2 =&gt; &quot;Waarschuwing&quot;, + 4 =&gt; &quot;Parsing Fout&quot;, + 8 =&gt; &quot;Opmerking&quot;, + 16 =&gt; &quot;Interne Fout&quot;, + 32 =&gt; &quot;Interne Waarschuwing&quot;, + 64 =&gt; &quot;Compile Fout&quot;, + 128 =&gt; &quot;Compile Waarschuwing&quot;, + 256 =&gt; &quot;Gebruikers Error&quot;, + 512 =&gt; &quot;Gebruikers Waarschuwing&quot;, + 1024=&gt; &quot;Gebruikers Opmerking&quot; ); - // set of errors for which a var trace will be saved - $user_errors = array(E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE); + // Lijst van errors waar we de variable voor loggen. + $gebruikers_fouten = array(E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE); - $err = &quot;&lt;errorentry&gt;\n&quot;; - $err .= &quot;\t&lt;datetime&gt;&quot;.$dt.&quot;&lt;/datetime&gt;\n&quot;; - $err .= &quot;\t&lt;errornum&gt;&quot;.$errno.&quot;&lt;/errnumber&gt;\n&quot;; - $err .= &quot;\t&lt;errortype&gt;&quot;.$errortype[$errno].&quot;&lt;/errortype&gt;\n&quot;; - $err .= &quot;\t&lt;errormsg&gt;&quot;.$errmsg.&quot;&lt;/errormsg&gt;\n&quot;; - $err .= &quot;\t&lt;scriptname&gt;&quot;.$filename.&quot;&lt;/scriptname&gt;\n&quot;; + $err = &quot;&lt;foutentry&gt;\n&quot;; + $err .= &quot;\t&lt;datumtijd&gt;&quot;.$dt.&quot;&lt;/datumtijd&gt;\n&quot;; + $err .= &quot;\t&lt;foutnum&gt;&quot;.$errno.&quot;&lt;/foutnum&gt;\n&quot;; + $err .= &quot;\t&lt;fouttype&gt;&quot;.$fouttype[$errno].&quot;&lt;/fouttype&gt;\n&quot;; + $err .= &quot;\t&lt;foutmsg&gt;&quot;.$errmsg.&quot;&lt;/foutmsg&gt;\n&quot;; + $err .= &quot;\t&lt;scriptnaam&gt;&quot;.$filename.&quot;&lt;/scriptnaam&gt;\n&quot;; $err .= &quot;\t&lt;scriptlinenum&gt;&quot;.$linenum.&quot;&lt;/scriptlinenum&gt;\n&quot;; - if (in_array($errno, $user_errors)) - $err .= &quot;\t&lt;vartrace&gt;&quot;.wddx_serialize_value($vars,&quot;Variables&quot;).&quot;&lt;/vartrace&gt;\n&quot;; - $err .= &quot;&lt;/errorentry&gt;\n\n&quot;; + if (in_array($errno, $gebruikers_errors)) + $err .= &quot;\t&lt;vartrace&gt;&quot;.wddx_serialize_value($vars,&quot;Variablen&quot;).&quot;&lt;/vartrace&gt;\n&quot;; + $err .= &quot;&lt;/foutentry&gt;\n\n&quot;; // for testing // echo $err; - // save to the error log, and e-mail me if there is a critical user error + // Sla de log op, en e-mail me als er een kritieke fout optreed error_log($err, 3, &quot;/usr/local/php4/error.log&quot;); if ($errno == E_USER_ERROR) - mail(&quot;phpdev@mydomain.com&quot;,&quot;Critical User Error&quot;,$err); + mail(&quot;phpdev@mydomain.com&quot;,&quot;Kritieke fout opgetreden!&quot;,$err); } -function distance ($vect1, $vect2) { +function afstand ($vect1, $vect2) { if (!is_array($vect1) || !is_array($vect2)) { - trigger_error(&quot;Incorrect parameters, arrays expected&quot;, E_USER_ERROR); + trigger_error(&quot;Incorrecte parameters, arrays verwacht&quot;, E_USER_ERROR); return NULL; } if (count($vect1) != count($vect2)) { - trigger_error(&quot;Vectors need to be of the same size&quot;, E_USER_ERROR); + trigger_error(&quot;Vectoren moeten gelijk aantal elementen hebben&quot;, E_USER_ERROR); return NULL; } @@ -235,12 +230,12 @@ $c1 = $vect1[$i]; $c2 = $vect2[$i]; $d = 0.0; if (!is_numeric($c1)) { - trigger_error(&quot;Coordinate $i in vector 1 is not a number, using zero&quot;, + trigger_error(&quot;Coordinaat $i in vector 1 is geen numerieke waarde, nul word gebruikt&quot;, E_USER_WARNING); $c1 = 0.0; } if (!is_numeric($c2)) { - trigger_error(&quot;Coordinate $i in vector 2 is not a number, using zero&quot;, + trigger_error(&quot;Coordinaat $i in vector 2 is geen numerieke waarde, nul word gebruikt&quot;, E_USER_WARNING); $c2 = 0.0; } @@ -249,35 +244,35 @@ return sqrt($d); } -$old_error_handler = set_error_handler(&quot;userErrorHandler&quot;); +$oude_error_handler = set_error_handler(&quot;userErrorHandler&quot;); -// undefined constant, generates a warning +// niet gedefinie&eumlrde constante, er wordt een waarschuwing gegeven $t = I_AM_NOT_DEFINED; -// define some &quot;vectors&quot; +// define&eumlr een paar &quot;vectoren&quot; $a = array(2,3,&quot;foo&quot;); $b = array(5.5, 4.3, -1.6); $c = array (1,-3); -// generate a user error +// genereer een fout $t1 = distance($c,$b).&quot;\n&quot;; -// generate another user error -$t2 = distance($b,&quot;i am not an array&quot;).&quot;\n&quot;; +// genereer nog fout +$t2 = distance($b,&quot;ik ben geen array&quot;).&quot;\n&quot;; -// generate a warning +// genereer een waarschuwing $t3 = distance($a,$b).&quot;\n&quot;; ?&gt; </programlisting> </example> - This is just a simple example showing how to use the - <link linkend="ref.errorfunc">Error Handling and Logging - functions</link>. + Dit is slechts een simpel voorbeeld wat laat zien hoe je de + <link linkend="ref.errorfunc">Error Handling en Logging + functies</link> kan gebruiken. </para> <para> - See also <function>error_reporting</function>, + Zie ook: <function>error_reporting</function>, <function>error_log</function>, <function>set_error_handler</function>, <function>restore_error_handler</function>, Index: phpdoc/nl/features/images.xml diff -u phpdoc/nl/features/images.xml:1.1 phpdoc/nl/features/images.xml:1.2 --- phpdoc/nl/features/images.xml:1.1 Tue Oct 10 15:07:53 2000 +++ phpdoc/nl/features/images.xml Wed Oct 11 12:56:59 2000 @@ -2,40 +2,39 @@ <title>Creating and manipulating images</title> <simpara> - PHP is not limited to creating just HTML output. It can also be - used to create and manipulate image files in a variety of different - image formats, including gif, png, jpg, wbmp, and xpm. Even more - convenient, php can output image streams directly to a browser. You - will need to compile PHP with the GD library of image functions for - this to work. GD and PHP may also require other libraries, depending - on which image formats you want to work with. + PHP kan meer dan enkel HTML generen. Het kan ook gebruikt worden om + plaatjes in verschillende formaten (GIF, PNG, JPG, WBMP and XPM) te + cre&euml;ren en te manipuleren. Wat nog veel handiger is, is dat PHP + Image Streams direct naar de browser kan sturen. Om met plaatjes te + kunnen werken moet je PHP compileren met de GD library. GD en PHP + kunnen meerdere libraries nodig hebben maar dit ligt aan de bestands + formaten je wil gebruiken. </simpara> <para> <example> - <title>GIF creation with PHP</title> + <title>GIF generatie met PHP</title> <programlisting role="php"> &lt;?php Header("Content-type: image/gif"); $string=implode($argv," "); - $im = imagecreatefromgif("images/button1.gif"); - $orange = ImageColorAllocate($im, 220, 210, 60); + $im = imagecreatefromgif("images/knop1.gif"); + $oranje = ImageColorAllocate($im, 220, 210, 60); $px = (imagesx($im)-7.5*strlen($string))/2; - ImageString($im,3,$px,9,$string,$orange); + ImageString($im,3,$px,9,$string,$oranje); ImageGif($im); ImageDestroy($im); -?> +?&gt; </programlisting> </example> - - This example would be called from a page with a tag like: &lt;img - src=&quot;button.php?text&quot;&gt; The above button.php script - then takes this &quot;text&quot; string an overlays it on top of a - base image which in this case is &quot;images/button1.gif&quot; - and outputs the resulting image. This is a very convenient way to - avoid having to draw new button images every time you want to - change the text of a button. With this method they are - dynamically generated. + Dit voorbeeld zou worden aangeroepen vanuit een HTML tag als: &lt;img + src=&quot;button.php?text&quot;&gt; Het bovenstaande script, button.php, + gebruikt dan deze &quot;text&quot; string en plakt het over een bestaand + plaatje; in dit geval &quot;images/knop1.jpg&quot; en stuurt output + vervolgens het resulterende plaatje naar de browser. Dit is een erg + gemakkelijke manier om te voorkomen dat je hele nieuwe plaatjes moet maken + als je enkel de tekst op je knoppen wilt veranderen. Op deze manier worden + ze dynamisch gegenereerd. </para> </chapter> Index: phpdoc/nl/features/persistent-connections.xml diff -u phpdoc/nl/features/persistent-connections.xml:1.1 phpdoc/nl/features/persistent-connections.xml:1.2 --- phpdoc/nl/features/persistent-connections.xml:1.1 Tue Oct 10 15:07:53 2000 +++ phpdoc/nl/features/persistent-connections.xml Wed Oct 11 12:56:59 2000 @@ -2,110 +2,115 @@ <title>Persistent Database Connections</title> <simpara> - Persistent connections are SQL links that do not close when the - execution of your script ends. When a persistent connection is - requested, PHP checks if there's already an identical persistent - connection (that remained open from earlier) - and if it exists, it - uses it. If it does not exist, it creates the link. An 'identical' - connection is a connection that was opened to the same host, with - the same username and the same password (where applicable). - </simpara> - <simpara> - People who aren't thoroughly familiar with the way web servers work - and distribute the load may mistake persistent connects for what - they're not. In particular, they do <emphasis>not</emphasis> give - you an ability to open 'user sessions' on the same SQL link, they - do <emphasis>not</emphasis> give you an ability to build up a - transaction efficently, and they don't do a whole lot of other - things. In fact, to be extremely clear about the subject, - persistent connections don't give you <emphasis>any</emphasis> - functionality that wasn't possible with their non-persistent - brothers. + Persistente connecties zijn connecties naar SQL servers die niet + gesloten worden zogauw je script be&euml;indigd word. Zogauw + een persistente connectie wordt aangevraagd kijkt PHP of er al + een identieke connectie is (dat open gebleven is nadat hij eerder + geopend is) en als deze bestaat word die connectie gebruikt. + Bestaat er nog geen vrij identieke connectie dan wordt er een + nieuwe connectie gelegd. Een 'identieke' connectie is een connectie + die geopend was naar de zelfde host, met de zelfde username en + password (waar van toepassing). + </simpara> + <simpara> + Diegene die niet erg vertrouwd zijn met de manier waarop + webserver werken en de manier waarop ze de aanvragen verdelen + kunnen persistente connecties aanzien voor iets dat ze niet zijn. + Persistente geven je <emphasis>niet</emphasis> de mogelijkheid + om 'user sessions' op deze zelfde SQL connectie te hebben, ze + geven je <emphasis>niet</emphasis> de mogelijkheid om een Transaction + efficienter op te bouwen en ze doen vanalles en nog wat niet. + Om heel duidelijk te zijn, ze geven <emphasis>geen</emphasis> + extra functionaliteit tegenover wat mogelijk is met hun + niet-persistente broertjes. </simpara> <simpara> - Why? + Waarom ? </simpara> <simpara> - This has to do with the way web servers work. There are three ways - in which your web server can utilize PHP to generate web pages. - </simpara> - <simpara> - The first method is to use PHP as a CGI "wrapper". When run this - way, an instance of the PHP interpreter is created and destroyed - for every page request (for a PHP page) to your web server. - Because it is destroyed after every request, any resources that it - acquires (such as a link to an SQL database server) are closed when - it is destroyed. In this case, you do not gain anything from trying - to use persistent connections -- they simply don't persist. - </simpara> - <simpara> - The second, and most popular, method is to run PHP as a module in a - multiprocess web server, which currently only includes Apache. A - multiprocess server typically has one process (the parent) which - coordinates a set of processes (its children) who actually do the - work of serving up web pages. When each request comes in from a a - client, it is handed off to one of the children that is not already - serving another client. This means that when the same client makes - a second request to the server, it may be serviced by a different - child process than the first time. What a persistent connection - does for you in this case it make it so each child process only - needs to connect to your SQL server the first time that it serves a - page that makes us of such a connection. When another page then - requires a connection to the SQL server, it can reuse the - connection that child established earlier. - </simpara> - <simpara> - The last method is to use PHP as a plug-in for a multithreaded web - server. Currently this is only theoretical -- PHP does not yet work - as a plug-in for any multithreaded web servers. Work is progressing - on support for ISAPI, WSAPI, and NSAPI (on Windows), which will all - allow PHP to be used as a plug-in on multithreaded servers like - Netscape FastTrack, Microsoft's Internet Information Server (IIS), - and O'Reilly's WebSite Pro. When this happens, the behavior will be - essentially the same as for the multiprocess model described - before. - </simpara> - <simpara> - If persistent connections don't have any added functionality, what - are they good for? - </simpara> - <simpara> - The answer here is extremely simple -- efficiency. Persistent - connections are good if the overhead to create a link to your SQL - server is high. Whether or not this overhead is really high depends - on many factors. Like, what kind of database it is, whether or not - it sits on the same computer on which your web server sits, how - loaded the machine the SQL server sits on is and so forth. The - bottom line is that if that connection overhead is high, persistent - connections help you considerably. They cause the child process to - simply connect only once for its entire lifespan, instead of every - time it processes a page that requires connecting to the SQL - server. This means that for every child that opened a persistent - connection will have its own open persistent connection to the - server. For example, if you had 20 different child processes that - ran a script that made a persistent connection to your SQL server, - you'd have 20 different connections to the SQL server, one from - each child. - </simpara> - <simpara> - Note, however, that this can have some drawbacks if you are using a - database with connection limits that are exceeded by persistant - child connections. If your database has a limit of 16 simultaneous - connections, and in the course of a busy server session, 17 child - threads attempt to connect, one will not be able to. If there are - bugs in your scripts which do not allow the connections to shut - down (such as infinite loops), a database with only 32 connections - may be rapidly swamped. Check your database documentation for - information on handling abandoned or idle connections. - </simpara> - <simpara> - An important summary. Persistent connections were designed to have - one-to-one mapping to regular connections. That means that you - should <emphasis>always</emphasis> be able to replace persistent - connections with non-persistent connections, and it won't change - the way your script behaves. It <emphasis>may</emphasis> (and - probably will) change the efficiency of the script, but not its - behavior! + Dit heeft te maken met de manier waarop web servers werken. Er zijn + 3 manieren waarop je web server PHP kan gebruiken om pagina's te + genereren. + </simpara> + <simpara> + De eerste manier is om PHP te gebruiken als een CGI "wrapper". Als + je PHP op deze manier gebruikt word een instantie van de PHP + interpreter aangemaakt en vernietigd voor iedere PHP pagina die + wordt opgevraagd. Omdat het na iedere aanvraag vernietigd word, + worden middelen die PHP gebruikt heeft (zoals een connectie naar + een database server) vrijgegeven (gesloten). In dit geval heeft + het geen zin om persistente connecties te gebruiken -- ze blijven + simpelweg niet bestaan. + </simpara> + <simpara> + De tweede, en meest populaire, manier is PHP te gebruiken als een + module in een multiprocess web server, op dit moment alleen Apache. + Een multiprocess webserver heeft standaard 1 process (de parent) + welke een partij andere process (child processen) coordineert. Deze + child processen nemen zorg voor het verwerken van aanvragen. Als + een aanvraag binnenkomt word deze doorgegeven aan een child process + dat op dat moment niets te doen heeft. Dat betekent dat als dezelfde + gebruiker een nieuwe aanvraag stuurt deze door een ander child process + afgehandeld kan worden. Wat een persistente connectie voor je doet + in deze context is dat een child process slechts een connectie + maakt naar een SQL server bij het eerste script dat zo'n connectie + vereist. Als een andere pagina daarna ook een dergelijke connectie + nodig heeft kan de connectie die al eerder gelegd was opnieuw + gebruikt worden. + </simpara> + <simpara> + De laatste methode is om PHP te gebruiken als een plug-ib in een + multithreaded web server. Op dit moment is dit slechts theoretisch + -- PHP werkt nog niet als een plugin voor een multithreaded + web server. Er wordt vooruitgang geboekt op de ontwikkeling voor + support voor ISAPI, WSAPI en NSAPI (onder Windows) welke allemaal + mogelijk maken dat PHP gebruikt wordt als een plug-in op + multithreaded servers zoals Netscape FastTrack, Microsofts Internet + Information Server (IIS) en O'Reilly's WebSite Pro. Zogauw dit + compleet is zal het gedrag van PHP in deze context overeen komen + met het gedrag van PHP in een multiprocess model, wat hierboven + beschreven is. + </simpara> + <simpara> + Als persistente connecties geen extra functionaliteit geven, + waar zijn ze dan goed voor? + </simpara> + <simpara> + Het antwoord is erg simpel -- betere performance. + Persistente connecties zijn goed als de overhead om een connectie + naar je SQL server te leggen groot is. Of die overhead daadwerkelijk + groot is hangt af van veel factoren. Zoals, wat voor database is het, + draait de server op de zelfde server als de webserver. Hoe druk de + server met de database het heeft. Uiteindelijk als deze overhead + inderdaad groot is, zijn persistente connecties een goede hulp. + Ze zorgen ervoor dat het child process zolang het process leeft + slechts 1x een connectie naar de SQL server legt, in plaats van + iedere keer dat het child process een connectie legt zogauw het + een script verwerkt dat zo'n connectie vereist. Dit betekent dat + ieder child process z'n eigen connectie heeft naar de SQL + server. Bijvoorbeeld, als je 20 verschillende child processen + hebt dat een script verwerkt dat een persistente connectie legt, + dan zou je 20 verschillende connecties hebben naar de SQL server. + Een van elk childprocess. + </simpara> + <simpara> + Onthoud wel dat dit z'n nadelen kan hebben als je een database server + gebruikt met een limiet op het aantal connecties. Als je database een + limiet van 16 gelijke connecties heeft, en in laten we zeggen dat we + een drukke server hebben, 17 child processes proberen een connectie + te leggen, zal er een hierin falen. Als je scripts bugs hebben welke + niet de connectie sluiten kan een database met slechts 32 connecties + snel &quot;verdrinken&quot;. Zoek door de database documentatie naar + informatie over het sluiten van verlaten of niet-gebruikte connecties. + </simpara> + <simpara> + Een belangrijke samenvatting. Persistente connectie zijn ontwikkeld + om in principe het zelfe te werken als standaard connecties. + Dat betekent dat je <emphasis>altijd</emphasis> de mogelijk hebt om + persistente connecties te vervangen met niet-persistente connecties, + zonder dat het gedrag van je script wijzigt. Het <emphasis>kan</emphasis> + (en zal waarschijnlijk) de effectiviteit van je script verbeteren, + maar het zal <emphasis>nooit</emphasis> het gedrag veranderen. </simpara> </chapter> Index: phpdoc/nl/features/remote-files.xml diff -u phpdoc/nl/features/remote-files.xml:1.1 phpdoc/nl/features/remote-files.xml:1.2 --- phpdoc/nl/features/remote-files.xml:1.1 Tue Oct 10 15:07:53 2000 +++ phpdoc/nl/features/remote-files.xml Wed Oct 11 12:56:59 2000 @@ -2,75 +2,76 @@ <title>Using remote files</title> <para> - As long as support for the &quot;URL fopen wrapper&quot; is enabled when - you configure PHP (which it is unless you explicitly pass the - <option>--disable-url-fopen-wrapper</option> flag to configure), - you can use HTTP and FTP URLs with most functions that take a - filename as a parameter, including the <function>require</function> - and <function>include</function> statements. + Zo lang de ondersteuning voor &quot;URL fopen wrapper&quot; actief is + wanneer je PHP configureert (is standaard actief tenzij je expliciet de + <option>--disable-url-fopen-wrapper</option> optie gebruikt) kan je + HTTP en FTP urls gebruiken met de meeste functies die standaard gezien + een bestandsnaam als argument vereisen, dit werkt ook met de + <function>require</function> en <function>include<function> functies. </para> <para> <note> <para> - You can't use remote files in <function>include</function> and - <function>require</function> statements on Windows. + Op het Windows platform kan je geen remote bestanden gebruiken als argument + in de <function>include</function> en <function>require</function> functies. </para> </note> </para> <para> - For example, you can use this to open a file on a remote web server, - parse the output for the data you want, and then use that data in a - database query, or simply to output it in a style matching the rest - of your website. + Je kan dit bijvoorbeeld gebruiken om een bestand te openen op een + andere webserver, de output verwerken om de data te krijgen die jij wilt + hebben en vervolgens deze data in een database query gebruiken of om + simpel weg deze data weertegeven in je eigen website-stijl. </para> <para> <example> - <title>Getting the title of a remote page</title> + <title>De titel van een remote pagina op halen.</title> <programlisting role="php"> <![CDATA[ <?php -$file = fopen ("http://www.php.net/", "r"); -if (!$file) { - echo "<p>Unable to open remote file.\n"; +$bestand = fopen ("http://www.php.net/", "r"); +if (!$bestand) { + echo "<p>Kon remote bestand niet open.\n"; exit; } -while (!feof ($file)) { - $line = fgets ($file, 1024); - /* This only works if the title and its tags are on one line */ - if (eregi ("<title>(.*)</title>", $line, $out)) { - $title = $out[1]; +while (!feof ($bestand)) { + $regel = fgets ($bestand, 1024); + /* dit werkt alleen als de titel en <title> en </title> op 1 regel staan */ + if (eregi ("<title>(.*)</title>", $regel, $matches)) { + $titel = $matches[1]; break; } } -fclose($file); +fclose($bestand); ?> ]]> </programlisting> </example> </para> <para> - You can also write to files on an FTP as long you connect as a user - with the correct access rights, and the file doesn't exist already. - To connect as a user other than 'anonymous', you need to specify - the username (and possibly password) within the URL, such as - 'ftp://user:password@ftp.example.com/path/to/file'. (You can use the - same sort of syntax to access files via HTTP when they require Basic - authentication.) + Je kan ook naar bestanden schrijven op een FTP server als je teminste + de juiste rechten hebt voor deze operatie en zolang het bestand nog + niet bestaat op de FTP server. Om in te loggen als een user anders dan + 'anonymous' moet je je gebruikersnaam en mogelijk je paswoord opgeven in de URL, + dit gaat op deze manier: + 'ftp://gebruikersnaam:paswoord@ftp.mijnserver.nl/pad/naar/bestand' + Op deze manier kan je ook over HTTP toegang krijgen tot bestanden die + 'Basic Authentication' vereisen. </para> <para> <example> - <title>Storing data on a remote server</title> + <title>Data opslaan op een andere server</title> <programlisting role="php"> <![CDATA[ <?php -$file = fopen ("ftp://ftp.php.net/incoming/outputfile", "w"); -if (!$file) { - echo "<p>Unable to open remote file for writing.\n"; +$bestand = fopen ("ftp://ftp.php.net/incoming/outputfile", "w"); +if (!$bestand) { + echo "<p>Kon remote bestand niet openen om naar te schrijven\n</p>"; exit; } -/* Write the data here. */ -fputs ($file, "$HTTP_USER_AGENT\n"); -fclose ($file); +/* Schrijf data weg */ +fputs ($bestand, "$HTTP_USER_AGENT\n"); +fclose ($bestand); ?> ]]> </programlisting> @@ -79,11 +80,10 @@ <para> <note> <para> - You might get the idea from the example above to use this - technique to write to a remote log, but as mentioned above, you - can only write to a new file using the URL fopen() wrappers. To - do distributed logging like that, you should take a look at - <function>syslog</function>. + Je kan het idee krijgen om deze techniek te gebruiken om te schrijven + naar een log op een adnere server, maar zoals eerder gezegd kan je alleen + schrijven naar bestanden die nog niet bestaan. Om 'distributed logging' + mogelijk te maken zou je moeten kijken naar <function>syslog</function>. </para> </note> </para>

« previous php.doc (#969332461) next »