From ed6057533a05fabf85b10bda228bd36295b7c6c7 Mon Sep 17 00:00:00 2001 From: Peter Cowburn Date: Wed, 19 Nov 2014 13:03:27 +0000 Subject: [PATCH] Initial import --- README | 5 + appendixes.html | 158 + calling-user-functions.html | 262 ++ class.dir.html | 246 ++ class.orbitenum.html | 268 ++ class.orbitobject.html | 269 ++ class.orbitstruct.html | 281 ++ config-apache.html | 156 + config-cgi.html | 136 + config-security.html | 564 +++ config-virtualhost.html | 136 + configuration.html | 2766 ++++++++++++++ constants.html | 326 ++ control-structures.alternative-syntax.html | 284 ++ control-structures.break.html | 219 ++ control-structures.continue.html | 207 + control-structures.do.while.html | 281 ++ control-structures.else.html | 239 ++ control-structures.elseif.html | 275 ++ control-structures.for.html | 371 ++ control-structures.foreach.html | 375 ++ control-structures.html | 468 +++ control-structures.switch.html | 447 +++ control-structures.while.html | 285 ++ copyright.html | 93 + debugger-protocol.html | 656 ++++ debugger.html | 260 ++ expressions.html | 378 ++ feature-connection-handling.html | 256 ++ feature-cookies.html | 171 + feature-error-handling.html | 197 + feature-fileupload.html | 263 ++ feature-fileupload.multiple.html | 269 ++ feature-images.html | 183 + feature-putsupport.html | 196 + feature-regexps.html | 263 ++ features.connection-handling.html | 273 ++ features.cookies.html | 177 + features.error-handling.html | 736 ++++ features.file-upload.common-pitfalls.html | 153 + features.file-upload.html | 543 +++ features.file-upload.put-method.html | 259 ++ features.html | 183 + features.http-auth.html | 304 ++ features.images.html | 200 + features.persistent-connections.html | 257 ++ features.remote-files.html | 329 ++ funcref.html | 513 +++ function.abs.html | 173 + function.accept-connect.html | 294 ++ function.acos.html | 187 + function.ada-afetch.html | 152 + function.ada-autocommit.html | 152 + function.ada-close.html | 152 + function.ada-commit.html | 152 + function.ada-connect.html | 152 + function.ada-exec.html | 158 + function.ada-fetchrow.html | 152 + function.ada-fieldname.html | 152 + function.ada-fieldnum.html | 149 + function.ada-fieldtype.html | 152 + function.ada-freeresult.html | 152 + function.ada-numfields.html | 152 + function.ada-numrows.html | 152 + function.ada-result.html | 152 + function.ada-resultall.html | 152 + function.ada-rollback.html | 152 + function.addcslashes.html | 282 ++ function.addslashes.html | 208 + function.apache-lookup-uri.html | 288 ++ function.apache-note.html | 198 + function.array-count-values.html | 228 ++ function.array-diff.html | 245 ++ function.array-flip.html | 216 ++ function.array-intersect.html | 245 ++ function.array-keys.html | 312 ++ function.array-merge-recursive.html | 244 ++ function.array-merge.html | 242 ++ function.array-multisort.html | 328 ++ function.array-pad.html | 264 ++ function.array-pop.html | 262 ++ function.array-push.html | 291 ++ function.array-rand.html | 255 ++ function.array-reverse.html | 235 ++ function.array-shift.html | 264 ++ function.array-slice.html | 303 ++ function.array-splice.html | 404 ++ function.array-unique.html | 234 ++ function.array-unshift.html | 266 ++ function.array-values.html | 282 ++ function.array-walk.html | 362 ++ function.array.html | 255 ++ function.arsort.html | 301 ++ function.asin.html | 187 + function.asort.html | 298 ++ function.aspell-check-raw.html | 224 ++ function.aspell-check.html | 221 ++ function.aspell-new.html | 216 ++ function.aspell-suggest.html | 224 ++ function.assert-options.html | 328 ++ function.assert.html | 238 ++ function.assert_options.html | 322 ++ function.atan.html | 187 + function.atan2.html | 216 ++ function.base-convert.html | 247 ++ function.base64-decode.html | 192 + function.base64-encode.html | 204 + function.basename.html | 240 ++ function.bcadd.html | 201 + function.bccomp.html | 217 ++ function.bcdiv.html | 200 + function.bcmod.html | 194 + function.bcmul.html | 200 + function.bcpow.html | 202 + function.bcscale.html | 176 + function.bcsqrt.html | 195 + function.bcsub.html | 203 + function.bin2hex.html | 181 + function.bind.html | 287 ++ function.bindec.html | 188 + function.bindtextdomain.html | 176 + function.call-user-func.html | 214 ++ function.call-user-method.html | 256 ++ function.ceil.html | 209 + function.chdir.html | 179 + function.checkdate.html | 211 ++ function.checkdnsrr.html | 238 ++ function.chgrp.html | 217 ++ function.chmod.html | 257 ++ function.chop.html | 258 ++ function.chown.html | 201 + function.chr.html | 238 ++ function.chunk-split.html | 253 ++ function.class-exists.html | 179 + function.clearstatcache.html | 316 ++ function.close.html | 270 ++ function.closedir.html | 185 + function.closelog.html | 203 + function.com-get.html | 189 + function.com-invoke.html | 195 + function.com-load.html | 183 + function.com-propget.html | 180 + function.com-propput.html | 180 + function.com-propset.html | 180 + function.com-set.html | 199 + function.compact.html | 267 ++ function.connect.html | 271 ++ function.connection-aborted.html | 180 + function.connection-status.html | 180 + function.connection-timeout.html | 180 + function.convert-cyr-string.html | 223 ++ function.copy.html | 222 ++ function.cos.html | 187 + function.count-chars.html | 243 ++ function.count.html | 246 ++ function.cpdf-add-annotation.html | 210 + function.cpdf-add-outline.html | 227 ++ function.cpdf-arc.html | 225 ++ function.cpdf-begin-text.html | 231 ++ function.cpdf-circle.html | 213 ++ function.cpdf-clip.html | 176 + function.cpdf-close.html | 205 + function.cpdf-closepath-fill-stroke.html | 228 ++ function.cpdf-closepath-stroke.html | 205 + function.cpdf-closepath.html | 176 + function.cpdf-continue-text.html | 211 ++ function.cpdf-curveto.html | 251 ++ function.cpdf-end-text.html | 231 ++ function.cpdf-endpath.html | 172 + function.cpdf-fill-stroke.html | 227 ++ function.cpdf-fill.html | 220 ++ function.cpdf-finalize-page.html | 194 + function.cpdf-finalize.html | 191 + function.cpdf-global-set-document-limits.html | 194 + function.cpdf-import-jpeg.html | 221 ++ function.cpdf-lineto.html | 221 ++ function.cpdf-moveto.html | 199 + function.cpdf-newpath.html | 185 + function.cpdf-open.html | 238 ++ function.cpdf-output-buffer.html | 193 + function.cpdf-page-init.html | 223 ++ function.cpdf-place-inline-image.html | 210 + function.cpdf-rect.html | 210 + function.cpdf-restore.html | 232 ++ function.cpdf-rlineto.html | 221 ++ function.cpdf-rmoveto.html | 207 + function.cpdf-rotate.html | 181 + function.cpdf-save-to-file.html | 202 + function.cpdf-save.html | 187 + function.cpdf-scale.html | 176 + function.cpdf-set-char-spacing.html | 192 + function.cpdf-set-creator.html | 199 + function.cpdf-set-current-page.html | 192 + function.cpdf-set-font.html | 192 + function.cpdf-set-horiz-scaling.html | 181 + function.cpdf-set-keywords.html | 199 + function.cpdf-set-leading.html | 192 + function.cpdf-set-page-animation.html | 241 ++ function.cpdf-set-subject.html | 199 + function.cpdf-set-text-matrix.html | 177 + function.cpdf-set-text-pos.html | 210 + function.cpdf-set-text-rendering.html | 188 + function.cpdf-set-text-rise.html | 181 + function.cpdf-set-title.html | 199 + function.cpdf-set-word-spacing.html | 192 + function.cpdf-setdash.html | 188 + function.cpdf-setflat.html | 176 + function.cpdf-setgray-fill.html | 185 + function.cpdf-setgray-stroke.html | 185 + function.cpdf-setgray.html | 195 + function.cpdf-setlinecap.html | 177 + function.cpdf-setlinejoin.html | 177 + function.cpdf-setlinewidth.html | 181 + function.cpdf-setmiterlimit.html | 176 + function.cpdf-setrgbcolor-fill.html | 192 + function.cpdf-setrgbcolor-stroke.html | 192 + function.cpdf-setrgbcolor.html | 195 + function.cpdf-show-xy.html | 235 ++ function.cpdf-show.html | 204 + function.cpdf-stringwidth.html | 191 + function.cpdf-stroke.html | 192 + function.cpdf-text.html | 229 ++ function.cpdf-translate.html | 198 + function.crc32.html | 188 + function.create-function.html | 435 +++ function.crypt.html | 261 ++ function.curl-close.html | 181 + function.curl-exec.html | 183 + function.curl-init.html | 276 ++ function.curl-setopt.html | 761 ++++ function.curl-version.html | 178 + function.current.html | 257 ++ function.cybercash-base64-decode.html | 173 + function.cybercash-base64-encode.html | 173 + function.cybercash-decr.html | 174 + function.cybercash-encr.html | 174 + function.date.html | 478 +++ function.dba-close.html | 219 ++ function.dba-delete.html | 247 ++ function.dba-exists.html | 246 ++ function.dba-fetch.html | 246 ++ function.dba-firstkey.html | 212 ++ function.dba-insert.html | 267 ++ function.dba-nextkey.html | 214 ++ function.dba-open.html | 254 ++ function.dba-optimize.html | 213 ++ function.dba-popen.html | 254 ++ function.dba-replace.html | 259 ++ function.dba-sync.html | 213 ++ function.dbase-add-record.html | 180 + function.dbase-close.html | 178 + function.dbase-create.html | 283 ++ function.dbase-delete-record.html | 185 + function.dbase-get-record-with-names.html | 194 + function.dbase-get-record.html | 191 + function.dbase-numfields.html | 218 ++ function.dbase-numrecords.html | 176 + function.dbase-open.html | 178 + function.dbase-pack.html | 180 + function.dbase-replace-record.html | 203 + function.dblist.html | 171 + function.dbmclose.html | 172 + function.dbmdelete.html | 182 + function.dbmexists.html | 180 + function.dbmfetch.html | 179 + function.dbmfirstkey.html | 176 + function.dbminsert.html | 185 + function.dbmnextkey.html | 229 ++ function.dbmopen.html | 204 + function.dbmreplace.html | 178 + function.dcgettext.html | 173 + function.debugger-off.html | 173 + function.debugger-on.html | 179 + function.decbin.html | 183 + function.dechex.html | 183 + function.decoct.html | 183 + function.define-syslog-variables.html | 195 + function.define.html | 289 ++ function.defined.html | 192 + function.deg2rad.html | 189 + function.delete.html | 202 + function.dgettext.html | 176 + function.die.html | 225 ++ function.dirname.html | 236 ++ function.diskfreespace.html | 215 ++ function.dl.html | 182 + function.doubleval.html | 243 ++ function.each.html | 446 +++ function.easter-date.html | 253 ++ function.easter-days.html | 257 ++ function.echo.html | 262 ++ function.empty.html | 235 ++ function.end.html | 215 ++ function.ereg-replace.html | 372 ++ function.ereg.html | 318 ++ function.eregi-replace.html | 202 + function.eregi.html | 204 + function.error-log.html | 374 ++ function.error-reporting.html | 460 +++ function.escapeshellarg.html | 247 ++ function.escapeshellcmd.html | 255 ++ function.eval.html | 300 ++ function.exec.html | 274 ++ function.exit.html | 182 + function.exp.html | 186 + function.explode.html | 260 ++ function.extension-loaded.html | 207 + function.extract.html | 401 ++ function.ezmlm-hash.html | 216 ++ function.fclose.html | 192 + function.fdf-close.html | 182 + function.fdf-create.html | 245 ++ function.fdf-get-file.html | 186 + function.fdf-get-status.html | 183 + function.fdf-get-value.html | 183 + function.fdf-next-field-name.html | 191 + function.fdf-open.html | 246 ++ function.fdf-save.html | 206 + function.fdf-set-ap.html | 182 + function.fdf-set-file.html | 192 + function.fdf-set-flags.html | 190 + function.fdf-set-javascript-action.html | 190 + function.fdf-set-opt.html | 190 + function.fdf-set-status.html | 183 + function.fdf-set-submit-form-action.html | 190 + function.fdf-set-value.html | 195 + function.feof.html | 196 + function.fgetc.html | 232 ++ function.fgetcsv.html | 285 ++ function.fgets.html | 295 ++ function.fgetss.html | 241 ++ function.file-exists.html | 196 + function.file.html | 258 ++ function.fileatime.html | 194 + function.filectime.html | 210 + function.filegroup.html | 203 + function.fileinode.html | 195 + function.filemtime.html | 196 + function.fileowner.html | 203 + function.fileperms.html | 183 + function.filepro-fieldcount.html | 180 + function.filepro-fieldname.html | 176 + function.filepro-fieldtype.html | 176 + function.filepro-fieldwidth.html | 176 + function.filepro-retrieve.html | 171 + function.filepro-rowcount.html | 179 + function.filepro.html | 175 + function.filesize.html | 183 + function.filetype.html | 187 + function.flock.html | 269 ++ function.floor.html | 209 + function.flush.html | 174 + function.fopen.html | 401 ++ function.fpassthru.html | 261 ++ function.fputs.html | 190 + function.fread.html | 285 ++ function.frenchtojd.html | 182 + function.fscanf.html | 322 ++ function.fseek.html | 292 ++ function.fsockopen.html | 457 +++ function.fstat.html | 252 ++ function.ftell.html | 222 ++ function.ftp-cdup.html | 174 + function.ftp-chdir.html | 179 + function.ftp-connect.html | 189 + function.ftp-delete.html | 183 + function.ftp-fget.html | 195 + function.ftp-fput.html | 202 + function.ftp-get.html | 202 + function.ftp-login.html | 174 + function.ftp-mdtm.html | 195 + function.ftp-mkdir.html | 179 + function.ftp-nlist.html | 171 + function.ftp-pasv.html | 190 + function.ftp-put.html | 241 ++ function.ftp-pwd.html | 171 + function.ftp-quit.html | 183 + function.ftp-rawlist.html | 186 + function.ftp-rename.html | 189 + function.ftp-rmdir.html | 179 + function.ftp-site.html | 185 + function.ftp-size.html | 178 + function.ftp-systype.html | 173 + function.ftruncate.html | 175 + function.func-get-arg.html | 266 ++ function.func-get-args.html | 253 ++ function.func-num-args.html | 246 ++ function.function-exists.html | 181 + function.fwrite.html | 261 ++ function.get-browser.html | 321 ++ function.get-cfg-var.html | 195 + function.get-class-methods.html | 194 + function.get-class-vars.html | 191 + function.get-class.html | 194 + function.get-current-user.html | 203 + function.get-declared-classes.html | 209 + function.get-extension-funcs.html | 225 ++ function.get-html-translation-table.html | 384 ++ function.get-included-files.html | 234 ++ function.get-loaded-extensions.html | 251 ++ function.get-magic-quotes-gpc.html | 195 + function.get-magic-quotes-runtime.html | 198 + function.get-meta-tags.html | 239 ++ function.get-object-vars.html | 279 ++ function.get-parent-class.html | 195 + function.get-required-files.html | 324 ++ function.getallheaders.html | 265 ++ function.getcwd.html | 172 + function.getdate.html | 234 ++ function.getenv.html | 237 ++ function.gethostbyaddr.html | 195 + function.gethostbyname.html | 189 + function.gethostbynamel.html | 214 ++ function.getimagesize.html | 330 ++ function.getlastmod.html | 253 ++ function.getmxrr.html | 233 ++ function.getmyinode.html | 214 ++ function.getmypid.html | 206 + function.getmyuid.html | 202 + function.getprotobyname.html | 193 + function.getprotobynumber.html | 193 + function.getrandmax.html | 214 ++ function.getrusage.html | 218 ++ function.getservbyname.html | 215 ++ function.getservbyport.html | 211 ++ function.gettext.html | 223 ++ function.gettimeofday.html | 199 + function.gettype.html | 231 ++ function.gmdate.html | 242 ++ function.gmmktime.html | 180 + function.gmstrftime.html | 233 ++ function.gregoriantojd.html | 222 ++ function.gzclose.html | 185 + function.gzcompress.html | 195 + function.gzeof.html | 183 + function.gzfile.html | 208 + function.gzgetc.html | 207 + function.gzgets.html | 213 ++ function.gzgetss.html | 231 ++ function.gzopen.html | 266 ++ function.gzpassthru.html | 200 + function.gzputs.html | 183 + function.gzread.html | 265 ++ function.gzrewind.html | 205 + function.gzseek.html | 203 + function.gztell.html | 215 ++ function.gzuncompress.html | 209 + function.gzwrite.html | 248 ++ function.header.html | 320 ++ function.headers-sent.html | 182 + function.hebrev.html | 191 + function.hebrevc.html | 199 + function.hexdec.html | 184 + function.highlight-file.html | 334 ++ function.highlight-string.html | 198 + function.htmlentities.html | 225 ++ function.htmlspecialchars.html | 296 ++ function.hw-array2objrec.html | 186 + function.hw-children.html | 179 + function.hw-childrenobj.html | 179 + function.hw-close.html | 173 + function.hw-connect.html | 196 + function.hw-cp.html | 188 + function.hw-deleteobject.html | 182 + function.hw-docbyanchor.html | 177 + function.hw-docbyanchorobj.html | 177 + function.hw-documentattributes.html | 180 + function.hw-documentbodytag.html | 181 + function.hw-documentcontent.html | 186 + function.hw-documentsetcontent.html | 190 + function.hw-documentsize.html | 180 + function.hw-edittext.html | 201 + function.hw-error.html | 172 + function.hw-errormsg.html | 173 + function.hw-free-document.html | 171 + function.hw-getanchors.html | 177 + function.hw-getanchorsobj.html | 177 + function.hw-getandlock.html | 188 + function.hw-getchildcoll.html | 188 + function.hw-getchildcollobj.html | 188 + function.hw-getchilddoccoll.html | 180 + function.hw-getchilddoccollobj.html | 180 + function.hw-getobject.html | 221 ++ function.hw-getobjectbyquery.html | 191 + function.hw-getobjectbyquerycoll.html | 198 + function.hw-getobjectbyquerycollobj.html | 198 + function.hw-getobjectbyqueryobj.html | 191 + function.hw-getparents.html | 177 + function.hw-getparentsobj.html | 179 + function.hw-getremote.html | 190 + function.hw-getremotechildren.html | 196 + function.hw-getsrcbydestobj.html | 183 + function.hw-gettext.html | 252 ++ function.hw-getusername.html | 171 + function.hw-identify.html | 190 + function.hw-incollections.html | 199 + function.hw-info.html | 174 + function.hw-inscoll.html | 183 + function.hw-insdoc.html | 212 ++ function.hw-insertdocument.html | 191 + function.hw-insertobject.html | 195 + function.hw-mapid.html | 195 + function.hw-modifyobject.html | 537 +++ function.hw-mv.html | 210 + function.hw-new-document.html | 217 ++ function.hw-objrec2array.html | 205 + function.hw-outputdocument.html | 171 + function.hw-pconnect.html | 195 + function.hw-pipedocument.html | 201 + function.hw-root.html | 173 + function.hw-unlock.html | 176 + function.hw-who.html | 174 + function.ibase-bind.html | 182 + function.ibase-close.html | 185 + function.ibase-connect.html | 348 ++ function.ibase-execute.html | 225 ++ function.ibase-fetch-object.html | 234 ++ function.ibase-fetch-row.html | 180 + function.ibase-free-query.html | 181 + function.ibase-free-result.html | 180 + function.ibase-num-fields.html | 235 ++ function.ibase-pconnect.html | 216 ++ function.ibase-prepare.html | 183 + function.ibase-query.html | 231 ++ function.ibase-timefmt.html | 252 ++ function.icap-close.html | 174 + function.icap-delete-event.html | 185 + function.icap-fetch-event.html | 268 ++ function.icap-list-alarms.html | 223 ++ function.icap-list-events.html | 224 ++ function.icap-open.html | 195 + function.icap-snooze.html | 185 + function.icap-store-event.html | 258 ++ function.ifx-affected-rows.html | 274 ++ function.ifx-blobinfile-mode.html | 174 + function.ifx-byteasvarchar.html | 174 + function.ifx-close.html | 257 ++ function.ifx-connect.html | 267 ++ function.ifx-copy-blob.html | 181 + function.ifx-create-blob.html | 186 + function.ifx-create-char.html | 178 + function.ifx-do.html | 214 ++ function.ifx-error.html | 236 ++ function.ifx-errormsg.html | 219 ++ function.ifx-fetch-row.html | 294 ++ function.ifx-fieldproperties.html | 227 ++ function.ifx-fieldtypes.html | 221 ++ function.ifx-free-blob.html | 179 + function.ifx-free-char.html | 179 + function.ifx-free-result.html | 178 + function.ifx-get-blob.html | 178 + function.ifx-get-char.html | 178 + function.ifx-getsqlca.html | 258 ++ function.ifx-htmltbl-result.html | 235 ++ function.ifx-nullformat.html | 175 + function.ifx-num-fields.html | 182 + function.ifx-num-rows.html | 192 + function.ifx-pconnect.html | 234 ++ function.ifx-prepare.html | 265 ++ function.ifx-query.html | 371 ++ function.ifx-textasvarchar.html | 174 + function.ifx-update-blob.html | 184 + function.ifx-update-char.html | 184 + function.ifxus-close-slob.html | 179 + function.ifxus-create-slob.html | 176 + function.ifxus-free-slob.html | 178 + function.ifxus-open-slob.html | 181 + function.ifxus-read-slob.html | 184 + function.ifxus-seek-slob.html | 186 + function.ifxus-tell-slob.html | 179 + function.ifxus-write-slob.html | 184 + function.ignore-user-abort.html | 186 + function.imagearc.html | 211 ++ function.imagechar.html | 215 ++ function.imagecharup.html | 216 ++ function.imagecolorallocate.html | 228 ++ function.imagecolorat.html | 189 + function.imagecolorclosest.html | 195 + function.imagecolordeallocate.html | 211 ++ function.imagecolorexact.html | 186 + function.imagecolorresolve.html | 186 + function.imagecolorset.html | 186 + function.imagecolorsforindex.html | 190 + function.imagecolorstotal.html | 191 + function.imagecolortransparent.html | 211 ++ function.imagecopy.html | 230 ++ function.imagecopyresized.html | 205 + function.imagecreate.html | 233 ++ function.imagecreatefromgif.html | 250 ++ function.imagecreatefromjpeg.html | 238 ++ function.imagecreatefrompng.html | 238 ++ function.imagedashedline.html | 217 ++ function.imagedestroy.html | 192 + function.imagefill.html | 199 + function.imagefilledpolygon.html | 196 + function.imagefilledrectangle.html | 210 + function.imagefilltoborder.html | 200 + function.imagefontheight.html | 182 + function.imagefontwidth.html | 184 + function.imagegammacorrect.html | 201 + function.imagegif.html | 249 ++ function.imageinterlace.html | 182 + function.imagejpeg.html | 224 ++ function.imageline.html | 215 ++ function.imageloadfont.html | 300 ++ function.imagepng.html | 219 ++ function.imagepolygon.html | 200 + function.imagepsbbox.html | 319 ++ function.imagepsencodefont.html | 190 + function.imagepsextendfont.html | 190 + function.imagepsfreefont.html | 175 + function.imagepsloadfont.html | 181 + function.imagepsslantfont.html | 190 + function.imagepstext.html | 388 ++ function.imagerectangle.html | 179 + function.imagesetpixel.html | 210 + function.imagestring.html | 213 ++ function.imagestringup.html | 213 ++ function.imagesx.html | 193 + function.imagesy.html | 191 + function.imagettfbbox.html | 354 ++ function.imagettftext.html | 350 ++ function.imagetypes.html | 216 ++ function.imap-8bit.html | 193 + function.imap-alerts.html | 187 + function.imap-append.html | 261 ++ function.imap-base64.html | 190 + function.imap-binary.html | 191 + function.imap-body.html | 230 ++ function.imap-check.html | 214 ++ function.imap-clearflag-full.html | 198 + function.imap-close.html | 182 + function.imap-createmailbox.html | 304 ++ function.imap-delete.html | 280 ++ function.imap-deletemailbox.html | 221 ++ function.imap-errors.html | 186 + function.imap-expunge.html | 200 + function.imap-fetch-overview.html | 324 ++ function.imap-fetchbody.html | 212 ++ function.imap-fetchheader.html | 206 + function.imap-fetchstructure.html | 612 +++ function.imap-getmailboxes.html | 360 ++ function.imap-getsubscribed.html | 180 + function.imap-header.html | 178 + function.imap-headerinfo.html | 281 ++ function.imap-headers.html | 175 + function.imap-last-error.html | 182 + function.imap-listmailbox.html | 241 ++ function.imap-listsubscribed.html | 181 + function.imap-mail-compose.html | 244 ++ function.imap-mail-copy.html | 213 ++ function.imap-mail-move.html | 207 + function.imap-mail.html | 178 + function.imap-mailboxmsginfo.html | 352 ++ function.imap-mime-header-decode.html | 238 ++ function.imap-msgno.html | 182 + function.imap-num-msg.html | 174 + function.imap-num-recent.html | 173 + function.imap-open.html | 371 ++ function.imap-ping.html | 184 + function.imap-qprint.html | 192 + function.imap-renamemailbox.html | 218 ++ function.imap-reopen.html | 225 ++ function.imap-rfc822-parse-adrlist.html | 258 ++ function.imap-rfc822-parse-headers.html | 181 + function.imap-rfc822-write-address.html | 223 ++ function.imap-scanmailbox.html | 195 + function.imap-search.html | 322 ++ function.imap-setflag-full.html | 246 ++ function.imap-sort.html | 226 ++ function.imap-status.html | 273 ++ function.imap-subscribe.html | 176 + function.imap-uid.html | 185 + function.imap-undelete.html | 192 + function.imap-unsubscribe.html | 176 + function.imap-utf7-decode.html | 196 + function.imap-utf7-encode.html | 194 + function.imap-utf8.html | 185 + function.implode.html | 234 ++ function.in-array.html | 223 ++ function.include-once.html | 254 ++ function.include.html | 713 ++++ function.ini-alter.html | 218 ++ function.ini-get.html | 199 + function.ini-restore.html | 195 + function.ini-set.html | 199 + function.intval.html | 219 ++ function.ip2long.html | 232 ++ function.iptcparse.html | 185 + function.is-array.html | 236 ++ function.is-bool.html | 248 ++ function.is-dir.html | 198 + function.is-double.html | 243 ++ function.is-executable.html | 198 + function.is-file.html | 200 + function.is-float.html | 243 ++ function.is-int.html | 243 ++ function.is-integer.html | 244 ++ function.is-link.html | 212 ++ function.is-long.html | 243 ++ function.is-numeric.html | 245 ++ function.is-object.html | 243 ++ function.is-readable.html | 198 + function.is-real.html | 243 ++ function.is-resource.html | 193 + function.is-string.html | 243 ++ function.is-subclass-of.html | 203 + function.is-uploaded-file.html | 206 + function.is-writeable.html | 198 + function.isset.html | 234 ++ function.jddayofweek.html | 237 ++ function.jdmonthname.html | 269 ++ function.jdtofrench.html | 174 + function.jdtogregorian.html | 173 + function.jdtojewish.html | 174 + function.jdtojulian.html | 175 + function.jdtounix.html | 209 + function.jewishtojd.html | 181 + function.join.html | 204 + function.juliantojd.html | 182 + function.key.html | 191 + function.krsort.html | 306 ++ function.ksort.html | 300 ++ function.lcg-value.html | 178 + function.ldap-add.html | 255 ++ function.ldap-bind.html | 180 + function.ldap-close.html | 203 + function.ldap-compare.html | 300 ++ function.ldap-connect.html | 199 + function.ldap-count-entries.html | 185 + function.ldap-delete.html | 177 + function.ldap-dn2ufn.html | 175 + function.ldap-err2str.html | 234 ++ function.ldap-errno.html | 254 ++ function.ldap-error.html | 207 + function.ldap-explode-dn.html | 202 + function.ldap-first-attribute.html | 220 ++ function.ldap-first-entry.html | 205 + function.ldap-free-result.html | 194 + function.ldap-get-attributes.html | 276 ++ function.ldap-get-dn.html | 177 + function.ldap-get-entries.html | 229 ++ function.ldap-get-values-len.html | 211 ++ function.ldap-get-values.html | 282 ++ function.ldap-list.html | 280 ++ function.ldap-mod-add.html | 182 + function.ldap-mod-del.html | 179 + function.ldap-mod-replace.html | 182 + function.ldap-modify.html | 184 + function.ldap-next-attribute.html | 211 ++ function.ldap-next-entry.html | 218 ++ function.ldap-read.html | 237 ++ function.ldap-search.html | 377 ++ function.ldap-unbind.html | 177 + function.leak.html | 180 + function.levenshtein.html | 354 ++ function.link.html | 209 + function.linkinfo.html | 219 ++ function.list.html | 256 ++ function.listen.html | 274 ++ function.localtime.html | 252 ++ function.log.html | 172 + function.log10.html | 177 + function.long2ip.html | 189 + function.lstat.html | 263 ++ function.ltrim.html | 199 + function.mail.html | 269 ++ function.max.html | 195 + function.mcal-append-event.html | 180 + function.mcal-close.html | 173 + function.mcal-create-calendar.html | 178 + function.mcal-date-compare.html | 177 + function.mcal-date-valid.html | 179 + function.mcal-day-of-week.html | 179 + function.mcal-day-of-year.html | 179 + function.mcal-days-in-month.html | 180 + function.mcal-delete-calendar.html | 178 + function.mcal-delete-event.html | 179 + function.mcal-event-add-attribute.html | 182 + function.mcal-event-init.html | 183 + function.mcal-event-set-alarm.html | 182 + function.mcal-event-set-category.html | 182 + function.mcal-event-set-class.html | 183 + function.mcal-event-set-description.html | 184 + function.mcal-event-set-end.html | 186 + function.mcal-event-set-recur-daily.html | 182 + ...ion.mcal-event-set-recur-monthly-mday.html | 183 + ...ion.mcal-event-set-recur-monthly-wday.html | 183 + function.mcal-event-set-recur-none.html | 182 + function.mcal-event-set-recur-weekly.html | 182 + function.mcal-event-set-recur-yearly.html | 182 + function.mcal-event-set-start.html | 187 + function.mcal-event-set-title.html | 182 + function.mcal-expunge.html | 181 + function.mcal-fetch-current-stream-event.html | 274 ++ function.mcal-fetch-event.html | 277 ++ function.mcal-is-leap-year.html | 179 + function.mcal-list-alarms.html | 196 + function.mcal-list-events.html | 187 + function.mcal-next-recurrence.html | 180 + function.mcal-open.html | 197 + function.mcal-popen.html | 197 + function.mcal-rename-calendar.html | 184 + function.mcal-reopen.html | 196 + function.mcal-snooze.html | 180 + function.mcal-store-event.html | 180 + function.mcal-time-valid.html | 179 + function.mcrypt-cbc.html | 290 ++ function.mcrypt-cfb.html | 289 ++ function.mcrypt-create-iv.html | 247 ++ function.mcrypt-decrypt.html | 228 ++ function.mcrypt-ecb.html | 281 ++ function.mcrypt-enc-get-algorithms-name.html | 172 + function.mcrypt-enc-get-block-size.html | 173 + function.mcrypt-enc-get-iv-size.html | 175 + function.mcrypt-enc-get-key-size.html | 173 + function.mcrypt-enc-get-modes-name.html | 172 + ...on.mcrypt-enc-get-supported-key-sizes.html | 182 + ...on.mcrypt-enc-is-block-algorithm-mode.html | 173 + function.mcrypt-enc-is-block-algorithm.html | 173 + function.mcrypt-enc-is-block-mode.html | 174 + function.mcrypt-enc-self-test.html | 174 + function.mcrypt-encrypt.html | 299 ++ function.mcrypt-generic-end.html | 174 + function.mcrypt-generic-init.html | 210 + function.mcrypt-generic.html | 176 + function.mcrypt-get-block-size.html | 222 ++ function.mcrypt-get-cipher-name.html | 266 ++ function.mcrypt-get-iv-size.html | 219 ++ function.mcrypt-get-key-size.html | 222 ++ function.mcrypt-list-algorithms.html | 242 ++ function.mcrypt-list-modes.html | 244 ++ ...ion.mcrypt-module-get-algo-block-size.html | 179 + function.mcrypt-module-get-algo-key-size.html | 180 + ...t-module-get-algo-supported-key-sizes.html | 188 + ...mcrypt-module-is-block-algorithm-mode.html | 180 + ...tion.mcrypt-module-is-block-algorithm.html | 180 + function.mcrypt-module-is-block-mode.html | 180 + function.mcrypt-module-open.html | 262 ++ function.mcrypt-module-self-test.html | 183 + function.mcrypt-ofb.html | 289 ++ function.md5.html | 192 + function.mdecrypt-generic.html | 230 ++ function.metaphone.html | 215 ++ function.method-exists.html | 184 + function.mhash-count.html | 222 ++ function.mhash-get-block-size.html | 199 + function.mhash-get-hash-name.html | 243 ++ function.mhash.html | 187 + function.microtime.html | 186 + function.min.html | 195 + function.mkdir.html | 212 ++ function.mktime.html | 348 ++ function.move-uploaded-file.html | 244 ++ function.msql-affected-rows.html | 184 + function.msql-close.html | 215 ++ function.msql-connect.html | 221 ++ function.msql-create-db.html | 183 + function.msql-createdb.html | 179 + function.msql-data-seek.html | 198 + function.msql-dbname.html | 197 + function.msql-drop-db.html | 189 + function.msql-dropdb.html | 158 + function.msql-error.html | 174 + function.msql-fetch-array.html | 233 ++ function.msql-fetch-field.html | 234 ++ function.msql-fetch-object.html | 241 ++ function.msql-fetch-row.html | 222 ++ function.msql-field-seek.html | 190 + function.msql-fieldflags.html | 177 + function.msql-fieldlen.html | 176 + function.msql-fieldname.html | 193 + function.msql-fieldtable.html | 178 + function.msql-fieldtype.html | 184 + function.msql-free-result.html | 184 + function.msql-freeresult.html | 157 + function.msql-list-dbs.html | 184 + function.msql-list-fields.html | 228 ++ function.msql-list-tables.html | 191 + function.msql-listdbs.html | 158 + function.msql-listfields.html | 158 + function.msql-listtables.html | 158 + function.msql-num-fields.html | 206 + function.msql-num-rows.html | 199 + function.msql-numfields.html | 179 + function.msql-numrows.html | 179 + function.msql-pconnect.html | 218 ++ function.msql-query.html | 213 ++ function.msql-regcase.html | 160 + function.msql-result.html | 223 ++ function.msql-select-db.html | 224 ++ function.msql-selectdb.html | 158 + function.msql-tablename.html | 239 ++ function.msql.html | 197 + function.mssql-affected-rows.html | 181 + function.mssql-close.html | 220 ++ function.mssql-connect.html | 224 ++ function.mssql-data-seek.html | 196 + function.mssql-fetch-array.html | 214 ++ function.mssql-fetch-field.html | 223 ++ function.mssql-fetch-object.html | 226 ++ function.mssql-fetch-row.html | 225 ++ function.mssql-field-length.html | 170 + function.mssql-field-name.html | 170 + function.mssql-field-seek.html | 189 + function.mssql-field-type.html | 170 + function.mssql-free-result.html | 183 + function.mssql-get-last-message.html | 174 + function.mssql-min-error-severity.html | 171 + function.mssql-min-message-severity.html | 171 + function.mssql-num-fields.html | 205 + function.mssql-num-rows.html | 196 + function.mssql-pconnect.html | 217 ++ function.mssql-query.html | 213 ++ function.mssql-result.html | 216 ++ function.mssql-select-db.html | 225 ++ function.mt-getrandmax.html | 215 ++ function.mt-rand.html | 305 ++ function.mt-srand.html | 240 ++ function.mysql-affected-rows.html | 197 + function.mysql-change-user.html | 196 + function.mysql-close.html | 273 ++ function.mysql-connect.html | 307 ++ function.mysql-create-db.html | 239 ++ function.mysql-data-seek.html | 257 ++ function.mysql-db-name.html | 266 ++ function.mysql-db-query.html | 210 + function.mysql-drop-db.html | 197 + function.mysql-errno.html | 241 ++ function.mysql-error.html | 240 ++ function.mysql-fetch-array.html | 313 ++ function.mysql-fetch-assoc.html | 292 ++ function.mysql-fetch-field.html | 331 ++ function.mysql-fetch-lengths.html | 222 ++ function.mysql-fetch-object.html | 283 ++ function.mysql-fetch-row.html | 228 ++ function.mysql-field-flags.html | 201 + function.mysql-field-len.html | 185 + function.mysql-field-name.html | 294 ++ function.mysql-field-seek.html | 195 + function.mysql-field-table.html | 183 + function.mysql-field-type.html | 256 ++ function.mysql-free-result.html | 197 + function.mysql-insert-id.html | 266 ++ function.mysql-list-dbs.html | 288 ++ function.mysql-list-fields.html | 303 ++ function.mysql-list-tables.html | 200 + function.mysql-num-fields.html | 215 ++ function.mysql-num-rows.html | 215 ++ function.mysql-pconnect.html | 269 ++ function.mysql-query.html | 417 ++ function.mysql-result.html | 224 ++ function.mysql-select-db.html | 233 ++ function.mysql-tablename.html | 239 ++ function.natcasesort.html | 235 ++ function.natsort.html | 306 ++ function.next.html | 261 ++ function.nl2br.html | 201 + function.number-format.html | 235 ++ function.ob-end-clean.html | 191 + function.ob-end-flush.html | 217 ++ function.ob-get-contents.html | 191 + function.ob-get-length.html | 191 + function.ob-implicit-flush.html | 227 ++ function.ob-start.html | 230 ++ function.ocibindbyname.html | 318 ++ function.ocicolumnisnull.html | 194 + function.ocicolumnname.html | 250 ++ function.ocicolumnsize.html | 259 ++ function.ocicolumntype.html | 250 ++ function.ocicommit.html | 181 + function.ocidefinebyname.html | 258 ++ function.ocierror.html | 206 + function.ociexecute.html | 187 + function.ocifetch.html | 176 + function.ocifetchinto.html | 250 ++ function.ocifetchstatement.html | 249 ++ function.ocifreecursor.html | 176 + function.ocifreedesc.html | 176 + function.ocifreestatement.html | 176 + function.ociinternaldebug.html | 183 + function.ocilogoff.html | 175 + function.ocilogon.html | 314 ++ function.ocinewcursor.html | 300 ++ function.ocinewdescriptor.html | 290 ++ function.ocinlogon.html | 327 ++ function.ocinumcols.html | 229 ++ function.ocinumrows.html | 165 + function.ociparse.html | 193 + function.ociplogon.html | 191 + function.ociresult.html | 189 + function.ocirollback.html | 181 + function.ocirowcount.html | 228 ++ function.ociserverversion.html | 208 + function.ocistatementtype.html | 268 ++ function.octdec.html | 185 + function.odbc-autocommit.html | 223 ++ function.odbc-binmode.html | 386 ++ function.odbc-close-all.html | 190 + function.odbc-close.html | 191 + function.odbc-columnprivileges.html | 230 ++ function.odbc-columns.html | 271 ++ function.odbc-commit.html | 185 + function.odbc-connect.html | 238 ++ function.odbc-cursor.html | 172 + function.odbc-do.html | 182 + function.odbc-exec.html | 221 ++ function.odbc-execute.html | 195 + function.odbc-fetch-into.html | 185 + function.odbc-fetch-row.html | 267 ++ function.odbc-field-len.html | 187 + function.odbc-field-name.html | 181 + function.odbc-field-num.html | 181 + function.odbc-field-precision.html | 193 + function.odbc-field-scale.html | 180 + function.odbc-field-type.html | 177 + function.odbc-foreignkeys.html | 303 ++ function.odbc-free-result.html | 222 ++ function.odbc-gettypeinfo.html | 258 ++ function.odbc-longreadlen.html | 194 + function.odbc-num-fields.html | 184 + function.odbc-num-rows.html | 194 + function.odbc-pconnect.html | 240 ++ function.odbc-prepare.html | 186 + function.odbc-primarykeys.html | 212 ++ function.odbc-procedurecolumns.html | 264 ++ function.odbc-procedures.html | 235 ++ function.odbc-result-all.html | 197 + function.odbc-result.html | 242 ++ function.odbc-rollback.html | 186 + function.odbc-setoption.html | 281 ++ function.odbc-specialcolumns.html | 241 ++ function.odbc-statistics.html | 240 ++ function.odbc-tableprivileges.html | 234 ++ function.odbc-tables.html | 366 ++ function.opendir.html | 193 + function.openlog.html | 505 +++ function.ora-bind.html | 252 ++ function.ora-close.html | 197 + function.ora-columnname.html | 185 + function.ora-columnsize.html | 184 + function.ora-columntype.html | 258 ++ function.ora-commit.html | 191 + function.ora-commitoff.html | 196 + function.ora-commiton.html | 196 + function.ora-do.html | 231 ++ function.ora-error.html | 237 ++ function.ora-errorcode.html | 185 + function.ora-exec.html | 208 + function.ora-fetch-into.html | 242 ++ function.ora-fetch.html | 219 ++ function.ora-getcolumn.html | 186 + function.ora-logoff.html | 198 + function.ora-logon.html | 243 ++ function.ora-numcols.html | 204 + function.ora-numrows.html | 175 + function.ora-open.html | 189 + function.ora-parse.html | 199 + function.ora-plogon.html | 184 + function.ora-rollback.html | 197 + function.ord.html | 234 ++ function.pack.html | 366 ++ function.parse-str.html | 229 ++ function.parse-url.html | 175 + function.passthru.html | 248 ++ function.pclose.html | 204 + function.pdf-add-annotation.html | 197 + function.pdf-add-outline.html | 201 + function.pdf-arc.html | 219 ++ function.pdf-begin-page.html | 202 + function.pdf-circle.html | 207 + function.pdf-clip.html | 175 + function.pdf-close-image.html | 201 + function.pdf-close.html | 190 + function.pdf-closepath-fill-stroke.html | 226 ++ function.pdf-closepath-stroke.html | 203 + function.pdf-closepath.html | 196 + function.pdf-continue-text.html | 210 + function.pdf-curveto.html | 231 ++ function.pdf-end-page.html | 183 + function.pdf-endpath.html | 183 + function.pdf-execute-image.html | 242 ++ function.pdf-fill-stroke.html | 225 ++ function.pdf-fill.html | 218 ++ function.pdf-get-image-height.html | 197 + function.pdf-get-image-width.html | 197 + function.pdf-get-info.html | 209 + function.pdf-get-parameter.html | 204 + function.pdf-get-value.html | 204 + function.pdf-lineto.html | 208 + function.pdf-moveto.html | 186 + function.pdf-open-gif.html | 284 ++ function.pdf-open-image-file.html | 284 ++ function.pdf-open-jpeg.html | 251 ++ function.pdf-open-memory-image.html | 271 ++ function.pdf-open-png.html | 299 ++ function.pdf-open-tiff.html | 260 ++ function.pdf-open.html | 221 ++ function.pdf-place-image.html | 197 + function.pdf-put-image.html | 228 ++ function.pdf-rect.html | 206 + function.pdf-restore.html | 228 ++ function.pdf-rotate.html | 180 + function.pdf-save.html | 199 + function.pdf-scale.html | 216 ++ function.pdf-set-border-color.html | 192 + function.pdf-set-border-dash.html | 192 + function.pdf-set-border-style.html | 197 + function.pdf-set-char-spacing.html | 190 + function.pdf-set-duration.html | 183 + function.pdf-set-font.html | 236 ++ function.pdf-set-horiz-scaling.html | 180 + function.pdf-set-info-author.html | 236 ++ function.pdf-set-info-creator.html | 232 ++ function.pdf-set-info-keywords.html | 236 ++ function.pdf-set-info-subject.html | 236 ++ function.pdf-set-info-title.html | 236 ++ function.pdf-set-info.html | 257 ++ function.pdf-set-leading.html | 190 + function.pdf-set-parameter.html | 197 + function.pdf-set-text-matrix.html | 187 + function.pdf-set-text-pos.html | 197 + function.pdf-set-text-rendering.html | 184 + function.pdf-set-text-rise.html | 180 + function.pdf-set-transition.html | 240 ++ function.pdf-set-value.html | 197 + function.pdf-set-word-spacing.html | 190 + function.pdf-setdash.html | 186 + function.pdf-setflat.html | 175 + function.pdf-setgray-fill.html | 183 + function.pdf-setgray-stroke.html | 183 + function.pdf-setgray.html | 190 + function.pdf-setlinecap.html | 175 + function.pdf-setlinejoin.html | 175 + function.pdf-setlinewidth.html | 180 + function.pdf-setmiterlimit.html | 175 + function.pdf-setrgbcolor-fill.html | 180 + function.pdf-setrgbcolor-stroke.html | 180 + function.pdf-setrgbcolor.html | 193 + function.pdf-show-boxed.html | 259 ++ function.pdf-show-xy.html | 206 + function.pdf-show.html | 210 + function.pdf-skew.html | 198 + function.pdf-stringwidth.html | 196 + function.pdf-stroke.html | 191 + function.pdf-translate.html | 237 ++ function.pfpro-cleanup.html | 193 + function.pfpro-init.html | 191 + function.pfpro-process-raw.html | 275 ++ function.pfpro-process.html | 295 ++ function.pfpro-version.html | 177 + function.pfsockopen.html | 192 + function.pg-client-encoding.html | 208 + function.pg-clientencoding.html | 198 + function.pg-close.html | 202 + function.pg-cmdtuples.html | 219 ++ function.pg-connect.html | 279 ++ function.pg-dbname.html | 174 + function.pg-end-copy.html | 189 + function.pg-errormessage.html | 180 + function.pg-exec.html | 202 + function.pg-fetch-array.html | 298 ++ function.pg-fetch-object.html | 329 ++ function.pg-fetch-row.html | 267 ++ function.pg-fieldisnull.html | 175 + function.pg-fieldname.html | 177 + function.pg-fieldnum.html | 178 + function.pg-fieldprtlen.html | 178 + function.pg-fieldsize.html | 181 + function.pg-fieldtype.html | 179 + function.pg-freeresult.html | 184 + function.pg-getlastoid.html | 200 + function.pg-host.html | 178 + function.pg-loclose.html | 188 + function.pg-locreate.html | 189 + function.pg-loexport.html | 190 + function.pg-loimport.html | 183 + function.pg-loopen.html | 190 + function.pg-loread.html | 195 + function.pg-loreadall.html | 179 + function.pg-lounlink.html | 181 + function.pg-lowrite.html | 195 + function.pg-numfields.html | 184 + function.pg-numrows.html | 184 + function.pg-options.html | 177 + function.pg-pconnect.html | 237 ++ function.pg-port.html | 178 + function.pg-put-line.html | 247 ++ function.pg-result.html | 206 + function.pg-set-client-encoding.html | 217 ++ function.pg-setclientencoding.html | 207 + function.pg-trace.html | 242 ++ function.pg-tty.html | 179 + function.pg-untrace.html | 198 + function.php-logo-guid.html | 207 + function.php-sapi-name.html | 224 ++ function.php-uname.html | 220 ++ function.phpcredits.html | 406 ++ function.phpinfo.html | 200 + function.phpversion.html | 232 ++ function.pi.html | 172 + function.popen.html | 251 ++ function.pos.html | 207 + function.posix-ctermid.html | 171 + function.posix-getcwd.html | 171 + function.posix-getegid.html | 181 + function.posix-geteuid.html | 181 + function.posix-getgid.html | 181 + function.posix-getgrgid.html | 171 + function.posix-getgrnam.html | 171 + function.posix-getgroups.html | 182 + function.posix-getlogin.html | 179 + function.posix-getpgid.html | 181 + function.posix-getpgrp.html | 175 + function.posix-getpid.html | 171 + function.posix-getppid.html | 173 + function.posix-getpwnam.html | 314 ++ function.posix-getpwuid.html | 313 ++ function.posix-getrlimit.html | 171 + function.posix-getsid.html | 187 + function.posix-getuid.html | 181 + function.posix-isatty.html | 173 + function.posix-kill.html | 188 + function.posix-mkfifo.html | 173 + function.posix-setgid.html | 189 + function.posix-setpgid.html | 185 + function.posix-setsid.html | 174 + function.posix-setuid.html | 184 + function.posix-times.html | 203 + function.posix-ttyname.html | 171 + function.posix-uname.html | 207 + function.pow.html | 182 + function.preg-grep.html | 230 ++ function.preg-match-all.html | 493 +++ function.preg-match.html | 366 ++ function.preg-quote.html | 294 ++ function.preg-replace.html | 566 +++ function.preg-split.html | 307 ++ function.prev.html | 252 ++ function.print-r.html | 256 ++ function.print.html | 199 + function.printf.html | 220 ++ function.pspell-add-to-personal.html | 243 ++ function.pspell-add-to-session.html | 184 + function.pspell-check.html | 222 ++ function.pspell-clear-session.html | 229 ++ function.pspell-config-create.html | 306 ++ function.pspell-config-ignore.html | 227 ++ function.pspell-config-mode.html | 257 ++ function.pspell-config-personal.html | 244 ++ function.pspell-config-repl.html | 246 ++ function.pspell-config-runtogether.html | 243 ++ function.pspell-config-save-repl.html | 208 + function.pspell-new-config.html | 256 ++ function.pspell-new-personal.html | 343 ++ function.pspell-new.html | 303 ++ function.pspell-save-wordlist.html | 244 ++ function.pspell-store-replacement.html | 261 ++ function.pspell-suggest.html | 224 ++ function.putenv.html | 214 ++ function.quoted-printable-decode.html | 185 + function.quotemeta.html | 226 ++ function.rad2deg.html | 189 + function.rand.html | 271 ++ function.range.html | 198 + function.rawurldecode.html | 226 ++ function.rawurlencode.html | 296 ++ function.read-exif-data.html | 262 ++ function.readdir.html | 269 ++ function.readfile.html | 263 ++ function.readgzfile.html | 236 ++ function.readline-add-history.html | 172 + function.readline-clear-history.html | 172 + function.readline-completion-function.html | 178 + function.readline-info.html | 183 + function.readline-list-history.html | 173 + function.readline-read-history.html | 174 + function.readline-write-history.html | 174 + function.readline.html | 230 ++ function.readlink.html | 209 + function.realpath.html | 224 ++ function.recode-file.html | 192 + function.recode-string.html | 189 + function.recode.html | 188 + function.register-shutdown-function.html | 189 + function.rename.html | 188 + function.require-once.html | 593 +++ function.require.html | 508 +++ function.reset.html | 219 ++ function.restore-error-handler.html | 211 ++ function.rewind.html | 201 + function.rewinddir.html | 179 + function.rmdir.html | 188 + function.round.html | 223 ++ function.rsort.html | 302 ++ function.rtrim.html | 232 ++ function.satellite_caught_exception.html | 268 ++ function.satellite_exception_id.html | 177 + function.satellite_exception_value.html | 180 + function.sem-acquire.html | 204 + function.sem-get.html | 224 ++ function.sem-release.html | 219 ++ function.serialize.html | 274 ++ function.session-cache-limiter.html | 280 ++ function.session-decode.html | 195 + function.session-destroy.html | 180 + function.session-encode.html | 191 + function.session-get-cookie-params.html | 200 + function.session-id.html | 190 + function.session-is-registered.html | 197 + function.session-module-name.html | 196 + function.session-name.html | 267 ++ function.session-register.html | 203 + function.session-save-path.html | 212 ++ function.session-set-cookie-params.html | 175 + function.session-set-save-handler.html | 331 ++ function.session-start.html | 191 + function.session-unregister.html | 201 + function.session-unset.html | 178 + function.set-error-handler.html | 400 ++ function.set-file-buffer.html | 282 ++ function.set-magic-quotes-runtime.html | 197 + function.set-socket-blocking.html | 205 + function.set-time-limit.html | 201 + function.setcookie.html | 462 +++ function.setlocale.html | 256 ++ function.settype.html | 228 ++ function.shm-attach.html | 221 ++ function.shm-detach.html | 189 + function.shm-get-var.html | 195 + function.shm-put-var.html | 197 + function.shm-remove-var.html | 191 + function.shm-remove.html | 185 + function.shm_close.html | 230 ++ function.shm_delete.html | 232 ++ function.shm_open.html | 266 ++ function.shm_read.html | 232 ++ function.shm_write.html | 237 ++ function.show-source.html | 217 ++ function.shuffle.html | 257 ++ function.similar-text.html | 189 + function.sin.html | 187 + function.size.html | 237 ++ function.sizeof.html | 181 + function.sleep.html | 187 + function.snmp-get-quick-print.html | 225 ++ function.snmp-set-quick-print.html | 228 ++ function.snmpget.html | 221 ++ function.snmpset.html | 196 + function.snmpwalk.html | 271 ++ function.snmpwalkoid.html | 282 ++ function.socket-get-status.html | 260 ++ function.socket-set-timeout.html | 262 ++ function.socket.html | 293 ++ function.solid-close.html | 152 + function.solid-connect.html | 152 + function.solid-exec.html | 152 + function.solid-fetchrow.html | 152 + function.solid-fieldname.html | 152 + function.solid-fieldnum.html | 149 + function.solid-freeresult.html | 152 + function.solid-numfields.html | 152 + function.solid-numrows.html | 152 + function.solid-result.html | 152 + function.sort.html | 339 ++ function.soundex.html | 230 ++ function.split.html | 381 ++ function.spliti.html | 205 + function.sprintf.html | 500 +++ function.sql-regcase.html | 244 ++ function.sqrt.html | 177 + function.srand.html | 240 ++ function.sscanf.html | 310 ++ function.stat.html | 244 ++ function.str-pad.html | 269 ++ function.str-repeat.html | 241 ++ function.str-replace.html | 273 ++ function.strcasecmp.html | 274 ++ function.strchr.html | 181 + function.strcmp.html | 240 ++ function.strcspn.html | 198 + function.strerror.html | 301 ++ function.strftime.html | 453 +++ function.strip-tags.html | 205 + function.stripcslashes.html | 210 + function.stripslashes.html | 197 + function.stristr.html | 249 ++ function.strlen.html | 177 + function.strnatcasecmp.html | 272 ++ function.strnatcmp.html | 360 ++ function.strncmp.html | 266 ++ function.strpos.html | 323 ++ function.strrchr.html | 283 ++ function.strrev.html | 177 + function.strrpos.html | 241 ++ function.strspn.html | 225 ++ function.strstr.html | 293 ++ function.strtok.html | 251 ++ function.strtolower.html | 238 ++ function.strtotime.html | 220 ++ function.strtoupper.html | 238 ++ function.strtr.html | 313 ++ function.strval.html | 216 ++ function.substr-count.html | 227 ++ function.substr-replace.html | 363 ++ function.substr.html | 404 ++ function.swf-actiongeturl.html | 191 + function.swf-actiongotoframe.html | 185 + function.swf-actiongotolabel.html | 187 + function.swf-actionnextframe.html | 174 + function.swf-actionplay.html | 176 + function.swf-actionprevframe.html | 171 + function.swf-actionsettarget.html | 180 + function.swf-actionstop.html | 176 + function.swf-actiontogglequality.html | 176 + function.swf-actionwaitforframe.html | 196 + function.swf-addbuttonrecord.html | 251 ++ function.swf-addcolor.html | 236 ++ function.swf-closefile.html | 293 ++ function.swf-definebitmap.html | 181 + function.swf-definefont.html | 199 + function.swf-defineline.html | 214 ++ function.swf-definepoly.html | 210 + function.swf-definerect.html | 215 ++ function.swf-definetext.html | 196 + function.swf-endbutton.html | 180 + function.swf-enddoaction.html | 181 + function.swf-endshape.html | 180 + function.swf-endsymbol.html | 185 + function.swf-fontsize.html | 185 + function.swf-fontslant.html | 182 + function.swf-fonttracking.html | 184 + function.swf-getbitmapinfo.html | 206 + function.swf-getfontinfo.html | 195 + function.swf-getframe.html | 178 + function.swf-labelframe.html | 181 + function.swf-lookat.html | 227 ++ function.swf-modifyobject.html | 214 ++ function.swf-mulcolor.html | 236 ++ function.swf-nextid.html | 178 + function.swf-oncondition.html | 279 ++ function.swf-openfile.html | 235 ++ function.swf-ortho.html | 187 + function.swf-ortho2.html | 191 + function.swf-perspective.html | 224 ++ function.swf-placeobject.html | 229 ++ function.swf-polarview.html | 215 ++ function.swf-popmatrix.html | 180 + function.swf-posround.html | 191 + function.swf-pushmatrix.html | 180 + function.swf-removeobject.html | 181 + function.swf-rotate.html | 193 + function.swf-scale.html | 199 + function.swf-setfont.html | 184 + function.swf-setframe.html | 184 + function.swf-shapearc.html | 213 ++ function.swf-shapecurveto.html | 220 ++ function.swf-shapecurveto3.html | 227 ++ function.swf-shapefillbitmapclip.html | 184 + function.swf-shapefillbitmaptile.html | 184 + function.swf-shapefilloff.html | 178 + function.swf-shapefillsolid.html | 190 + function.swf-shapelinesold.html | 196 + function.swf-shapelineto.html | 192 + function.swf-shapemoveto.html | 192 + function.swf-showframe.html | 174 + function.swf-startbutton.html | 189 + function.swf-startdoaction.html | 181 + function.swf-startshape.html | 185 + function.swf-startsymbol.html | 183 + function.swf-textwidth.html | 185 + function.swf-translate.html | 198 + function.swf-viewport.html | 205 + function.sybase-affected-rows.html | 203 + function.sybase-close.html | 202 + function.sybase-connect.html | 210 + function.sybase-data-seek.html | 190 + function.sybase-fetch-array.html | 199 + function.sybase-fetch-field.html | 215 ++ function.sybase-fetch-object.html | 219 ++ function.sybase-fetch-row.html | 217 ++ function.sybase-field-seek.html | 189 + function.sybase-free-result.html | 183 + function.sybase-num-fields.html | 202 + function.sybase-num-rows.html | 193 + function.sybase-pconnect.html | 206 + function.sybase-query.html | 208 + function.sybase-result.html | 214 ++ function.sybase-select-db.html | 219 ++ function.symlink.html | 222 ++ function.syslog.html | 409 ++ function.system.html | 249 ++ function.tan.html | 187 + function.tempnam.html | 250 ++ function.textdomain.html | 183 + function.time.html | 182 + function.tmpfile.html | 208 + function.touch.html | 224 ++ function.trigger-error.html | 260 ++ function.trim.html | 199 + function.uasort.html | 253 ++ function.ucfirst.html | 240 ++ function.ucwords.html | 242 ++ function.uksort.html | 314 ++ function.umask.html | 184 + function.uniqid.html | 267 ++ function.unixtojd.html | 206 + function.unlink.html | 202 + function.unpack.html | 249 ++ function.unserialize.html | 267 ++ function.unset.html | 499 +++ function.urldecode.html | 249 ++ function.urlencode.html | 330 ++ function.user-error.html | 211 ++ function.usleep.html | 202 + function.usort.html | 460 +++ function.utf8-decode.html | 197 + function.utf8-encode.html | 305 ++ function.var-dump.html | 218 ++ function.virtual.html | 199 + function.vm-addalias.html | 183 + function.vm-adduser.html | 184 + function.vm-delalias.html | 171 + function.vm-deluser.html | 171 + function.vm-passwd.html | 189 + function.wddx-add-vars.html | 190 + function.wddx-deserialize.html | 182 + function.wddx-packet-end.html | 181 + function.wddx-packet-start.html | 184 + function.wddx-serialize-value.html | 190 + function.wddx-serialize-vars.html | 248 ++ function.wordwrap.html | 382 ++ function.xml-error-string.html | 206 + function.xml-get-current-byte-index.html | 203 + function.xml-get-current-column-number.html | 213 ++ function.xml-get-current-line-number.html | 203 + function.xml-get-error-code.html | 205 + function.xml-parse-into-struct.html | 504 +++ function.xml-parse.html | 283 ++ function.xml-parser-create.html | 230 ++ function.xml-parser-free.html | 200 + function.xml-parser-get-option.html | 234 ++ function.xml-parser-set-option.html | 318 ++ function.xml-set-character-data-handler.html | 301 ++ function.xml-set-default-handler.html | 304 ++ function.xml-set-element-handler.html | 446 +++ ...n.xml-set-external-entity-ref-handler.html | 377 ++ function.xml-set-notation-decl-handler.html | 388 ++ function.xml-set-object.html | 240 ++ ...ml-set-processing-instruction-handler.html | 367 ++ ....xml-set-unparsed-entity-decl-handler.html | 411 ++ function.xmldoc.html | 180 + function.xmldocfile.html | 183 + function.xmltree.html | 181 + function.yaz-addinfo.html | 174 + function.yaz-close.html | 173 + function.yaz-connect.html | 189 + function.yaz-errno.html | 191 + function.yaz-error.html | 187 + function.yaz-hits.html | 176 + function.yaz-range.html | 194 + function.yaz-record.html | 186 + function.yaz-search.html | 431 +++ function.yaz-syntax.html | 189 + function.yaz-wait.html | 192 + function.yp-err-string.html | 193 + function.yp-errno.html | 242 ++ function.yp-first.html | 230 ++ function.yp-get-default-domain.html | 224 ++ function.yp-master.html | 228 ++ function.yp-match.html | 230 ++ function.yp-next.html | 236 ++ function.yp-order.html | 226 ++ function.zend-logo-guid.html | 184 + functions.arguments.html | 503 +++ functions.html | 268 ++ functions.old-syntax.html | 207 + functions.returning-values.html | 237 ++ functions.variable-functions.html | 197 + getting-started.html | 163 + index.html | 2 + install-problems.html | 210 + install-security.html | 146 + install-unix.html | 2187 +++++++++++ install-windows95-nt.html | 958 +++++ install.configure.html | 3362 +++++++++++++++++ install.unix.html | 714 ++++ installation.html | 190 + intro-history.html | 198 + intro-whatcando.html | 225 ++ introduction.html | 244 ++ keyword.class.html | 332 ++ keyword.function.html | 173 + keyword.function.return.html | 403 ++ keyword.old-function.html | 186 + lang-syntax.html | 367 ++ langref.html | 193 + language.basic-syntax.comments.html | 228 ++ language.basic-syntax.html | 255 ++ ...e.basic-syntax.instruction-separation.html | 172 + language.constants.html | 374 ++ language.expressions.html | 389 ++ language.oop.html | 428 +++ language.operators.assignment.html | 223 ++ language.operators.bitwise.html | 263 ++ language.operators.comparison.html | 341 ++ language.operators.errorcontrol.html | 221 ++ language.operators.execution.html | 205 + language.operators.html | 320 ++ language.operators.increment.html | 276 ++ language.operators.logical.html | 262 ++ language.operators.precedence.html | 396 ++ language.operators.string.html | 178 + language.references.arent.html | 200 + language.references.html | 195 + language.references.return.html | 200 + language.references.spot.html | 214 ++ language.references.unset.html | 182 + language.references.whatdo.html | 264 ++ language.types.array.html | 561 +++ language.types.double.html | 243 ++ language.types.html | 293 ++ language.types.object.html | 193 + language.types.string.html | 566 +++ language.types.type-juggling.html | 491 +++ language.variables.external.html | 591 +++ language.variables.html | 336 ++ language.variables.predefined.html | 635 ++++ language.variables.scope.html | 457 +++ language.variables.variable.html | 289 ++ ln39.html | 119 + manual.html | 687 ++++ manual.php3 | 2 + migration-booleval.html | 155 + migration-errors.html | 143 + migration-expr.html | 238 ++ migration-if-endif.html | 227 ++ migration-other.html | 329 ++ migration-startendtags.html | 305 ++ migration-truefalse.html | 223 ++ migration-while.html | 241 ++ migration.html | 223 ++ oop.html | 413 ++ operators.html | 954 +++++ pattern.options.html | 314 ++ pcre.pattern.modifiers.html | 353 ++ pcre.pattern.options.html | 343 ++ pcre.pattern.syntax.html | 1259 ++++++ phpdevel-errors.html | 336 ++ phpdevel-hhgtpi.html | 136 + phpdevel.html | 1473 ++++++++ preface.html | 237 ++ r5601.html | 166 + r5607.html | 166 + r5686.html | 166 + r5819.html | 166 + r6529.html | 169 + r6628.html | 394 ++ r6669.html | 192 + r6691.html | 214 ++ r6720.html | 214 ++ r6749.html | 214 ++ r6778.html | 190 + r6799.html | 232 ++ r6834.html | 190 + r6855.html | 231 ++ r6891.html | 231 ++ r6927.html | 189 + r6948.html | 226 ++ r6982.html | 190 + ref.adabas.html | 238 ++ ref.apache.html | 172 + ref.array.html | 454 +++ ref.aspell.html | 210 + ref.bc.html | 241 ++ ref.calendar.html | 267 ++ ref.ccvs.html | 214 ++ ref.classobj.html | 476 +++ ref.com.html | 207 + ref.cpdf.html | 761 ++++ ref.curl.html | 287 ++ ref.cybercash.html | 183 + ref.datetime.html | 222 ++ ref.dba.html | 466 +++ ref.dbase.html | 246 ++ ref.dbm.html | 272 ++ ref.dir.html | 184 + ref.dl.html | 154 + ref.domxml.html | 417 ++ ref.errorfunc.html | 212 ++ ref.exec.html | 176 + ref.fdf.html | 424 +++ ref.filepro.html | 199 + ref.filesystem.html | 496 +++ ref.ftp.html | 345 ++ ref.funchand.html | 204 + ref.gettext.html | 186 + ref.http.html | 174 + ref.hyperwave.html | 942 +++++ ref.ibase.html | 283 ++ ref.icap.html | 212 ++ ref.ifx.html | 563 +++ ref.image.html | 513 +++ ref.imap.html | 660 ++++ ref.info.html | 336 ++ ref.ldap.html | 575 +++ ref.mail.html | 173 + ref.math.html | 643 ++++ ref.mcal.html | 478 +++ ref.mcrypt.html | 799 ++++ ref.mhash.html | 324 ++ ref.misc.html | 274 ++ ref.msql.html | 374 ++ ref.mssql.html | 257 ++ ref.mysql.html | 395 ++ ref.network.html | 291 ++ ref.nis.html | 210 + ref.oci8.html | 477 +++ ref.odbc.html | 451 +++ ref.oracle.html | 266 ++ ref.outcontrol.html | 316 ++ ref.pcre.html | 310 ++ ref.pdf.html | 1578 ++++++++ ref.pfpro.html | 270 ++ ref.pgsql.html | 582 +++ ref.posix.html | 324 ++ ref.pspell.html | 264 ++ ref.readline.html | 220 ++ ref.recode.html | 187 + ref.regex.html | 341 ++ ref.satellite.html | 194 + ref.sem.html | 286 ++ ref.session.html | 837 ++++ ref.shmop.html | 260 ++ ref.snmp.html | 221 ++ ref.sockets.html | 424 +++ ref.solid.html | 208 + ref.strings.html | 612 +++ ref.swf.html | 665 ++++ ref.sybase.html | 229 ++ ref.url.html | 184 + ref.var.html | 281 ++ ref.vmailmgr.html | 274 ++ ref.wddx.html | 339 ++ ref.xml.html | 1335 +++++++ ref.yaz.html | 411 ++ ref.zlib.html | 341 ++ security.apache.html | 142 + security.html | 574 +++ types.html | 734 ++++ variables.html | 993 +++++ x2176.html | 240 ++ 1752 files changed, 416836 insertions(+) create mode 100644 README create mode 100644 appendixes.html create mode 100644 calling-user-functions.html create mode 100644 class.dir.html create mode 100644 class.orbitenum.html create mode 100644 class.orbitobject.html create mode 100644 class.orbitstruct.html create mode 100644 config-apache.html create mode 100644 config-cgi.html create mode 100644 config-security.html create mode 100644 config-virtualhost.html create mode 100644 configuration.html create mode 100644 constants.html create mode 100644 control-structures.alternative-syntax.html create mode 100644 control-structures.break.html create mode 100644 control-structures.continue.html create mode 100644 control-structures.do.while.html create mode 100644 control-structures.else.html create mode 100644 control-structures.elseif.html create mode 100644 control-structures.for.html create mode 100644 control-structures.foreach.html create mode 100644 control-structures.html create mode 100644 control-structures.switch.html create mode 100644 control-structures.while.html create mode 100644 copyright.html create mode 100644 debugger-protocol.html create mode 100644 debugger.html create mode 100644 expressions.html create mode 100644 feature-connection-handling.html create mode 100644 feature-cookies.html create mode 100644 feature-error-handling.html create mode 100644 feature-fileupload.html create mode 100644 feature-fileupload.multiple.html create mode 100644 feature-images.html create mode 100644 feature-putsupport.html create mode 100644 feature-regexps.html create mode 100644 features.connection-handling.html create mode 100644 features.cookies.html create mode 100644 features.error-handling.html create mode 100644 features.file-upload.common-pitfalls.html create mode 100644 features.file-upload.html create mode 100644 features.file-upload.put-method.html create mode 100644 features.html create mode 100644 features.http-auth.html create mode 100644 features.images.html create mode 100644 features.persistent-connections.html create mode 100644 features.remote-files.html create mode 100644 funcref.html create mode 100644 function.abs.html create mode 100644 function.accept-connect.html create mode 100644 function.acos.html create mode 100644 function.ada-afetch.html create mode 100644 function.ada-autocommit.html create mode 100644 function.ada-close.html create mode 100644 function.ada-commit.html create mode 100644 function.ada-connect.html create mode 100644 function.ada-exec.html create mode 100644 function.ada-fetchrow.html create mode 100644 function.ada-fieldname.html create mode 100644 function.ada-fieldnum.html create mode 100644 function.ada-fieldtype.html create mode 100644 function.ada-freeresult.html create mode 100644 function.ada-numfields.html create mode 100644 function.ada-numrows.html create mode 100644 function.ada-result.html create mode 100644 function.ada-resultall.html create mode 100644 function.ada-rollback.html create mode 100644 function.addcslashes.html create mode 100644 function.addslashes.html create mode 100644 function.apache-lookup-uri.html create mode 100644 function.apache-note.html create mode 100644 function.array-count-values.html create mode 100644 function.array-diff.html create mode 100644 function.array-flip.html create mode 100644 function.array-intersect.html create mode 100644 function.array-keys.html create mode 100644 function.array-merge-recursive.html create mode 100644 function.array-merge.html create mode 100644 function.array-multisort.html create mode 100644 function.array-pad.html create mode 100644 function.array-pop.html create mode 100644 function.array-push.html create mode 100644 function.array-rand.html create mode 100644 function.array-reverse.html create mode 100644 function.array-shift.html create mode 100644 function.array-slice.html create mode 100644 function.array-splice.html create mode 100644 function.array-unique.html create mode 100644 function.array-unshift.html create mode 100644 function.array-values.html create mode 100644 function.array-walk.html create mode 100644 function.array.html create mode 100644 function.arsort.html create mode 100644 function.asin.html create mode 100644 function.asort.html create mode 100644 function.aspell-check-raw.html create mode 100644 function.aspell-check.html create mode 100644 function.aspell-new.html create mode 100644 function.aspell-suggest.html create mode 100644 function.assert-options.html create mode 100644 function.assert.html create mode 100644 function.assert_options.html create mode 100644 function.atan.html create mode 100644 function.atan2.html create mode 100644 function.base-convert.html create mode 100644 function.base64-decode.html create mode 100644 function.base64-encode.html create mode 100644 function.basename.html create mode 100644 function.bcadd.html create mode 100644 function.bccomp.html create mode 100644 function.bcdiv.html create mode 100644 function.bcmod.html create mode 100644 function.bcmul.html create mode 100644 function.bcpow.html create mode 100644 function.bcscale.html create mode 100644 function.bcsqrt.html create mode 100644 function.bcsub.html create mode 100644 function.bin2hex.html create mode 100644 function.bind.html create mode 100644 function.bindec.html create mode 100644 function.bindtextdomain.html create mode 100644 function.call-user-func.html create mode 100644 function.call-user-method.html create mode 100644 function.ceil.html create mode 100644 function.chdir.html create mode 100644 function.checkdate.html create mode 100644 function.checkdnsrr.html create mode 100644 function.chgrp.html create mode 100644 function.chmod.html create mode 100644 function.chop.html create mode 100644 function.chown.html create mode 100644 function.chr.html create mode 100644 function.chunk-split.html create mode 100644 function.class-exists.html create mode 100644 function.clearstatcache.html create mode 100644 function.close.html create mode 100644 function.closedir.html create mode 100644 function.closelog.html create mode 100644 function.com-get.html create mode 100644 function.com-invoke.html create mode 100644 function.com-load.html create mode 100644 function.com-propget.html create mode 100644 function.com-propput.html create mode 100644 function.com-propset.html create mode 100644 function.com-set.html create mode 100644 function.compact.html create mode 100644 function.connect.html create mode 100644 function.connection-aborted.html create mode 100644 function.connection-status.html create mode 100644 function.connection-timeout.html create mode 100644 function.convert-cyr-string.html create mode 100644 function.copy.html create mode 100644 function.cos.html create mode 100644 function.count-chars.html create mode 100644 function.count.html create mode 100644 function.cpdf-add-annotation.html create mode 100644 function.cpdf-add-outline.html create mode 100644 function.cpdf-arc.html create mode 100644 function.cpdf-begin-text.html create mode 100644 function.cpdf-circle.html create mode 100644 function.cpdf-clip.html create mode 100644 function.cpdf-close.html create mode 100644 function.cpdf-closepath-fill-stroke.html create mode 100644 function.cpdf-closepath-stroke.html create mode 100644 function.cpdf-closepath.html create mode 100644 function.cpdf-continue-text.html create mode 100644 function.cpdf-curveto.html create mode 100644 function.cpdf-end-text.html create mode 100644 function.cpdf-endpath.html create mode 100644 function.cpdf-fill-stroke.html create mode 100644 function.cpdf-fill.html create mode 100644 function.cpdf-finalize-page.html create mode 100644 function.cpdf-finalize.html create mode 100644 function.cpdf-global-set-document-limits.html create mode 100644 function.cpdf-import-jpeg.html create mode 100644 function.cpdf-lineto.html create mode 100644 function.cpdf-moveto.html create mode 100644 function.cpdf-newpath.html create mode 100644 function.cpdf-open.html create mode 100644 function.cpdf-output-buffer.html create mode 100644 function.cpdf-page-init.html create mode 100644 function.cpdf-place-inline-image.html create mode 100644 function.cpdf-rect.html create mode 100644 function.cpdf-restore.html create mode 100644 function.cpdf-rlineto.html create mode 100644 function.cpdf-rmoveto.html create mode 100644 function.cpdf-rotate.html create mode 100644 function.cpdf-save-to-file.html create mode 100644 function.cpdf-save.html create mode 100644 function.cpdf-scale.html create mode 100644 function.cpdf-set-char-spacing.html create mode 100644 function.cpdf-set-creator.html create mode 100644 function.cpdf-set-current-page.html create mode 100644 function.cpdf-set-font.html create mode 100644 function.cpdf-set-horiz-scaling.html create mode 100644 function.cpdf-set-keywords.html create mode 100644 function.cpdf-set-leading.html create mode 100644 function.cpdf-set-page-animation.html create mode 100644 function.cpdf-set-subject.html create mode 100644 function.cpdf-set-text-matrix.html create mode 100644 function.cpdf-set-text-pos.html create mode 100644 function.cpdf-set-text-rendering.html create mode 100644 function.cpdf-set-text-rise.html create mode 100644 function.cpdf-set-title.html create mode 100644 function.cpdf-set-word-spacing.html create mode 100644 function.cpdf-setdash.html create mode 100644 function.cpdf-setflat.html create mode 100644 function.cpdf-setgray-fill.html create mode 100644 function.cpdf-setgray-stroke.html create mode 100644 function.cpdf-setgray.html create mode 100644 function.cpdf-setlinecap.html create mode 100644 function.cpdf-setlinejoin.html create mode 100644 function.cpdf-setlinewidth.html create mode 100644 function.cpdf-setmiterlimit.html create mode 100644 function.cpdf-setrgbcolor-fill.html create mode 100644 function.cpdf-setrgbcolor-stroke.html create mode 100644 function.cpdf-setrgbcolor.html create mode 100644 function.cpdf-show-xy.html create mode 100644 function.cpdf-show.html create mode 100644 function.cpdf-stringwidth.html create mode 100644 function.cpdf-stroke.html create mode 100644 function.cpdf-text.html create mode 100644 function.cpdf-translate.html create mode 100644 function.crc32.html create mode 100644 function.create-function.html create mode 100644 function.crypt.html create mode 100644 function.curl-close.html create mode 100644 function.curl-exec.html create mode 100644 function.curl-init.html create mode 100644 function.curl-setopt.html create mode 100644 function.curl-version.html create mode 100644 function.current.html create mode 100644 function.cybercash-base64-decode.html create mode 100644 function.cybercash-base64-encode.html create mode 100644 function.cybercash-decr.html create mode 100644 function.cybercash-encr.html create mode 100644 function.date.html create mode 100644 function.dba-close.html create mode 100644 function.dba-delete.html create mode 100644 function.dba-exists.html create mode 100644 function.dba-fetch.html create mode 100644 function.dba-firstkey.html create mode 100644 function.dba-insert.html create mode 100644 function.dba-nextkey.html create mode 100644 function.dba-open.html create mode 100644 function.dba-optimize.html create mode 100644 function.dba-popen.html create mode 100644 function.dba-replace.html create mode 100644 function.dba-sync.html create mode 100644 function.dbase-add-record.html create mode 100644 function.dbase-close.html create mode 100644 function.dbase-create.html create mode 100644 function.dbase-delete-record.html create mode 100644 function.dbase-get-record-with-names.html create mode 100644 function.dbase-get-record.html create mode 100644 function.dbase-numfields.html create mode 100644 function.dbase-numrecords.html create mode 100644 function.dbase-open.html create mode 100644 function.dbase-pack.html create mode 100644 function.dbase-replace-record.html create mode 100644 function.dblist.html create mode 100644 function.dbmclose.html create mode 100644 function.dbmdelete.html create mode 100644 function.dbmexists.html create mode 100644 function.dbmfetch.html create mode 100644 function.dbmfirstkey.html create mode 100644 function.dbminsert.html create mode 100644 function.dbmnextkey.html create mode 100644 function.dbmopen.html create mode 100644 function.dbmreplace.html create mode 100644 function.dcgettext.html create mode 100644 function.debugger-off.html create mode 100644 function.debugger-on.html create mode 100644 function.decbin.html create mode 100644 function.dechex.html create mode 100644 function.decoct.html create mode 100644 function.define-syslog-variables.html create mode 100644 function.define.html create mode 100644 function.defined.html create mode 100644 function.deg2rad.html create mode 100644 function.delete.html create mode 100644 function.dgettext.html create mode 100644 function.die.html create mode 100644 function.dirname.html create mode 100644 function.diskfreespace.html create mode 100644 function.dl.html create mode 100644 function.doubleval.html create mode 100644 function.each.html create mode 100644 function.easter-date.html create mode 100644 function.easter-days.html create mode 100644 function.echo.html create mode 100644 function.empty.html create mode 100644 function.end.html create mode 100644 function.ereg-replace.html create mode 100644 function.ereg.html create mode 100644 function.eregi-replace.html create mode 100644 function.eregi.html create mode 100644 function.error-log.html create mode 100644 function.error-reporting.html create mode 100644 function.escapeshellarg.html create mode 100644 function.escapeshellcmd.html create mode 100644 function.eval.html create mode 100644 function.exec.html create mode 100644 function.exit.html create mode 100644 function.exp.html create mode 100644 function.explode.html create mode 100644 function.extension-loaded.html create mode 100644 function.extract.html create mode 100644 function.ezmlm-hash.html create mode 100644 function.fclose.html create mode 100644 function.fdf-close.html create mode 100644 function.fdf-create.html create mode 100644 function.fdf-get-file.html create mode 100644 function.fdf-get-status.html create mode 100644 function.fdf-get-value.html create mode 100644 function.fdf-next-field-name.html create mode 100644 function.fdf-open.html create mode 100644 function.fdf-save.html create mode 100644 function.fdf-set-ap.html create mode 100644 function.fdf-set-file.html create mode 100644 function.fdf-set-flags.html create mode 100644 function.fdf-set-javascript-action.html create mode 100644 function.fdf-set-opt.html create mode 100644 function.fdf-set-status.html create mode 100644 function.fdf-set-submit-form-action.html create mode 100644 function.fdf-set-value.html create mode 100644 function.feof.html create mode 100644 function.fgetc.html create mode 100644 function.fgetcsv.html create mode 100644 function.fgets.html create mode 100644 function.fgetss.html create mode 100644 function.file-exists.html create mode 100644 function.file.html create mode 100644 function.fileatime.html create mode 100644 function.filectime.html create mode 100644 function.filegroup.html create mode 100644 function.fileinode.html create mode 100644 function.filemtime.html create mode 100644 function.fileowner.html create mode 100644 function.fileperms.html create mode 100644 function.filepro-fieldcount.html create mode 100644 function.filepro-fieldname.html create mode 100644 function.filepro-fieldtype.html create mode 100644 function.filepro-fieldwidth.html create mode 100644 function.filepro-retrieve.html create mode 100644 function.filepro-rowcount.html create mode 100644 function.filepro.html create mode 100644 function.filesize.html create mode 100644 function.filetype.html create mode 100644 function.flock.html create mode 100644 function.floor.html create mode 100644 function.flush.html create mode 100644 function.fopen.html create mode 100644 function.fpassthru.html create mode 100644 function.fputs.html create mode 100644 function.fread.html create mode 100644 function.frenchtojd.html create mode 100644 function.fscanf.html create mode 100644 function.fseek.html create mode 100644 function.fsockopen.html create mode 100644 function.fstat.html create mode 100644 function.ftell.html create mode 100644 function.ftp-cdup.html create mode 100644 function.ftp-chdir.html create mode 100644 function.ftp-connect.html create mode 100644 function.ftp-delete.html create mode 100644 function.ftp-fget.html create mode 100644 function.ftp-fput.html create mode 100644 function.ftp-get.html create mode 100644 function.ftp-login.html create mode 100644 function.ftp-mdtm.html create mode 100644 function.ftp-mkdir.html create mode 100644 function.ftp-nlist.html create mode 100644 function.ftp-pasv.html create mode 100644 function.ftp-put.html create mode 100644 function.ftp-pwd.html create mode 100644 function.ftp-quit.html create mode 100644 function.ftp-rawlist.html create mode 100644 function.ftp-rename.html create mode 100644 function.ftp-rmdir.html create mode 100644 function.ftp-site.html create mode 100644 function.ftp-size.html create mode 100644 function.ftp-systype.html create mode 100644 function.ftruncate.html create mode 100644 function.func-get-arg.html create mode 100644 function.func-get-args.html create mode 100644 function.func-num-args.html create mode 100644 function.function-exists.html create mode 100644 function.fwrite.html create mode 100644 function.get-browser.html create mode 100644 function.get-cfg-var.html create mode 100644 function.get-class-methods.html create mode 100644 function.get-class-vars.html create mode 100644 function.get-class.html create mode 100644 function.get-current-user.html create mode 100644 function.get-declared-classes.html create mode 100644 function.get-extension-funcs.html create mode 100644 function.get-html-translation-table.html create mode 100644 function.get-included-files.html create mode 100644 function.get-loaded-extensions.html create mode 100644 function.get-magic-quotes-gpc.html create mode 100644 function.get-magic-quotes-runtime.html create mode 100644 function.get-meta-tags.html create mode 100644 function.get-object-vars.html create mode 100644 function.get-parent-class.html create mode 100644 function.get-required-files.html create mode 100644 function.getallheaders.html create mode 100644 function.getcwd.html create mode 100644 function.getdate.html create mode 100644 function.getenv.html create mode 100644 function.gethostbyaddr.html create mode 100644 function.gethostbyname.html create mode 100644 function.gethostbynamel.html create mode 100644 function.getimagesize.html create mode 100644 function.getlastmod.html create mode 100644 function.getmxrr.html create mode 100644 function.getmyinode.html create mode 100644 function.getmypid.html create mode 100644 function.getmyuid.html create mode 100644 function.getprotobyname.html create mode 100644 function.getprotobynumber.html create mode 100644 function.getrandmax.html create mode 100644 function.getrusage.html create mode 100644 function.getservbyname.html create mode 100644 function.getservbyport.html create mode 100644 function.gettext.html create mode 100644 function.gettimeofday.html create mode 100644 function.gettype.html create mode 100644 function.gmdate.html create mode 100644 function.gmmktime.html create mode 100644 function.gmstrftime.html create mode 100644 function.gregoriantojd.html create mode 100644 function.gzclose.html create mode 100644 function.gzcompress.html create mode 100644 function.gzeof.html create mode 100644 function.gzfile.html create mode 100644 function.gzgetc.html create mode 100644 function.gzgets.html create mode 100644 function.gzgetss.html create mode 100644 function.gzopen.html create mode 100644 function.gzpassthru.html create mode 100644 function.gzputs.html create mode 100644 function.gzread.html create mode 100644 function.gzrewind.html create mode 100644 function.gzseek.html create mode 100644 function.gztell.html create mode 100644 function.gzuncompress.html create mode 100644 function.gzwrite.html create mode 100644 function.header.html create mode 100644 function.headers-sent.html create mode 100644 function.hebrev.html create mode 100644 function.hebrevc.html create mode 100644 function.hexdec.html create mode 100644 function.highlight-file.html create mode 100644 function.highlight-string.html create mode 100644 function.htmlentities.html create mode 100644 function.htmlspecialchars.html create mode 100644 function.hw-array2objrec.html create mode 100644 function.hw-children.html create mode 100644 function.hw-childrenobj.html create mode 100644 function.hw-close.html create mode 100644 function.hw-connect.html create mode 100644 function.hw-cp.html create mode 100644 function.hw-deleteobject.html create mode 100644 function.hw-docbyanchor.html create mode 100644 function.hw-docbyanchorobj.html create mode 100644 function.hw-documentattributes.html create mode 100644 function.hw-documentbodytag.html create mode 100644 function.hw-documentcontent.html create mode 100644 function.hw-documentsetcontent.html create mode 100644 function.hw-documentsize.html create mode 100644 function.hw-edittext.html create mode 100644 function.hw-error.html create mode 100644 function.hw-errormsg.html create mode 100644 function.hw-free-document.html create mode 100644 function.hw-getanchors.html create mode 100644 function.hw-getanchorsobj.html create mode 100644 function.hw-getandlock.html create mode 100644 function.hw-getchildcoll.html create mode 100644 function.hw-getchildcollobj.html create mode 100644 function.hw-getchilddoccoll.html create mode 100644 function.hw-getchilddoccollobj.html create mode 100644 function.hw-getobject.html create mode 100644 function.hw-getobjectbyquery.html create mode 100644 function.hw-getobjectbyquerycoll.html create mode 100644 function.hw-getobjectbyquerycollobj.html create mode 100644 function.hw-getobjectbyqueryobj.html create mode 100644 function.hw-getparents.html create mode 100644 function.hw-getparentsobj.html create mode 100644 function.hw-getremote.html create mode 100644 function.hw-getremotechildren.html create mode 100644 function.hw-getsrcbydestobj.html create mode 100644 function.hw-gettext.html create mode 100644 function.hw-getusername.html create mode 100644 function.hw-identify.html create mode 100644 function.hw-incollections.html create mode 100644 function.hw-info.html create mode 100644 function.hw-inscoll.html create mode 100644 function.hw-insdoc.html create mode 100644 function.hw-insertdocument.html create mode 100644 function.hw-insertobject.html create mode 100644 function.hw-mapid.html create mode 100644 function.hw-modifyobject.html create mode 100644 function.hw-mv.html create mode 100644 function.hw-new-document.html create mode 100644 function.hw-objrec2array.html create mode 100644 function.hw-outputdocument.html create mode 100644 function.hw-pconnect.html create mode 100644 function.hw-pipedocument.html create mode 100644 function.hw-root.html create mode 100644 function.hw-unlock.html create mode 100644 function.hw-who.html create mode 100644 function.ibase-bind.html create mode 100644 function.ibase-close.html create mode 100644 function.ibase-connect.html create mode 100644 function.ibase-execute.html create mode 100644 function.ibase-fetch-object.html create mode 100644 function.ibase-fetch-row.html create mode 100644 function.ibase-free-query.html create mode 100644 function.ibase-free-result.html create mode 100644 function.ibase-num-fields.html create mode 100644 function.ibase-pconnect.html create mode 100644 function.ibase-prepare.html create mode 100644 function.ibase-query.html create mode 100644 function.ibase-timefmt.html create mode 100644 function.icap-close.html create mode 100644 function.icap-delete-event.html create mode 100644 function.icap-fetch-event.html create mode 100644 function.icap-list-alarms.html create mode 100644 function.icap-list-events.html create mode 100644 function.icap-open.html create mode 100644 function.icap-snooze.html create mode 100644 function.icap-store-event.html create mode 100644 function.ifx-affected-rows.html create mode 100644 function.ifx-blobinfile-mode.html create mode 100644 function.ifx-byteasvarchar.html create mode 100644 function.ifx-close.html create mode 100644 function.ifx-connect.html create mode 100644 function.ifx-copy-blob.html create mode 100644 function.ifx-create-blob.html create mode 100644 function.ifx-create-char.html create mode 100644 function.ifx-do.html create mode 100644 function.ifx-error.html create mode 100644 function.ifx-errormsg.html create mode 100644 function.ifx-fetch-row.html create mode 100644 function.ifx-fieldproperties.html create mode 100644 function.ifx-fieldtypes.html create mode 100644 function.ifx-free-blob.html create mode 100644 function.ifx-free-char.html create mode 100644 function.ifx-free-result.html create mode 100644 function.ifx-get-blob.html create mode 100644 function.ifx-get-char.html create mode 100644 function.ifx-getsqlca.html create mode 100644 function.ifx-htmltbl-result.html create mode 100644 function.ifx-nullformat.html create mode 100644 function.ifx-num-fields.html create mode 100644 function.ifx-num-rows.html create mode 100644 function.ifx-pconnect.html create mode 100644 function.ifx-prepare.html create mode 100644 function.ifx-query.html create mode 100644 function.ifx-textasvarchar.html create mode 100644 function.ifx-update-blob.html create mode 100644 function.ifx-update-char.html create mode 100644 function.ifxus-close-slob.html create mode 100644 function.ifxus-create-slob.html create mode 100644 function.ifxus-free-slob.html create mode 100644 function.ifxus-open-slob.html create mode 100644 function.ifxus-read-slob.html create mode 100644 function.ifxus-seek-slob.html create mode 100644 function.ifxus-tell-slob.html create mode 100644 function.ifxus-write-slob.html create mode 100644 function.ignore-user-abort.html create mode 100644 function.imagearc.html create mode 100644 function.imagechar.html create mode 100644 function.imagecharup.html create mode 100644 function.imagecolorallocate.html create mode 100644 function.imagecolorat.html create mode 100644 function.imagecolorclosest.html create mode 100644 function.imagecolordeallocate.html create mode 100644 function.imagecolorexact.html create mode 100644 function.imagecolorresolve.html create mode 100644 function.imagecolorset.html create mode 100644 function.imagecolorsforindex.html create mode 100644 function.imagecolorstotal.html create mode 100644 function.imagecolortransparent.html create mode 100644 function.imagecopy.html create mode 100644 function.imagecopyresized.html create mode 100644 function.imagecreate.html create mode 100644 function.imagecreatefromgif.html create mode 100644 function.imagecreatefromjpeg.html create mode 100644 function.imagecreatefrompng.html create mode 100644 function.imagedashedline.html create mode 100644 function.imagedestroy.html create mode 100644 function.imagefill.html create mode 100644 function.imagefilledpolygon.html create mode 100644 function.imagefilledrectangle.html create mode 100644 function.imagefilltoborder.html create mode 100644 function.imagefontheight.html create mode 100644 function.imagefontwidth.html create mode 100644 function.imagegammacorrect.html create mode 100644 function.imagegif.html create mode 100644 function.imageinterlace.html create mode 100644 function.imagejpeg.html create mode 100644 function.imageline.html create mode 100644 function.imageloadfont.html create mode 100644 function.imagepng.html create mode 100644 function.imagepolygon.html create mode 100644 function.imagepsbbox.html create mode 100644 function.imagepsencodefont.html create mode 100644 function.imagepsextendfont.html create mode 100644 function.imagepsfreefont.html create mode 100644 function.imagepsloadfont.html create mode 100644 function.imagepsslantfont.html create mode 100644 function.imagepstext.html create mode 100644 function.imagerectangle.html create mode 100644 function.imagesetpixel.html create mode 100644 function.imagestring.html create mode 100644 function.imagestringup.html create mode 100644 function.imagesx.html create mode 100644 function.imagesy.html create mode 100644 function.imagettfbbox.html create mode 100644 function.imagettftext.html create mode 100644 function.imagetypes.html create mode 100644 function.imap-8bit.html create mode 100644 function.imap-alerts.html create mode 100644 function.imap-append.html create mode 100644 function.imap-base64.html create mode 100644 function.imap-binary.html create mode 100644 function.imap-body.html create mode 100644 function.imap-check.html create mode 100644 function.imap-clearflag-full.html create mode 100644 function.imap-close.html create mode 100644 function.imap-createmailbox.html create mode 100644 function.imap-delete.html create mode 100644 function.imap-deletemailbox.html create mode 100644 function.imap-errors.html create mode 100644 function.imap-expunge.html create mode 100644 function.imap-fetch-overview.html create mode 100644 function.imap-fetchbody.html create mode 100644 function.imap-fetchheader.html create mode 100644 function.imap-fetchstructure.html create mode 100644 function.imap-getmailboxes.html create mode 100644 function.imap-getsubscribed.html create mode 100644 function.imap-header.html create mode 100644 function.imap-headerinfo.html create mode 100644 function.imap-headers.html create mode 100644 function.imap-last-error.html create mode 100644 function.imap-listmailbox.html create mode 100644 function.imap-listsubscribed.html create mode 100644 function.imap-mail-compose.html create mode 100644 function.imap-mail-copy.html create mode 100644 function.imap-mail-move.html create mode 100644 function.imap-mail.html create mode 100644 function.imap-mailboxmsginfo.html create mode 100644 function.imap-mime-header-decode.html create mode 100644 function.imap-msgno.html create mode 100644 function.imap-num-msg.html create mode 100644 function.imap-num-recent.html create mode 100644 function.imap-open.html create mode 100644 function.imap-ping.html create mode 100644 function.imap-qprint.html create mode 100644 function.imap-renamemailbox.html create mode 100644 function.imap-reopen.html create mode 100644 function.imap-rfc822-parse-adrlist.html create mode 100644 function.imap-rfc822-parse-headers.html create mode 100644 function.imap-rfc822-write-address.html create mode 100644 function.imap-scanmailbox.html create mode 100644 function.imap-search.html create mode 100644 function.imap-setflag-full.html create mode 100644 function.imap-sort.html create mode 100644 function.imap-status.html create mode 100644 function.imap-subscribe.html create mode 100644 function.imap-uid.html create mode 100644 function.imap-undelete.html create mode 100644 function.imap-unsubscribe.html create mode 100644 function.imap-utf7-decode.html create mode 100644 function.imap-utf7-encode.html create mode 100644 function.imap-utf8.html create mode 100644 function.implode.html create mode 100644 function.in-array.html create mode 100644 function.include-once.html create mode 100644 function.include.html create mode 100644 function.ini-alter.html create mode 100644 function.ini-get.html create mode 100644 function.ini-restore.html create mode 100644 function.ini-set.html create mode 100644 function.intval.html create mode 100644 function.ip2long.html create mode 100644 function.iptcparse.html create mode 100644 function.is-array.html create mode 100644 function.is-bool.html create mode 100644 function.is-dir.html create mode 100644 function.is-double.html create mode 100644 function.is-executable.html create mode 100644 function.is-file.html create mode 100644 function.is-float.html create mode 100644 function.is-int.html create mode 100644 function.is-integer.html create mode 100644 function.is-link.html create mode 100644 function.is-long.html create mode 100644 function.is-numeric.html create mode 100644 function.is-object.html create mode 100644 function.is-readable.html create mode 100644 function.is-real.html create mode 100644 function.is-resource.html create mode 100644 function.is-string.html create mode 100644 function.is-subclass-of.html create mode 100644 function.is-uploaded-file.html create mode 100644 function.is-writeable.html create mode 100644 function.isset.html create mode 100644 function.jddayofweek.html create mode 100644 function.jdmonthname.html create mode 100644 function.jdtofrench.html create mode 100644 function.jdtogregorian.html create mode 100644 function.jdtojewish.html create mode 100644 function.jdtojulian.html create mode 100644 function.jdtounix.html create mode 100644 function.jewishtojd.html create mode 100644 function.join.html create mode 100644 function.juliantojd.html create mode 100644 function.key.html create mode 100644 function.krsort.html create mode 100644 function.ksort.html create mode 100644 function.lcg-value.html create mode 100644 function.ldap-add.html create mode 100644 function.ldap-bind.html create mode 100644 function.ldap-close.html create mode 100644 function.ldap-compare.html create mode 100644 function.ldap-connect.html create mode 100644 function.ldap-count-entries.html create mode 100644 function.ldap-delete.html create mode 100644 function.ldap-dn2ufn.html create mode 100644 function.ldap-err2str.html create mode 100644 function.ldap-errno.html create mode 100644 function.ldap-error.html create mode 100644 function.ldap-explode-dn.html create mode 100644 function.ldap-first-attribute.html create mode 100644 function.ldap-first-entry.html create mode 100644 function.ldap-free-result.html create mode 100644 function.ldap-get-attributes.html create mode 100644 function.ldap-get-dn.html create mode 100644 function.ldap-get-entries.html create mode 100644 function.ldap-get-values-len.html create mode 100644 function.ldap-get-values.html create mode 100644 function.ldap-list.html create mode 100644 function.ldap-mod-add.html create mode 100644 function.ldap-mod-del.html create mode 100644 function.ldap-mod-replace.html create mode 100644 function.ldap-modify.html create mode 100644 function.ldap-next-attribute.html create mode 100644 function.ldap-next-entry.html create mode 100644 function.ldap-read.html create mode 100644 function.ldap-search.html create mode 100644 function.ldap-unbind.html create mode 100644 function.leak.html create mode 100644 function.levenshtein.html create mode 100644 function.link.html create mode 100644 function.linkinfo.html create mode 100644 function.list.html create mode 100644 function.listen.html create mode 100644 function.localtime.html create mode 100644 function.log.html create mode 100644 function.log10.html create mode 100644 function.long2ip.html create mode 100644 function.lstat.html create mode 100644 function.ltrim.html create mode 100644 function.mail.html create mode 100644 function.max.html create mode 100644 function.mcal-append-event.html create mode 100644 function.mcal-close.html create mode 100644 function.mcal-create-calendar.html create mode 100644 function.mcal-date-compare.html create mode 100644 function.mcal-date-valid.html create mode 100644 function.mcal-day-of-week.html create mode 100644 function.mcal-day-of-year.html create mode 100644 function.mcal-days-in-month.html create mode 100644 function.mcal-delete-calendar.html create mode 100644 function.mcal-delete-event.html create mode 100644 function.mcal-event-add-attribute.html create mode 100644 function.mcal-event-init.html create mode 100644 function.mcal-event-set-alarm.html create mode 100644 function.mcal-event-set-category.html create mode 100644 function.mcal-event-set-class.html create mode 100644 function.mcal-event-set-description.html create mode 100644 function.mcal-event-set-end.html create mode 100644 function.mcal-event-set-recur-daily.html create mode 100644 function.mcal-event-set-recur-monthly-mday.html create mode 100644 function.mcal-event-set-recur-monthly-wday.html create mode 100644 function.mcal-event-set-recur-none.html create mode 100644 function.mcal-event-set-recur-weekly.html create mode 100644 function.mcal-event-set-recur-yearly.html create mode 100644 function.mcal-event-set-start.html create mode 100644 function.mcal-event-set-title.html create mode 100644 function.mcal-expunge.html create mode 100644 function.mcal-fetch-current-stream-event.html create mode 100644 function.mcal-fetch-event.html create mode 100644 function.mcal-is-leap-year.html create mode 100644 function.mcal-list-alarms.html create mode 100644 function.mcal-list-events.html create mode 100644 function.mcal-next-recurrence.html create mode 100644 function.mcal-open.html create mode 100644 function.mcal-popen.html create mode 100644 function.mcal-rename-calendar.html create mode 100644 function.mcal-reopen.html create mode 100644 function.mcal-snooze.html create mode 100644 function.mcal-store-event.html create mode 100644 function.mcal-time-valid.html create mode 100644 function.mcrypt-cbc.html create mode 100644 function.mcrypt-cfb.html create mode 100644 function.mcrypt-create-iv.html create mode 100644 function.mcrypt-decrypt.html create mode 100644 function.mcrypt-ecb.html create mode 100644 function.mcrypt-enc-get-algorithms-name.html create mode 100644 function.mcrypt-enc-get-block-size.html create mode 100644 function.mcrypt-enc-get-iv-size.html create mode 100644 function.mcrypt-enc-get-key-size.html create mode 100644 function.mcrypt-enc-get-modes-name.html create mode 100644 function.mcrypt-enc-get-supported-key-sizes.html create mode 100644 function.mcrypt-enc-is-block-algorithm-mode.html create mode 100644 function.mcrypt-enc-is-block-algorithm.html create mode 100644 function.mcrypt-enc-is-block-mode.html create mode 100644 function.mcrypt-enc-self-test.html create mode 100644 function.mcrypt-encrypt.html create mode 100644 function.mcrypt-generic-end.html create mode 100644 function.mcrypt-generic-init.html create mode 100644 function.mcrypt-generic.html create mode 100644 function.mcrypt-get-block-size.html create mode 100644 function.mcrypt-get-cipher-name.html create mode 100644 function.mcrypt-get-iv-size.html create mode 100644 function.mcrypt-get-key-size.html create mode 100644 function.mcrypt-list-algorithms.html create mode 100644 function.mcrypt-list-modes.html create mode 100644 function.mcrypt-module-get-algo-block-size.html create mode 100644 function.mcrypt-module-get-algo-key-size.html create mode 100644 function.mcrypt-module-get-algo-supported-key-sizes.html create mode 100644 function.mcrypt-module-is-block-algorithm-mode.html create mode 100644 function.mcrypt-module-is-block-algorithm.html create mode 100644 function.mcrypt-module-is-block-mode.html create mode 100644 function.mcrypt-module-open.html create mode 100644 function.mcrypt-module-self-test.html create mode 100644 function.mcrypt-ofb.html create mode 100644 function.md5.html create mode 100644 function.mdecrypt-generic.html create mode 100644 function.metaphone.html create mode 100644 function.method-exists.html create mode 100644 function.mhash-count.html create mode 100644 function.mhash-get-block-size.html create mode 100644 function.mhash-get-hash-name.html create mode 100644 function.mhash.html create mode 100644 function.microtime.html create mode 100644 function.min.html create mode 100644 function.mkdir.html create mode 100644 function.mktime.html create mode 100644 function.move-uploaded-file.html create mode 100644 function.msql-affected-rows.html create mode 100644 function.msql-close.html create mode 100644 function.msql-connect.html create mode 100644 function.msql-create-db.html create mode 100644 function.msql-createdb.html create mode 100644 function.msql-data-seek.html create mode 100644 function.msql-dbname.html create mode 100644 function.msql-drop-db.html create mode 100644 function.msql-dropdb.html create mode 100644 function.msql-error.html create mode 100644 function.msql-fetch-array.html create mode 100644 function.msql-fetch-field.html create mode 100644 function.msql-fetch-object.html create mode 100644 function.msql-fetch-row.html create mode 100644 function.msql-field-seek.html create mode 100644 function.msql-fieldflags.html create mode 100644 function.msql-fieldlen.html create mode 100644 function.msql-fieldname.html create mode 100644 function.msql-fieldtable.html create mode 100644 function.msql-fieldtype.html create mode 100644 function.msql-free-result.html create mode 100644 function.msql-freeresult.html create mode 100644 function.msql-list-dbs.html create mode 100644 function.msql-list-fields.html create mode 100644 function.msql-list-tables.html create mode 100644 function.msql-listdbs.html create mode 100644 function.msql-listfields.html create mode 100644 function.msql-listtables.html create mode 100644 function.msql-num-fields.html create mode 100644 function.msql-num-rows.html create mode 100644 function.msql-numfields.html create mode 100644 function.msql-numrows.html create mode 100644 function.msql-pconnect.html create mode 100644 function.msql-query.html create mode 100644 function.msql-regcase.html create mode 100644 function.msql-result.html create mode 100644 function.msql-select-db.html create mode 100644 function.msql-selectdb.html create mode 100644 function.msql-tablename.html create mode 100644 function.msql.html create mode 100644 function.mssql-affected-rows.html create mode 100644 function.mssql-close.html create mode 100644 function.mssql-connect.html create mode 100644 function.mssql-data-seek.html create mode 100644 function.mssql-fetch-array.html create mode 100644 function.mssql-fetch-field.html create mode 100644 function.mssql-fetch-object.html create mode 100644 function.mssql-fetch-row.html create mode 100644 function.mssql-field-length.html create mode 100644 function.mssql-field-name.html create mode 100644 function.mssql-field-seek.html create mode 100644 function.mssql-field-type.html create mode 100644 function.mssql-free-result.html create mode 100644 function.mssql-get-last-message.html create mode 100644 function.mssql-min-error-severity.html create mode 100644 function.mssql-min-message-severity.html create mode 100644 function.mssql-num-fields.html create mode 100644 function.mssql-num-rows.html create mode 100644 function.mssql-pconnect.html create mode 100644 function.mssql-query.html create mode 100644 function.mssql-result.html create mode 100644 function.mssql-select-db.html create mode 100644 function.mt-getrandmax.html create mode 100644 function.mt-rand.html create mode 100644 function.mt-srand.html create mode 100644 function.mysql-affected-rows.html create mode 100644 function.mysql-change-user.html create mode 100644 function.mysql-close.html create mode 100644 function.mysql-connect.html create mode 100644 function.mysql-create-db.html create mode 100644 function.mysql-data-seek.html create mode 100644 function.mysql-db-name.html create mode 100644 function.mysql-db-query.html create mode 100644 function.mysql-drop-db.html create mode 100644 function.mysql-errno.html create mode 100644 function.mysql-error.html create mode 100644 function.mysql-fetch-array.html create mode 100644 function.mysql-fetch-assoc.html create mode 100644 function.mysql-fetch-field.html create mode 100644 function.mysql-fetch-lengths.html create mode 100644 function.mysql-fetch-object.html create mode 100644 function.mysql-fetch-row.html create mode 100644 function.mysql-field-flags.html create mode 100644 function.mysql-field-len.html create mode 100644 function.mysql-field-name.html create mode 100644 function.mysql-field-seek.html create mode 100644 function.mysql-field-table.html create mode 100644 function.mysql-field-type.html create mode 100644 function.mysql-free-result.html create mode 100644 function.mysql-insert-id.html create mode 100644 function.mysql-list-dbs.html create mode 100644 function.mysql-list-fields.html create mode 100644 function.mysql-list-tables.html create mode 100644 function.mysql-num-fields.html create mode 100644 function.mysql-num-rows.html create mode 100644 function.mysql-pconnect.html create mode 100644 function.mysql-query.html create mode 100644 function.mysql-result.html create mode 100644 function.mysql-select-db.html create mode 100644 function.mysql-tablename.html create mode 100644 function.natcasesort.html create mode 100644 function.natsort.html create mode 100644 function.next.html create mode 100644 function.nl2br.html create mode 100644 function.number-format.html create mode 100644 function.ob-end-clean.html create mode 100644 function.ob-end-flush.html create mode 100644 function.ob-get-contents.html create mode 100644 function.ob-get-length.html create mode 100644 function.ob-implicit-flush.html create mode 100644 function.ob-start.html create mode 100644 function.ocibindbyname.html create mode 100644 function.ocicolumnisnull.html create mode 100644 function.ocicolumnname.html create mode 100644 function.ocicolumnsize.html create mode 100644 function.ocicolumntype.html create mode 100644 function.ocicommit.html create mode 100644 function.ocidefinebyname.html create mode 100644 function.ocierror.html create mode 100644 function.ociexecute.html create mode 100644 function.ocifetch.html create mode 100644 function.ocifetchinto.html create mode 100644 function.ocifetchstatement.html create mode 100644 function.ocifreecursor.html create mode 100644 function.ocifreedesc.html create mode 100644 function.ocifreestatement.html create mode 100644 function.ociinternaldebug.html create mode 100644 function.ocilogoff.html create mode 100644 function.ocilogon.html create mode 100644 function.ocinewcursor.html create mode 100644 function.ocinewdescriptor.html create mode 100644 function.ocinlogon.html create mode 100644 function.ocinumcols.html create mode 100644 function.ocinumrows.html create mode 100644 function.ociparse.html create mode 100644 function.ociplogon.html create mode 100644 function.ociresult.html create mode 100644 function.ocirollback.html create mode 100644 function.ocirowcount.html create mode 100644 function.ociserverversion.html create mode 100644 function.ocistatementtype.html create mode 100644 function.octdec.html create mode 100644 function.odbc-autocommit.html create mode 100644 function.odbc-binmode.html create mode 100644 function.odbc-close-all.html create mode 100644 function.odbc-close.html create mode 100644 function.odbc-columnprivileges.html create mode 100644 function.odbc-columns.html create mode 100644 function.odbc-commit.html create mode 100644 function.odbc-connect.html create mode 100644 function.odbc-cursor.html create mode 100644 function.odbc-do.html create mode 100644 function.odbc-exec.html create mode 100644 function.odbc-execute.html create mode 100644 function.odbc-fetch-into.html create mode 100644 function.odbc-fetch-row.html create mode 100644 function.odbc-field-len.html create mode 100644 function.odbc-field-name.html create mode 100644 function.odbc-field-num.html create mode 100644 function.odbc-field-precision.html create mode 100644 function.odbc-field-scale.html create mode 100644 function.odbc-field-type.html create mode 100644 function.odbc-foreignkeys.html create mode 100644 function.odbc-free-result.html create mode 100644 function.odbc-gettypeinfo.html create mode 100644 function.odbc-longreadlen.html create mode 100644 function.odbc-num-fields.html create mode 100644 function.odbc-num-rows.html create mode 100644 function.odbc-pconnect.html create mode 100644 function.odbc-prepare.html create mode 100644 function.odbc-primarykeys.html create mode 100644 function.odbc-procedurecolumns.html create mode 100644 function.odbc-procedures.html create mode 100644 function.odbc-result-all.html create mode 100644 function.odbc-result.html create mode 100644 function.odbc-rollback.html create mode 100644 function.odbc-setoption.html create mode 100644 function.odbc-specialcolumns.html create mode 100644 function.odbc-statistics.html create mode 100644 function.odbc-tableprivileges.html create mode 100644 function.odbc-tables.html create mode 100644 function.opendir.html create mode 100644 function.openlog.html create mode 100644 function.ora-bind.html create mode 100644 function.ora-close.html create mode 100644 function.ora-columnname.html create mode 100644 function.ora-columnsize.html create mode 100644 function.ora-columntype.html create mode 100644 function.ora-commit.html create mode 100644 function.ora-commitoff.html create mode 100644 function.ora-commiton.html create mode 100644 function.ora-do.html create mode 100644 function.ora-error.html create mode 100644 function.ora-errorcode.html create mode 100644 function.ora-exec.html create mode 100644 function.ora-fetch-into.html create mode 100644 function.ora-fetch.html create mode 100644 function.ora-getcolumn.html create mode 100644 function.ora-logoff.html create mode 100644 function.ora-logon.html create mode 100644 function.ora-numcols.html create mode 100644 function.ora-numrows.html create mode 100644 function.ora-open.html create mode 100644 function.ora-parse.html create mode 100644 function.ora-plogon.html create mode 100644 function.ora-rollback.html create mode 100644 function.ord.html create mode 100644 function.pack.html create mode 100644 function.parse-str.html create mode 100644 function.parse-url.html create mode 100644 function.passthru.html create mode 100644 function.pclose.html create mode 100644 function.pdf-add-annotation.html create mode 100644 function.pdf-add-outline.html create mode 100644 function.pdf-arc.html create mode 100644 function.pdf-begin-page.html create mode 100644 function.pdf-circle.html create mode 100644 function.pdf-clip.html create mode 100644 function.pdf-close-image.html create mode 100644 function.pdf-close.html create mode 100644 function.pdf-closepath-fill-stroke.html create mode 100644 function.pdf-closepath-stroke.html create mode 100644 function.pdf-closepath.html create mode 100644 function.pdf-continue-text.html create mode 100644 function.pdf-curveto.html create mode 100644 function.pdf-end-page.html create mode 100644 function.pdf-endpath.html create mode 100644 function.pdf-execute-image.html create mode 100644 function.pdf-fill-stroke.html create mode 100644 function.pdf-fill.html create mode 100644 function.pdf-get-image-height.html create mode 100644 function.pdf-get-image-width.html create mode 100644 function.pdf-get-info.html create mode 100644 function.pdf-get-parameter.html create mode 100644 function.pdf-get-value.html create mode 100644 function.pdf-lineto.html create mode 100644 function.pdf-moveto.html create mode 100644 function.pdf-open-gif.html create mode 100644 function.pdf-open-image-file.html create mode 100644 function.pdf-open-jpeg.html create mode 100644 function.pdf-open-memory-image.html create mode 100644 function.pdf-open-png.html create mode 100644 function.pdf-open-tiff.html create mode 100644 function.pdf-open.html create mode 100644 function.pdf-place-image.html create mode 100644 function.pdf-put-image.html create mode 100644 function.pdf-rect.html create mode 100644 function.pdf-restore.html create mode 100644 function.pdf-rotate.html create mode 100644 function.pdf-save.html create mode 100644 function.pdf-scale.html create mode 100644 function.pdf-set-border-color.html create mode 100644 function.pdf-set-border-dash.html create mode 100644 function.pdf-set-border-style.html create mode 100644 function.pdf-set-char-spacing.html create mode 100644 function.pdf-set-duration.html create mode 100644 function.pdf-set-font.html create mode 100644 function.pdf-set-horiz-scaling.html create mode 100644 function.pdf-set-info-author.html create mode 100644 function.pdf-set-info-creator.html create mode 100644 function.pdf-set-info-keywords.html create mode 100644 function.pdf-set-info-subject.html create mode 100644 function.pdf-set-info-title.html create mode 100644 function.pdf-set-info.html create mode 100644 function.pdf-set-leading.html create mode 100644 function.pdf-set-parameter.html create mode 100644 function.pdf-set-text-matrix.html create mode 100644 function.pdf-set-text-pos.html create mode 100644 function.pdf-set-text-rendering.html create mode 100644 function.pdf-set-text-rise.html create mode 100644 function.pdf-set-transition.html create mode 100644 function.pdf-set-value.html create mode 100644 function.pdf-set-word-spacing.html create mode 100644 function.pdf-setdash.html create mode 100644 function.pdf-setflat.html create mode 100644 function.pdf-setgray-fill.html create mode 100644 function.pdf-setgray-stroke.html create mode 100644 function.pdf-setgray.html create mode 100644 function.pdf-setlinecap.html create mode 100644 function.pdf-setlinejoin.html create mode 100644 function.pdf-setlinewidth.html create mode 100644 function.pdf-setmiterlimit.html create mode 100644 function.pdf-setrgbcolor-fill.html create mode 100644 function.pdf-setrgbcolor-stroke.html create mode 100644 function.pdf-setrgbcolor.html create mode 100644 function.pdf-show-boxed.html create mode 100644 function.pdf-show-xy.html create mode 100644 function.pdf-show.html create mode 100644 function.pdf-skew.html create mode 100644 function.pdf-stringwidth.html create mode 100644 function.pdf-stroke.html create mode 100644 function.pdf-translate.html create mode 100644 function.pfpro-cleanup.html create mode 100644 function.pfpro-init.html create mode 100644 function.pfpro-process-raw.html create mode 100644 function.pfpro-process.html create mode 100644 function.pfpro-version.html create mode 100644 function.pfsockopen.html create mode 100644 function.pg-client-encoding.html create mode 100644 function.pg-clientencoding.html create mode 100644 function.pg-close.html create mode 100644 function.pg-cmdtuples.html create mode 100644 function.pg-connect.html create mode 100644 function.pg-dbname.html create mode 100644 function.pg-end-copy.html create mode 100644 function.pg-errormessage.html create mode 100644 function.pg-exec.html create mode 100644 function.pg-fetch-array.html create mode 100644 function.pg-fetch-object.html create mode 100644 function.pg-fetch-row.html create mode 100644 function.pg-fieldisnull.html create mode 100644 function.pg-fieldname.html create mode 100644 function.pg-fieldnum.html create mode 100644 function.pg-fieldprtlen.html create mode 100644 function.pg-fieldsize.html create mode 100644 function.pg-fieldtype.html create mode 100644 function.pg-freeresult.html create mode 100644 function.pg-getlastoid.html create mode 100644 function.pg-host.html create mode 100644 function.pg-loclose.html create mode 100644 function.pg-locreate.html create mode 100644 function.pg-loexport.html create mode 100644 function.pg-loimport.html create mode 100644 function.pg-loopen.html create mode 100644 function.pg-loread.html create mode 100644 function.pg-loreadall.html create mode 100644 function.pg-lounlink.html create mode 100644 function.pg-lowrite.html create mode 100644 function.pg-numfields.html create mode 100644 function.pg-numrows.html create mode 100644 function.pg-options.html create mode 100644 function.pg-pconnect.html create mode 100644 function.pg-port.html create mode 100644 function.pg-put-line.html create mode 100644 function.pg-result.html create mode 100644 function.pg-set-client-encoding.html create mode 100644 function.pg-setclientencoding.html create mode 100644 function.pg-trace.html create mode 100644 function.pg-tty.html create mode 100644 function.pg-untrace.html create mode 100644 function.php-logo-guid.html create mode 100644 function.php-sapi-name.html create mode 100644 function.php-uname.html create mode 100644 function.phpcredits.html create mode 100644 function.phpinfo.html create mode 100644 function.phpversion.html create mode 100644 function.pi.html create mode 100644 function.popen.html create mode 100644 function.pos.html create mode 100644 function.posix-ctermid.html create mode 100644 function.posix-getcwd.html create mode 100644 function.posix-getegid.html create mode 100644 function.posix-geteuid.html create mode 100644 function.posix-getgid.html create mode 100644 function.posix-getgrgid.html create mode 100644 function.posix-getgrnam.html create mode 100644 function.posix-getgroups.html create mode 100644 function.posix-getlogin.html create mode 100644 function.posix-getpgid.html create mode 100644 function.posix-getpgrp.html create mode 100644 function.posix-getpid.html create mode 100644 function.posix-getppid.html create mode 100644 function.posix-getpwnam.html create mode 100644 function.posix-getpwuid.html create mode 100644 function.posix-getrlimit.html create mode 100644 function.posix-getsid.html create mode 100644 function.posix-getuid.html create mode 100644 function.posix-isatty.html create mode 100644 function.posix-kill.html create mode 100644 function.posix-mkfifo.html create mode 100644 function.posix-setgid.html create mode 100644 function.posix-setpgid.html create mode 100644 function.posix-setsid.html create mode 100644 function.posix-setuid.html create mode 100644 function.posix-times.html create mode 100644 function.posix-ttyname.html create mode 100644 function.posix-uname.html create mode 100644 function.pow.html create mode 100644 function.preg-grep.html create mode 100644 function.preg-match-all.html create mode 100644 function.preg-match.html create mode 100644 function.preg-quote.html create mode 100644 function.preg-replace.html create mode 100644 function.preg-split.html create mode 100644 function.prev.html create mode 100644 function.print-r.html create mode 100644 function.print.html create mode 100644 function.printf.html create mode 100644 function.pspell-add-to-personal.html create mode 100644 function.pspell-add-to-session.html create mode 100644 function.pspell-check.html create mode 100644 function.pspell-clear-session.html create mode 100644 function.pspell-config-create.html create mode 100644 function.pspell-config-ignore.html create mode 100644 function.pspell-config-mode.html create mode 100644 function.pspell-config-personal.html create mode 100644 function.pspell-config-repl.html create mode 100644 function.pspell-config-runtogether.html create mode 100644 function.pspell-config-save-repl.html create mode 100644 function.pspell-new-config.html create mode 100644 function.pspell-new-personal.html create mode 100644 function.pspell-new.html create mode 100644 function.pspell-save-wordlist.html create mode 100644 function.pspell-store-replacement.html create mode 100644 function.pspell-suggest.html create mode 100644 function.putenv.html create mode 100644 function.quoted-printable-decode.html create mode 100644 function.quotemeta.html create mode 100644 function.rad2deg.html create mode 100644 function.rand.html create mode 100644 function.range.html create mode 100644 function.rawurldecode.html create mode 100644 function.rawurlencode.html create mode 100644 function.read-exif-data.html create mode 100644 function.readdir.html create mode 100644 function.readfile.html create mode 100644 function.readgzfile.html create mode 100644 function.readline-add-history.html create mode 100644 function.readline-clear-history.html create mode 100644 function.readline-completion-function.html create mode 100644 function.readline-info.html create mode 100644 function.readline-list-history.html create mode 100644 function.readline-read-history.html create mode 100644 function.readline-write-history.html create mode 100644 function.readline.html create mode 100644 function.readlink.html create mode 100644 function.realpath.html create mode 100644 function.recode-file.html create mode 100644 function.recode-string.html create mode 100644 function.recode.html create mode 100644 function.register-shutdown-function.html create mode 100644 function.rename.html create mode 100644 function.require-once.html create mode 100644 function.require.html create mode 100644 function.reset.html create mode 100644 function.restore-error-handler.html create mode 100644 function.rewind.html create mode 100644 function.rewinddir.html create mode 100644 function.rmdir.html create mode 100644 function.round.html create mode 100644 function.rsort.html create mode 100644 function.rtrim.html create mode 100644 function.satellite_caught_exception.html create mode 100644 function.satellite_exception_id.html create mode 100644 function.satellite_exception_value.html create mode 100644 function.sem-acquire.html create mode 100644 function.sem-get.html create mode 100644 function.sem-release.html create mode 100644 function.serialize.html create mode 100644 function.session-cache-limiter.html create mode 100644 function.session-decode.html create mode 100644 function.session-destroy.html create mode 100644 function.session-encode.html create mode 100644 function.session-get-cookie-params.html create mode 100644 function.session-id.html create mode 100644 function.session-is-registered.html create mode 100644 function.session-module-name.html create mode 100644 function.session-name.html create mode 100644 function.session-register.html create mode 100644 function.session-save-path.html create mode 100644 function.session-set-cookie-params.html create mode 100644 function.session-set-save-handler.html create mode 100644 function.session-start.html create mode 100644 function.session-unregister.html create mode 100644 function.session-unset.html create mode 100644 function.set-error-handler.html create mode 100644 function.set-file-buffer.html create mode 100644 function.set-magic-quotes-runtime.html create mode 100644 function.set-socket-blocking.html create mode 100644 function.set-time-limit.html create mode 100644 function.setcookie.html create mode 100644 function.setlocale.html create mode 100644 function.settype.html create mode 100644 function.shm-attach.html create mode 100644 function.shm-detach.html create mode 100644 function.shm-get-var.html create mode 100644 function.shm-put-var.html create mode 100644 function.shm-remove-var.html create mode 100644 function.shm-remove.html create mode 100644 function.shm_close.html create mode 100644 function.shm_delete.html create mode 100644 function.shm_open.html create mode 100644 function.shm_read.html create mode 100644 function.shm_write.html create mode 100644 function.show-source.html create mode 100644 function.shuffle.html create mode 100644 function.similar-text.html create mode 100644 function.sin.html create mode 100644 function.size.html create mode 100644 function.sizeof.html create mode 100644 function.sleep.html create mode 100644 function.snmp-get-quick-print.html create mode 100644 function.snmp-set-quick-print.html create mode 100644 function.snmpget.html create mode 100644 function.snmpset.html create mode 100644 function.snmpwalk.html create mode 100644 function.snmpwalkoid.html create mode 100644 function.socket-get-status.html create mode 100644 function.socket-set-timeout.html create mode 100644 function.socket.html create mode 100644 function.solid-close.html create mode 100644 function.solid-connect.html create mode 100644 function.solid-exec.html create mode 100644 function.solid-fetchrow.html create mode 100644 function.solid-fieldname.html create mode 100644 function.solid-fieldnum.html create mode 100644 function.solid-freeresult.html create mode 100644 function.solid-numfields.html create mode 100644 function.solid-numrows.html create mode 100644 function.solid-result.html create mode 100644 function.sort.html create mode 100644 function.soundex.html create mode 100644 function.split.html create mode 100644 function.spliti.html create mode 100644 function.sprintf.html create mode 100644 function.sql-regcase.html create mode 100644 function.sqrt.html create mode 100644 function.srand.html create mode 100644 function.sscanf.html create mode 100644 function.stat.html create mode 100644 function.str-pad.html create mode 100644 function.str-repeat.html create mode 100644 function.str-replace.html create mode 100644 function.strcasecmp.html create mode 100644 function.strchr.html create mode 100644 function.strcmp.html create mode 100644 function.strcspn.html create mode 100644 function.strerror.html create mode 100644 function.strftime.html create mode 100644 function.strip-tags.html create mode 100644 function.stripcslashes.html create mode 100644 function.stripslashes.html create mode 100644 function.stristr.html create mode 100644 function.strlen.html create mode 100644 function.strnatcasecmp.html create mode 100644 function.strnatcmp.html create mode 100644 function.strncmp.html create mode 100644 function.strpos.html create mode 100644 function.strrchr.html create mode 100644 function.strrev.html create mode 100644 function.strrpos.html create mode 100644 function.strspn.html create mode 100644 function.strstr.html create mode 100644 function.strtok.html create mode 100644 function.strtolower.html create mode 100644 function.strtotime.html create mode 100644 function.strtoupper.html create mode 100644 function.strtr.html create mode 100644 function.strval.html create mode 100644 function.substr-count.html create mode 100644 function.substr-replace.html create mode 100644 function.substr.html create mode 100644 function.swf-actiongeturl.html create mode 100644 function.swf-actiongotoframe.html create mode 100644 function.swf-actiongotolabel.html create mode 100644 function.swf-actionnextframe.html create mode 100644 function.swf-actionplay.html create mode 100644 function.swf-actionprevframe.html create mode 100644 function.swf-actionsettarget.html create mode 100644 function.swf-actionstop.html create mode 100644 function.swf-actiontogglequality.html create mode 100644 function.swf-actionwaitforframe.html create mode 100644 function.swf-addbuttonrecord.html create mode 100644 function.swf-addcolor.html create mode 100644 function.swf-closefile.html create mode 100644 function.swf-definebitmap.html create mode 100644 function.swf-definefont.html create mode 100644 function.swf-defineline.html create mode 100644 function.swf-definepoly.html create mode 100644 function.swf-definerect.html create mode 100644 function.swf-definetext.html create mode 100644 function.swf-endbutton.html create mode 100644 function.swf-enddoaction.html create mode 100644 function.swf-endshape.html create mode 100644 function.swf-endsymbol.html create mode 100644 function.swf-fontsize.html create mode 100644 function.swf-fontslant.html create mode 100644 function.swf-fonttracking.html create mode 100644 function.swf-getbitmapinfo.html create mode 100644 function.swf-getfontinfo.html create mode 100644 function.swf-getframe.html create mode 100644 function.swf-labelframe.html create mode 100644 function.swf-lookat.html create mode 100644 function.swf-modifyobject.html create mode 100644 function.swf-mulcolor.html create mode 100644 function.swf-nextid.html create mode 100644 function.swf-oncondition.html create mode 100644 function.swf-openfile.html create mode 100644 function.swf-ortho.html create mode 100644 function.swf-ortho2.html create mode 100644 function.swf-perspective.html create mode 100644 function.swf-placeobject.html create mode 100644 function.swf-polarview.html create mode 100644 function.swf-popmatrix.html create mode 100644 function.swf-posround.html create mode 100644 function.swf-pushmatrix.html create mode 100644 function.swf-removeobject.html create mode 100644 function.swf-rotate.html create mode 100644 function.swf-scale.html create mode 100644 function.swf-setfont.html create mode 100644 function.swf-setframe.html create mode 100644 function.swf-shapearc.html create mode 100644 function.swf-shapecurveto.html create mode 100644 function.swf-shapecurveto3.html create mode 100644 function.swf-shapefillbitmapclip.html create mode 100644 function.swf-shapefillbitmaptile.html create mode 100644 function.swf-shapefilloff.html create mode 100644 function.swf-shapefillsolid.html create mode 100644 function.swf-shapelinesold.html create mode 100644 function.swf-shapelineto.html create mode 100644 function.swf-shapemoveto.html create mode 100644 function.swf-showframe.html create mode 100644 function.swf-startbutton.html create mode 100644 function.swf-startdoaction.html create mode 100644 function.swf-startshape.html create mode 100644 function.swf-startsymbol.html create mode 100644 function.swf-textwidth.html create mode 100644 function.swf-translate.html create mode 100644 function.swf-viewport.html create mode 100644 function.sybase-affected-rows.html create mode 100644 function.sybase-close.html create mode 100644 function.sybase-connect.html create mode 100644 function.sybase-data-seek.html create mode 100644 function.sybase-fetch-array.html create mode 100644 function.sybase-fetch-field.html create mode 100644 function.sybase-fetch-object.html create mode 100644 function.sybase-fetch-row.html create mode 100644 function.sybase-field-seek.html create mode 100644 function.sybase-free-result.html create mode 100644 function.sybase-num-fields.html create mode 100644 function.sybase-num-rows.html create mode 100644 function.sybase-pconnect.html create mode 100644 function.sybase-query.html create mode 100644 function.sybase-result.html create mode 100644 function.sybase-select-db.html create mode 100644 function.symlink.html create mode 100644 function.syslog.html create mode 100644 function.system.html create mode 100644 function.tan.html create mode 100644 function.tempnam.html create mode 100644 function.textdomain.html create mode 100644 function.time.html create mode 100644 function.tmpfile.html create mode 100644 function.touch.html create mode 100644 function.trigger-error.html create mode 100644 function.trim.html create mode 100644 function.uasort.html create mode 100644 function.ucfirst.html create mode 100644 function.ucwords.html create mode 100644 function.uksort.html create mode 100644 function.umask.html create mode 100644 function.uniqid.html create mode 100644 function.unixtojd.html create mode 100644 function.unlink.html create mode 100644 function.unpack.html create mode 100644 function.unserialize.html create mode 100644 function.unset.html create mode 100644 function.urldecode.html create mode 100644 function.urlencode.html create mode 100644 function.user-error.html create mode 100644 function.usleep.html create mode 100644 function.usort.html create mode 100644 function.utf8-decode.html create mode 100644 function.utf8-encode.html create mode 100644 function.var-dump.html create mode 100644 function.virtual.html create mode 100644 function.vm-addalias.html create mode 100644 function.vm-adduser.html create mode 100644 function.vm-delalias.html create mode 100644 function.vm-deluser.html create mode 100644 function.vm-passwd.html create mode 100644 function.wddx-add-vars.html create mode 100644 function.wddx-deserialize.html create mode 100644 function.wddx-packet-end.html create mode 100644 function.wddx-packet-start.html create mode 100644 function.wddx-serialize-value.html create mode 100644 function.wddx-serialize-vars.html create mode 100644 function.wordwrap.html create mode 100644 function.xml-error-string.html create mode 100644 function.xml-get-current-byte-index.html create mode 100644 function.xml-get-current-column-number.html create mode 100644 function.xml-get-current-line-number.html create mode 100644 function.xml-get-error-code.html create mode 100644 function.xml-parse-into-struct.html create mode 100644 function.xml-parse.html create mode 100644 function.xml-parser-create.html create mode 100644 function.xml-parser-free.html create mode 100644 function.xml-parser-get-option.html create mode 100644 function.xml-parser-set-option.html create mode 100644 function.xml-set-character-data-handler.html create mode 100644 function.xml-set-default-handler.html create mode 100644 function.xml-set-element-handler.html create mode 100644 function.xml-set-external-entity-ref-handler.html create mode 100644 function.xml-set-notation-decl-handler.html create mode 100644 function.xml-set-object.html create mode 100644 function.xml-set-processing-instruction-handler.html create mode 100644 function.xml-set-unparsed-entity-decl-handler.html create mode 100644 function.xmldoc.html create mode 100644 function.xmldocfile.html create mode 100644 function.xmltree.html create mode 100644 function.yaz-addinfo.html create mode 100644 function.yaz-close.html create mode 100644 function.yaz-connect.html create mode 100644 function.yaz-errno.html create mode 100644 function.yaz-error.html create mode 100644 function.yaz-hits.html create mode 100644 function.yaz-range.html create mode 100644 function.yaz-record.html create mode 100644 function.yaz-search.html create mode 100644 function.yaz-syntax.html create mode 100644 function.yaz-wait.html create mode 100644 function.yp-err-string.html create mode 100644 function.yp-errno.html create mode 100644 function.yp-first.html create mode 100644 function.yp-get-default-domain.html create mode 100644 function.yp-master.html create mode 100644 function.yp-match.html create mode 100644 function.yp-next.html create mode 100644 function.yp-order.html create mode 100644 function.zend-logo-guid.html create mode 100644 functions.arguments.html create mode 100644 functions.html create mode 100644 functions.old-syntax.html create mode 100644 functions.returning-values.html create mode 100644 functions.variable-functions.html create mode 100644 getting-started.html create mode 100644 index.html create mode 100644 install-problems.html create mode 100644 install-security.html create mode 100644 install-unix.html create mode 100644 install-windows95-nt.html create mode 100644 install.configure.html create mode 100644 install.unix.html create mode 100644 installation.html create mode 100644 intro-history.html create mode 100644 intro-whatcando.html create mode 100644 introduction.html create mode 100644 keyword.class.html create mode 100644 keyword.function.html create mode 100644 keyword.function.return.html create mode 100644 keyword.old-function.html create mode 100644 lang-syntax.html create mode 100644 langref.html create mode 100644 language.basic-syntax.comments.html create mode 100644 language.basic-syntax.html create mode 100644 language.basic-syntax.instruction-separation.html create mode 100644 language.constants.html create mode 100644 language.expressions.html create mode 100644 language.oop.html create mode 100644 language.operators.assignment.html create mode 100644 language.operators.bitwise.html create mode 100644 language.operators.comparison.html create mode 100644 language.operators.errorcontrol.html create mode 100644 language.operators.execution.html create mode 100644 language.operators.html create mode 100644 language.operators.increment.html create mode 100644 language.operators.logical.html create mode 100644 language.operators.precedence.html create mode 100644 language.operators.string.html create mode 100644 language.references.arent.html create mode 100644 language.references.html create mode 100644 language.references.return.html create mode 100644 language.references.spot.html create mode 100644 language.references.unset.html create mode 100644 language.references.whatdo.html create mode 100644 language.types.array.html create mode 100644 language.types.double.html create mode 100644 language.types.html create mode 100644 language.types.object.html create mode 100644 language.types.string.html create mode 100644 language.types.type-juggling.html create mode 100644 language.variables.external.html create mode 100644 language.variables.html create mode 100644 language.variables.predefined.html create mode 100644 language.variables.scope.html create mode 100644 language.variables.variable.html create mode 100644 ln39.html create mode 100644 manual.html create mode 100644 manual.php3 create mode 100644 migration-booleval.html create mode 100644 migration-errors.html create mode 100644 migration-expr.html create mode 100644 migration-if-endif.html create mode 100644 migration-other.html create mode 100644 migration-startendtags.html create mode 100644 migration-truefalse.html create mode 100644 migration-while.html create mode 100644 migration.html create mode 100644 oop.html create mode 100644 operators.html create mode 100644 pattern.options.html create mode 100644 pcre.pattern.modifiers.html create mode 100644 pcre.pattern.options.html create mode 100644 pcre.pattern.syntax.html create mode 100644 phpdevel-errors.html create mode 100644 phpdevel-hhgtpi.html create mode 100644 phpdevel.html create mode 100644 preface.html create mode 100644 r5601.html create mode 100644 r5607.html create mode 100644 r5686.html create mode 100644 r5819.html create mode 100644 r6529.html create mode 100644 r6628.html create mode 100644 r6669.html create mode 100644 r6691.html create mode 100644 r6720.html create mode 100644 r6749.html create mode 100644 r6778.html create mode 100644 r6799.html create mode 100644 r6834.html create mode 100644 r6855.html create mode 100644 r6891.html create mode 100644 r6927.html create mode 100644 r6948.html create mode 100644 r6982.html create mode 100644 ref.adabas.html create mode 100644 ref.apache.html create mode 100644 ref.array.html create mode 100644 ref.aspell.html create mode 100644 ref.bc.html create mode 100644 ref.calendar.html create mode 100644 ref.ccvs.html create mode 100644 ref.classobj.html create mode 100644 ref.com.html create mode 100644 ref.cpdf.html create mode 100644 ref.curl.html create mode 100644 ref.cybercash.html create mode 100644 ref.datetime.html create mode 100644 ref.dba.html create mode 100644 ref.dbase.html create mode 100644 ref.dbm.html create mode 100644 ref.dir.html create mode 100644 ref.dl.html create mode 100644 ref.domxml.html create mode 100644 ref.errorfunc.html create mode 100644 ref.exec.html create mode 100644 ref.fdf.html create mode 100644 ref.filepro.html create mode 100644 ref.filesystem.html create mode 100644 ref.ftp.html create mode 100644 ref.funchand.html create mode 100644 ref.gettext.html create mode 100644 ref.http.html create mode 100644 ref.hyperwave.html create mode 100644 ref.ibase.html create mode 100644 ref.icap.html create mode 100644 ref.ifx.html create mode 100644 ref.image.html create mode 100644 ref.imap.html create mode 100644 ref.info.html create mode 100644 ref.ldap.html create mode 100644 ref.mail.html create mode 100644 ref.math.html create mode 100644 ref.mcal.html create mode 100644 ref.mcrypt.html create mode 100644 ref.mhash.html create mode 100644 ref.misc.html create mode 100644 ref.msql.html create mode 100644 ref.mssql.html create mode 100644 ref.mysql.html create mode 100644 ref.network.html create mode 100644 ref.nis.html create mode 100644 ref.oci8.html create mode 100644 ref.odbc.html create mode 100644 ref.oracle.html create mode 100644 ref.outcontrol.html create mode 100644 ref.pcre.html create mode 100644 ref.pdf.html create mode 100644 ref.pfpro.html create mode 100644 ref.pgsql.html create mode 100644 ref.posix.html create mode 100644 ref.pspell.html create mode 100644 ref.readline.html create mode 100644 ref.recode.html create mode 100644 ref.regex.html create mode 100644 ref.satellite.html create mode 100644 ref.sem.html create mode 100644 ref.session.html create mode 100644 ref.shmop.html create mode 100644 ref.snmp.html create mode 100644 ref.sockets.html create mode 100644 ref.solid.html create mode 100644 ref.strings.html create mode 100644 ref.swf.html create mode 100644 ref.sybase.html create mode 100644 ref.url.html create mode 100644 ref.var.html create mode 100644 ref.vmailmgr.html create mode 100644 ref.wddx.html create mode 100644 ref.xml.html create mode 100644 ref.yaz.html create mode 100644 ref.zlib.html create mode 100644 security.apache.html create mode 100644 security.html create mode 100644 types.html create mode 100644 variables.html create mode 100644 x2176.html diff --git a/README b/README new file mode 100644 index 0000000..296966d --- /dev/null +++ b/README @@ -0,0 +1,5 @@ +As of June 18, 1999, the documentation is now kept in the 'phpdoc' +repository on the CVS server. This directory will be populated with the +HTML version of the documentation for releases. + +Jim Winstead diff --git a/appendixes.html b/appendixes.html new file mode 100644 index 0000000..cbd2116 --- /dev/null +++ b/appendixes.html @@ -0,0 +1,158 @@ +Appendixes
PHP Manual
PrevNext

V. Appendixes

Table of Contents
A. Migrating from PHP/FI 2.0 to PHP 3.0
B. PHP development
C. The PHP Debugger

PrevHomeNext
gzuncompress Migrating from PHP/FI 2.0 to PHP 3.0
\ No newline at end of file diff --git a/calling-user-functions.html b/calling-user-functions.html new file mode 100644 index 0000000..98ecdba --- /dev/null +++ b/calling-user-functions.html @@ -0,0 +1,262 @@ +Calling User Functions
PHP Manual
PrevAppendix B. PHP developmentNext

Calling User Functions

To call user functions from an internal function, you should use + the call_user_function() function. +

call_user_function() returns SUCCESS on success, + and FAILURE in case the function cannot be found. You should check + that return value! If it returns SUCCESS, you are responsible for + destroying the retval pval yourself (or return it as the return value + of your function). If it returns FAILURE, the value of retval is + undefined, and you mustn't touch it. +

All internal functions that call user functions + must be reentrant. Among other things, this + means they must not use globals or static variables. +

call_user_function() takes six arguments: +

HashTable *function_table

This is the hash table in which the function is to be looked up. +

pval *object

This is a pointer to an object on which the function is invoked. + This should be NULL if a global function is called. If it's not + NULL (i.e. it points to an object), the function_table argument is + ignored, and instead taken from the object's hash. The object *may* + be modified by the function that is invoked on it (that function + will have access to it via $this). If for some reason you don't + want that to happen, send a copy of the object instead. +

pval *function_name

The name of the function to call. Must be a pval of type + IS_STRING with function_name.str.val and function_name.str.len + set to the appropriate values. The function_name is modified by + call_user_function() - it's converted to lowercase. If you need to + preserve the case, send a copy of the function name instead. +

pval *retval

A pointer to a pval structure, into which the return value of + the invoked function is saved. The structure must be previously + allocated - call_user_function() does NOT allocate + it by itself. +

int param_count

The number of parameters being passed to the function. +

pval *params[]

An array of pointers to values that will be passed as arguments to the + function, the first argument being in offset 0, the second in offset + 1, etc. The array is an array of pointers to pval's; The pointers + are sent as-is to the function, which means if the function modifies + its arguments, the original values are changed (passing by reference). + If you don't want that behavior, pass a copy instead. +


PrevHomeNext
PHP developmentUpReporting Errors
\ No newline at end of file diff --git a/class.dir.html b/class.dir.html new file mode 100644 index 0000000..489d8de --- /dev/null +++ b/class.dir.html @@ -0,0 +1,246 @@ +dir
PHP Manual
PrevNext

dir

(PHP3 , PHP4 )

dir -- directory class

Description

new dir (string directory)

A pseudo-object oriented mechanism for reading a directory. The + given directory is opened. Two properties + are available once directory has been opened. The handle + property can be used with other directory functions such as + readdir(), rewinddir() and + closedir(). The path property is set to path + the directory that was opened. Three methods are available: + read, rewind and close. +

Example 1. Dir() Example


$d = dir("/etc");
+echo "Handle: ".$d->handle."<br>\n";
+echo "Path: ".$d->path."<br>\n";
+while($entry=$d->read()) {
+    echo $entry."<br>\n";
+}
+$d->close();
+      
+


PrevHomeNext
chdirUpclosedir
\ No newline at end of file diff --git a/class.orbitenum.html b/class.orbitenum.html new file mode 100644 index 0000000..54b5581 --- /dev/null +++ b/class.orbitenum.html @@ -0,0 +1,268 @@ +OrbitEnum
PHP Manual
PrevNext

OrbitEnum

(unknown)

OrbitEnum -- Use CORBA enums

Description

new OrbitEnum (string id)

This class represents the enumeration identified with the + id parameter. The + id can be either the name of the + enumeration (e.g "MyEnum"), or the full repository id + (e.g. "IDL:MyEnum:1.0"). +

Example 1. Sample IDL file


enum MyEnum {
+    a,b,c,d,e
+};
+      
+

Example 2. PHP code for accessing MyEnum


<?php
+$enum = new OrbitEnum ("MyEnum");
+
+echo $enum->a;	/* write 0 */
+echo $enum->c;	/* write 2 */
+echo $enum->e;	/* write 4 */
+?>
+      
+


PrevHomeNext
OrbitObjectUpOrbitStruct
\ No newline at end of file diff --git a/class.orbitobject.html b/class.orbitobject.html new file mode 100644 index 0000000..783e2c6 --- /dev/null +++ b/class.orbitobject.html @@ -0,0 +1,269 @@ +OrbitObject
PHP Manual
PrevNext

OrbitObject

(unknown)

OrbitObject -- Access CORBA objects

Description

new OrbitObject (string ior)

This class provides access to a CORBA object. The + ior parameter should be a string + containing the IOR (Interoperable Object Reference) that + identifies the remote object. +

Example 1. Sample IDL file


interface MyInterface {
+    void SetInfo (string info);
+    string GetInfo();
+
+    attribute int value;
+}
+      
+

Example 2. PHP code for accessing MyInterface


<?php
+$obj = new OrbitObject ($ior);
+
+$obj->SetInfo ("A 2GooD object");
+
+echo $obj->GetInfo();
+
+$obj->value = 42;
+
+echo $obj->value;
+?>
+      
+


PrevHomeNext
Satellite CORBA client extensionUpOrbitEnum
\ No newline at end of file diff --git a/class.orbitstruct.html b/class.orbitstruct.html new file mode 100644 index 0000000..c4e5a91 --- /dev/null +++ b/class.orbitstruct.html @@ -0,0 +1,281 @@ +OrbitStruct
PHP Manual
PrevNext

OrbitStruct

(unknown)

OrbitStruct -- Use CORBA structs

Description

new OrbitStruct (string id)

This class represents the structure identified with the + id parameter. The + id can be either the name of the struct + (e.g "MyStruct"), or the full repository id + (e.g. "IDL:MyStruct:1.0"). +

Example 1. Sample IDL file


struct MyStruct {
+    short shortvalue;
+    string stringvalue;
+};
+
+interface SomeInterface {
+  void SetValues (MyStruct values);
+  MyStruct GetValues();
+}
+      
+

Example 2. PHP code for accessing MyStruct


<?php
+$obj = new OrbitObject ($ior);
+
+$initial_values = new OrbitStruct ("IDL:MyStruct:1.0");
+$initial_values->shortvalue = 42;
+$initial_values->stringvalue = "HGTTG";
+
+$obj->SetValues ($initial_values);
+
+$values = $obj->GetValues();
+
+echo $values->shortvalue;
+echo $values->stringvalue;
+?>
+      
+


PrevHomeNext
OrbitEnumUpsatellite_caught_exception
\ No newline at end of file diff --git a/config-apache.html b/config-apache.html new file mode 100644 index 0000000..210715d --- /dev/null +++ b/config-apache.html @@ -0,0 +1,156 @@ +Apache Module
PHP Manual
PrevChapter 3. ConfigurationNext

Apache Module

Apache module configuration directives

CGI redirection module/action module


PrevHomeNext
ConfigurationUpCGI
\ No newline at end of file diff --git a/config-cgi.html b/config-cgi.html new file mode 100644 index 0000000..01555f3 --- /dev/null +++ b/config-cgi.html @@ -0,0 +1,136 @@ +CGI
PHP Manual
PrevChapter 3. ConfigurationNext

CGI


PrevHomeNext
Apache ModuleUpVirtual hosts
\ No newline at end of file diff --git a/config-security.html b/config-security.html new file mode 100644 index 0000000..b89a886 --- /dev/null +++ b/config-security.html @@ -0,0 +1,564 @@ +Security
PHP Manual
PrevChapter 3. ConfigurationNext

Security

PHP is a powerful language and the interpreter, whether included + in a web server as a module or executed as a separate + CGI binary, is able to access files, execute + commands and open network connections on the server. These + properties make anything run on a web server insecure by default. + PHP is designed specifically to be a more secure language for + writing CGI programs than Perl or C, and with correct selection of + compile-time and runtime configuration options it gives you + exactly the combination of freedom and security you need. + +

As there are many different ways of utilizing PHP, there are many + configuration options controlling its behaviour. A large + selection of options guarantees you can use PHP for a lot of + purposes, but it also means there are combinations of these + options and server configurations that result in an insecure + setup. This chapter explains the different configuration option + combinations and the situations they can be safely used. + +

CGI binary

Possible attacks

Using PHP as a CGI binary is an option for + setups that for some reason do not wish to integrate PHP as a + module into server software (like Apache), or will use PHP with + different kinds of CGI wrappers to create safe chroot and setuid + environments for scripts. This setup usually involves + installing executable PHP binary to the web server cgi-bin + directory. CERT advisory CA-96.11 + recommends agains placing any interpreters into cgi-bin. Even + if the PHP binary can be used as a standalone interpreter, PHP + is designed to prevent the attacks this setup makes possible: + +

  • Accessing system files: + http://my.host/cgi-bin/php?/etc/passwd + +

    The query information in an url after the question mark (?) + is passed as command line arguments to the interpreter by the + CGI interface. Usually interpreters open and execute the + file specified as the first argument on the command line. + +

    When invoked as a CGI binary, PHP refuses to interpret the + command line arguments. +

  • Accessing any web document on server: + http://my.host/cgi-bin/php/secret/doc.html + +

    The path information part of the url after the PHP binary + name, /secret/doc.html is + conventionally used to specify the name of the file to be + opened and interpreted by the CGI program. + Usually some web server configuration directives (Apache: + Action) are used to redirect requests to documents like + http://my.host/secret/script.php3 to the + PHP interpreter. With this setup, the web server first checks + the access permissions to the directory /secret, and after that creates the + redirected request http://my.host/cgi-bin/php/secret/script.php3. + Unfortunately, if the request is originally given in this + form, no access checks are made by web server for file + /secret/script.php3, but only + for the /cgi-bin/php file. This + way any user able to access /cgi-bin/php is able to access any + protected document on the web server. + +

    In PHP, compile-time configuration option --enable-force-cgi-redirect + and runtime configuration directives doc_root and user_dir can be used to prevent + this attack, if the server document tree has any directories + with access restrictions. See below for full explanation of + different combinations. + +

Case 1: only public files served

If your server does not have any content that is not restricted + by password or ip based access control, there is no need for + these configuration options. If your web server does not allow + you to do redirects, or the server does not have a way to + communicate with the PHP binary that the request is a safely + redirected request, you can specify the option --disable-force-cgi-redirect + to the configure script. You still have to make sure your PHP + scripts do not rely on one or another way of calling the script, + neither by directly http://my.host/cgi-bin/php/dir/script.php3 + nor by redirection http://my.host/dir/script.php3. + +

Redirection can be configured for example in apache by + directives AddHandler and Action (see below). +

Case 2: using --enable-force-cgi-redirect

This compile-time option prevents anyone from calling PHP + directly with a url like http://my.host/cgi-bin/php/secretdir/script.php3. + Instead, PHP will only parse in this mode if it has gone through + a web server redirect rule. +

Usually the redirection in the Apache configuration is done with + the following directives: +

Action php3-script /cgi-bin/php
+AddHandler php3-script .php3

This option has only been tested with the Apache web server, and + relies on Apache to set the non-standard CGI environment + variable REDIRECT_STATUS on redirected requests. + If your web server does not support any way of telling if the + request is direct or redirected, you cannot use this option and + you must use one of the other ways of running the CGI version + documented here. +

Case 3: setting doc_root or user_dir

To include active content, like scripts and executables, in the + web server document directories is sometimes consider an + insecure practice. If for some configuration mistake the + scripts are not executed but displayed as usual HTML documents, + this may result in leakage of intellectual property or security + information like passwords. Therefore many sysadmins will + prefer setting up another directory structure for scripts that + is only accessible through the PHP CGI, and therefore always + interpreted and not displayed as such. + +

Also if the method for making sure the requests are not + redirected, as described in the previous section, is not + available, it is necessary to set up a script doc_root that is + different from web document root. + +

You can set the PHP script document root by the configuration + directive doc_root in the + php3.ini file, or you can set + the environment variable PHP_DOCUMENT_ROOT. If + it is set, the CGI version of PHP will always construct the file + name to open with this doc_root and the + path information in the request, so you can be sure no script is + executed outside this directory (except for + user_dir below). + +

Another option usable here is user_dir. When user_dir is unset, + only thing controlling the opened file name is + doc_root. Opening an url like http://my.host/~user/doc.php3 does not + result in opening a file under users home directory, but a file + called ~user/doc.php3 under + doc_root (yes, a directory name starting with a tilde + [~]). + +

If user_dir is set to for example public_php, a request like http://my.host/~user/doc.php3 will open a + file called doc.php3 under the directory + named public_php under the home + directory of the user. If the home of the user is /home/user, the file executed is + /home/user/public_php/doc.php3. + +

user_dir expansion happens regardless of + the doc_root setting, so you can control + the document root and user directory access separately. + +

Case 4: PHP parser outside of web tree

A very secure option is to put the PHP parser binary somewhere + outside of the web tree of files. In /usr/local/bin, for example. The only real + downside to this option is that you will now have to put a line + similar to: + +

#!/usr/local/bin/php
+       

+ + as the first line of any file containing PHP tags. You will + also need to make the file executable. That is, treat it + exactly as you would treat any other CGI script written in Perl + or sh or any other common scripting language which uses the + #! shell-escape mechanism for launching + itself. +

To get PHP to handle PATH_INFO and + PATH_TRANSLATED information correctly with this + setup, the php parser should be compiled with the --enable-discard-path + configure option. + +

Apache module

When PHP is used as an Apache module it inherits Apache's user + permissions (typically those of the "nobody" user). + +


PrevHomeNext
Virtual hostsUpSecurity
\ No newline at end of file diff --git a/config-virtualhost.html b/config-virtualhost.html new file mode 100644 index 0000000..a5d65f8 --- /dev/null +++ b/config-virtualhost.html @@ -0,0 +1,136 @@ +Virtual hosts
PHP Manual
PrevChapter 3. ConfigurationNext

Virtual hosts


PrevHomeNext
CGIUpSecurity
\ No newline at end of file diff --git a/configuration.html b/configuration.html new file mode 100644 index 0000000..5fdcc41 --- /dev/null +++ b/configuration.html @@ -0,0 +1,2766 @@ +Configuration
PHP Manual
PrevNext

Chapter 3. Configuration

Table of Contents
The configuration file

The configuration file

The configuration file (called php3.ini in + PHP 3.0, and simply php.ini as of PHP 4.0) + is read when PHP starts up. For the server module versions of PHP, + this happens only once when the web server is started. For the + CGI version, it happens on every invocation.

When using PHP as an Apache module, you can also change the + configuration settings using directives in Apache configuration + files and .htaccess files.

With PHP 3.0, there are Apache directives that correspond to each + configuration setting in the php3.ini name, + except the name is prefixed by "php3_".

With PHP 4.0, there are just a few Apache directives that allow you + to change the PHP configuration settings. +

php_value + name + value

This sets the value of the specified variable.

php_flag + name + on|off

This is used to set a Boolean configuration option.

php_admin_value + name + value

This sets the value of the specified variable. "Admin" + configuration settings can only be set from within the + main Apache configuration files, and not from .htaccess + files.

php_admin_flag + name + on|off

This is used to set a Boolean configuration option.

You can view the settings of the configuration values in + the output of phpinfo(). You can also + access the values of individial configuration settings using + get_cfg_var().

General Configuration Directives

asp_tags + boolean

Enables the use of ASP-like <% %> tags in addition to + the usual <?php ?> tags. This includes the + variable-value printing shorthand of <%= $value %>. For + more information, see Escaping from HTML. +

Note: Support for ASP-style tags was added in 3.0.4.

auto_append_file + string

Specifies the name of a file that is automatically parsed + after the main file. The file is included as if it was + called with the include() function, so + include_path is used.

The special value none disables auto-appending. +

Note: + If the script is terminated with exit(), + auto-append will not occur.

auto_prepend_file + string

Specifies the name of a file that is automatically parsed + before the main file. The file is included as if it was + called with the include() function, so + include_path is used.

The special value none disables auto-prepending.

cgi_ext + string

display_errors + boolean

This determines whether errors should be printed to the screen + as part of the HTML output or not. +

doc_root + string

PHP's "root directory" on the server. Only used if + non-empty. If PHP is configured with safe mode, no files outside + this directory are served. +

engine + boolean

This directive is really only useful in the Apache module + version of PHP. It is used by sites that would like to turn + PHP parsing on and off on a per-directory or per-virtual + server basis. By putting engine + off in the appropriate places in the + httpd.conf file, PHP can be enabled or + disabled. +

error_log + string

Name of file where script errors should be logged. If the + special value syslog is used, the errors + are sent to the system logger instead. On UNIX, this means + syslog(3) and on Windows NT it means the event log. The + system logger is not supported on Windows 95.

error_reporting + integer

Set the error reporting level. The parameter is an integer + representing a bit field. Add the values of the error + reporting levels you want. +

Table 3-1. Error Reporting Levels

bit valueenabled reporting
1normal errors
2normal warnings
4parser errors
8non-critical style-related warnings
+ The default value for this directive is 7 (normal errors, + normal warnings and parser errors are shown). +

open_basedir + string

Limit the files that can be opened by PHP to the specified + directory-tree. +

When a script tries to open a file with, + for example, fopen or gzopen, the location of the file is + checked. When the file is outside the specified directory-tree, + PHP will refuse to open it. All symbolic links are resolved, + so it's not possible to avoid this restriction with a symlink. +

The special value . + indicates that the directory in which the script is stored will + be used as base-directory. +

Under Windows, separate the directories with a semicolon. On all + other systems, separate the directories with a colon. As an Apache + module, open_basedir paths from parent directories are now + automatically inherited. +

Note: Support for multiple directories was added in 3.0.7.

The default is to allow all files to be opened. +

gpc_order + string

Set the order of GET/POST/COOKIE variable parsing. The + default setting of this directive is "GPC". Setting this to + "GP", for example, will cause PHP to completely ignore cookies + and to overwrite any GET method variables with POST-method + variables of the same name. +

ignore_user_abort + string

On by default. If changed to Off scripts will be terminated as + soon as they try to output something after a client has aborted + their connection. + ignore_user_abort(). +

include_path + string

Specifies a list of directories where the + require(), include() + and fopen_with_path() functions look for + files. The format is like the system's PATH + environment variable: a list of directories separated with a + colon in UNIX or semicolon in Windows. +

Example 3-1. UNIX include_path


include_path=.:/home/httpd/php-lib
+
+

Example 3-2. Windows include_path


include_path=".;c:\www\phplib"
+
+ The default value for this directive is . + (only the current directory).

isapi_ext + string

log_errors + boolean

Tells whether script error messages should be logged to the + server's error log. This option is thus server-specific.

magic_quotes_gpc + boolean

Sets the magic_quotes state for GPC (Get/Post/Cookie) + operations. When magic_quotes are on, all ' (single-quote), + " (double quote), \ (backslash) and NUL's are escaped + with a backslash automatically. If magic_quotes_sybase is + also on, a single-quote is escaped with a single-quote + instead of a backslash. +

magic_quotes_runtime + boolean

If magic_quotes_runtime is enabled, + most functions that return data from any sort of external + source including databases and text files will have quotes + escaped with a backslash. If + magic_quotes_sybase is also on, a + single-quote is escaped with a single-quote instead of a + backslash. +

magic_quotes_sybase + boolean

If magic_quotes_sybase is also on, a + single-quote is escaped with a single-quote instead of a + backslash if magic_quotes_gpc or + magic_quotes_runtime is enabled. +

max_execution_time + integer

This sets the maximum time in seconds a script is allowed to + take before it is terminated by the parser. This helps + prevent poorly written scripts from tying up the server. The + default setting is 30. +

memory_limit + integer

This sets the maximum amount of memory in bytes that a script + is allowed to allocate. This helps prevent poorly written + scripts for eating up all available memory on a server. +

nsapi_ext + string

register_globals + boolean

Tells whether or not to register the EGPCS (Environment, GET, + POST, Cookie, Server) variables as global variables. You may + want to turn this off if you don't want to clutter your + scripts' global scope with user data. This makes the most + sense when coupled with track_vars - in which case + you can access all of the EGPCS variables through the + $HTTP_ENV_VARS, + $HTTP_GET_VARS, + $HTTP_POST_VARS, + $HTTP_COOKIE_VARS, and + $HTTP_SERVER_VARS + arrays in the global scope. +

short_open_tag + boolean

Tells whether the short form (<? ?>of + PHP's open tag should be allowed. If you want to use PHP in + combination with XML, you have to disable this option. If + disabled, you must use the long form of the open tag + (<?php ?>).

sql.safe_mode + boolean

track_errors + boolean

If enabled, the last error message will always be present in the + global variable $php_errormsg.

track_vars + boolean

If enabled, then Environment, GET, POST, Cookie, and Server + variables can be found in the global associative arrays + $HTTP_ENV_VARS, + $HTTP_GET_VARS, + $HTTP_POST_VARS, + $HTTP_COOKIE_VARS, and + $HTTP_SERVER_VARS. +

Note that as of PHP 4.0.3, track_vars is always turned on. +

upload_tmp_dir + string

The temporary directory used for storing files when doing + file upload. Must be writable by whatever user PHP is + running as.

user_dir + string

The base name of the directory used on a user's home + directory for PHP files, for example + public_html.

warn_plus_overloading + boolean

If enabled, this option makes PHP output a warning when the + plus (+) operator is used on strings. + This is to make it easier to find scripts that need to be + rewritten to using the string concatenator instead + (.).

+

Mail Configuration Directives

SMTP + string

DNS name or IP address of the SMTP server PHP under Windows + should use for mail sent with the mail() + function.

sendmail_from + string

Which "From:" mail address should be used in mail sent from + PHP under Windows.

sendmail_path + string

Where the sendmail program can be found, + usually /usr/sbin/sendmail or + /usr/lib/sendmail + configure does an honest attempt of + locating this one for you and set a default, but if it fails, + you can set it here.

Systems not using sendmail should set this directive to the + sendmail wrapper/replacement their mail system offers, if any. + For example, Qmail + users can normally set it to + /var/qmail/bin/sendmail.

Safe Mode Configuration Directives

safe_mode + boolean

Whether to enable PHP's safe mode. Read the Security chapter for more + more information.

safe_mode_exec_dir + string

If PHP is used in safe mode, system() and + the other functions executing system programs refuse to start + programs that are not in this directory.

Debugger Configuration Directives

debugger.host + string

DNS name or IP address of host used by the debugger.

debugger.port + string

Port number used by the debugger.

debugger.enabled + boolean

Whether the debugger is enabled.

Extension Loading Directives

enable_dl + boolean

This directive is really only useful in the Apache module + version of PHP. You can turn dynamic loading of PHP + extensions with dl() on and off per + virtual server or per directory. +

The main reason for turning dynamic loading off is + security. With dynamic loading, it's possible to ignore all + the safe_mode and open_basedir restrictions. +

The default is to allow dynamic loading, except when using + safe-mode. In safe-mode, it's always imposible to use + dl(). +

extension_dir + string

In what directory PHP should look for dynamically loadable + extensions.

extension + string

Which dynamically loadable extensions to load when PHP starts + up.

MySQL Configuration Directives

mysql.allow_persistent + boolean

Whether to allow persistent MySQL connections.

mysql.default_host + string

The default server host to use when connecting to the database + server if no other host is specified. +

mysql.default_user + string

The default user name to use when connecting to the database + server if no other name is specified. +

mysql.default_password + string

The default password to use when connecting to the database + server if no other password is specified. +

mysql.max_persistent + integer

The maximum number of persistent MySQL connections per + process. +

mysql.max_links + integer

The maximum number of MySQL connections per process, including + persistent connections. +

mSQL Configuration Directives

msql.allow_persistent + boolean

Whether to allow persistent mSQL connections. +

msql.max_persistent + integer

The maximum number of persistent mSQL connections per process. +

msql.max_links + integer

The maximum number of mSQL connections per process, including + persistent connections. +

Postgres Configuration Directives

pgsql.allow_persistent + boolean

Whether to allow persistent Postgres connections. +

pgsql.max_persistent + integer

The maximum number of persistent Postgres connections per + process. +

pgsql.max_links + integer

The maximum number of Postgres connections per process, + including persistent connections. +

Sybase Configuration Directives

sybase.allow_persistent + boolean

Whether to allow persistent Sybase connections. +

sybase.max_persistent + integer

The maximum number of persistent Sybase connections per + process. +

sybase.max_links + integer

The maximum number of Sybase connections per process, + including persistent connections. +

Sybase-CT Configuration Directives

sybct.allow_persistent + boolean

Whether to allow persistent Sybase-CT connections. + The default is on. +

sybct.max_persistent + integer

The maximum number of persistent Sybase-CT connections per + process. The default is -1 meaning unlimited. +

sybct.max_links + integer

The maximum number of Sybase-CT connections per process, + including persistent connections. The default is -1 meaning + unlimited. +

sybct.min_server_severity + integer

Server messages with severity greater than or equal to + sybct.min_server_severity will be reported as warnings. This + value can also be set from a script by calling + sybase_min_server_severity(). The default + is 10 which reports errors of information severity or greater. +

sybct.min_client_severity + integer

Client library messages with severity greater than or equal to + sybct.min_client_severity will be reported as warnings. This + value can also be set from a script by calling + sybase_min_client_severity(). The default + is 10 which effectively disables reporting. +

sybct.login_timeout + integer

The maximum time in seconds to wait for a connection attempt + to succeed before returning failure. Note that if + max_execution_time has been exceeded when a connection attempt + times out, your script will be terminated before it can take + action on failure. The default is one minute. +

sybct.timeout + integer

The maximum time in seconds to wait for a select_db or query + operation to succeed before returning failure. Note that if + max_execution_time has been exceeded when am operation times + out, your script will be terminated before it can take action + on failure. The default is no limit. +

sybct.hostname + string

The name of the host you claim to be connecting from, for + display by sp_who. The default is none. +

Informix Configuration Directives

ifx.allow_persistent + boolean

Whether to allow persistent Informix connections. +

ifx.max_persistent + integer

The maximum number of persistent Informix connections per + process. +

ifx.max_links + integer

The maximum number of Informix connections per process, including + persistent connections. +

ifx.default_host + string

The default host to connect to when no host is specified + in ifx_connect() or + ifx_pconnect(). +

ifx.default_user + string

The default user id to use when none is specified + in ifx_connect() or + ifx_pconnect(). +

ifx.default_password + string

The default password to use when none is specified + in ifx_connect() or + ifx_pconnect(). +

ifx.blobinfile + boolean

Set to true if you want to return blob columns + in a file, false if you want them in memory. You can + override the setting at runtime + with ifx_blobinfile_mode(). +

ifx.textasvarchar + boolean

Set to true if you want to return TEXT columns + as normal strings in select statements, + false if you want to use blob id parameters. You can + override the setting at runtime with + ifx_textasvarchar(). +

ifx.byteasvarchar + boolean

Set to true if you want to return BYTE columns + as normal strings in select queries, + false if you want to use blob id parameters. You can + override the setting at runtime with + ifx_textasvarchar(). +

ifx.charasvarchar + boolean

Set to true if you want to trim trailing spaces + from CHAR columns when fetching them. +

ifx.nullformat + boolean

Set to true if you want to return NULL columns + as the literal string "NULL", false if you want + them returned as the empty string "". You can + override this setting at runtime with + ifx_nullformat(). +

BC Math Configuration Directives

bcmath.scale + integer

Number of decimal digits for all bcmath functions. +

Browser Capability Configuration Directives

browscap + string

Name of browser capabilities file. See also + get_browser(). +

Unified ODBC Configuration Directives

uodbc.default_db + string

ODBC data source to use if none is specified in + odbc_connect() or + odbc_pconnect(). +

uodbc.default_user + string

User name to use if none is specified in + odbc_connect() or + odbc_pconnect(). +

uodbc.default_pw + string

Password to use if none is specified in + odbc_connect() or + odbc_pconnect(). +

uodbc.allow_persistent + boolean

Whether to allow persistent ODBC connections. +

uodbc.max_persistent + integer

The maximum number of persistent ODBC connections per process. +

uodbc.max_links + integer

The maximum number of ODBC connections per process, including + persistent connections. +


PrevHomeNext
Problems?UpSecurity
\ No newline at end of file diff --git a/constants.html b/constants.html new file mode 100644 index 0000000..895b940 --- /dev/null +++ b/constants.html @@ -0,0 +1,326 @@ +Constants
PHP3 Manual
PrevChapter 5. Syntax and grammarNext

Constants

PHP defines several constants and provides a mechanism for defining + more at run-time. Constants are much like variables, save for the two + facts that constants must be defined using the + define() function, and that they cannot later + be redefined to another value. + +

The predefined constants (always available) are: + +

__FILE__

The name of the script file presently being parsed. If used + within a file which has been included or required, then the + name of the included file is given, and not the name of the + parent file. +

__LINE__

The number of the line within the current script file which is + being parsed. If used within a file which has been included or + required, then the position within the included file is given. +

PHP_VERSION

The string representation of the version of the PHP parser + presently in use; e.g. '3.0.8-dev'. +

PHP_OS

The name of the operating system on which the PHP parser is + executing; e.g. 'Linux'. +

TRUE

A true value. +

FALSE

A false value. +

E_ERROR

Denotes an error other than a parsing error from which + recovery is not possible. +

E_WARNING

Denotes a condition where PHP knows something is wrong, but + will continue anyway; these can be caught by the script + itself. An example would be an invalid regexp in + ereg(). +

E_PARSE

The parser choked on invalid syntax in the script + file. Recovery is not possible. +

E_NOTICE

Something happened which may or may not be an error. Execution + continues. Examples include using an unquoted string as a + hash index, or accessing a variable which has not been set. +

+ +

The E_* constants are typically used with the + error_reporting() function for setting the + error reporting level. + +

You can define additional constants using the + define() function. + +

Note that these are constants, not C-style macros; only valid + scalar data may be represented by a constant. + +

Example 5-5. Defining Constants

<?php
+define("CONSTANT", "Hello world.");
+echo CONSTANT; // outputs "Hello world."
+?>
+     
+ +

Example 5-6. Using __FILE__ and __LINE__

<?php
+function report_error($file, $line, $message) {
+    echo "An error occured in $file on line $line: $message.";
+}
+
+report_error(__FILE__,__LINE__, "Something went wrong!");
+?>
+     
+


PrevHomeNext
VariablesUpExpressions
\ No newline at end of file diff --git a/control-structures.alternative-syntax.html b/control-structures.alternative-syntax.html new file mode 100644 index 0000000..2e5b84a --- /dev/null +++ b/control-structures.alternative-syntax.html @@ -0,0 +1,284 @@ +Alternative syntax for control structures
PHP Manual
PrevChapter 11. Control StructuresNext

Alternative syntax for control structures

PHP offers an alternative syntax for some of its control + structures; namely, if, + while, for, + foreach, and switch. + In each case, the basic form of the alternate syntax is to change + the opening brace to a colon (:) and the closing brace to + endif;, endwhile;, + endfor;, endforeach;, or + endswitch;, respectively. +


 <?php if ($a == 5): ?>
+ A is equal to 5
+ <?php endif; ?>
+     

+

In the above example, the HTML block "A = 5" is nested within an + if statement written in the alternative syntax. + The HTML block would be displayed only if $a is equal to 5. +

The alternative syntax applies to else and + elseif as well. The following is an + if structure with elseif and + else in the alternative format: +


if ($a == 5):
+    print "a equals 5";
+    print "...";
+elseif ($a == 6):
+    print "a equals 6";
+    print "!!!";
+else:
+    print "a is neither 5 nor 6";
+endif;
+     

+

See also while, + for, and if for further examples. +


PrevHomeNext
elseifUpwhile
\ No newline at end of file diff --git a/control-structures.break.html b/control-structures.break.html new file mode 100644 index 0000000..27fc5db --- /dev/null +++ b/control-structures.break.html @@ -0,0 +1,219 @@ +break
PHP Manual
PrevChapter 11. Control StructuresNext

break

break ends execution of the current + for, while, or + switch structure. +

break accepts an optional numeric argument + which tells it how many nested enclosing structures are to be + broken out of. +


$arr = array ('one', 'two', 'three', 'four', 'stop', 'five');
+while (list (, $val) = each ($arr)) {
+    if ($val == 'stop') {
+        break;    /* You could also write 'break 1;' here. */
+    }
+    echo "$val<br>\n";
+}
+
+/* Using the optional argument. */
+
+$i = 0;
+while (++$i) {
+    switch ($i) {
+    case 5:
+        echo "At 5<br>\n";
+        break 1;  /* Exit only the switch. */
+    case 10:
+        echo "At 10; quitting<br>\n";
+        break 2;  /* Exit the switch and the while. */
+    default:
+        break;
+    }
+}
+     

+


PrevHomeNext
foreachUpcontinue
\ No newline at end of file diff --git a/control-structures.continue.html b/control-structures.continue.html new file mode 100644 index 0000000..fb2721f --- /dev/null +++ b/control-structures.continue.html @@ -0,0 +1,207 @@ +continue
PHP Manual
PrevChapter 11. Control StructuresNext

continue

continue is used within looping structures to + skip the rest of the current loop iteration and continue execution + at the beginning of the next iteration. +

continue accepts an optional numeric argument + which tells it how many levels of enclosing loops it should skip + to the end of. +


while (list ($key, $value) = each ($arr)) {
+    if (!($key % 2)) { // skip odd members
+        continue;
+    }
+    do_something_odd ($value);
+}
+
+$i = 0;
+while ($i++ < 5) {
+    echo "Outer<br>\n";
+    while (1) {
+        echo "  Middle<br>\n";
+        while (1) {
+            echo "  Inner<br>\n";
+            continue 3;
+        }
+        echo "This never gets output.<br>\n";
+    }
+    echo "Neither does this.<br>\n";
+}
+     

+


PrevHomeNext
breakUpswitch
\ No newline at end of file diff --git a/control-structures.do.while.html b/control-structures.do.while.html new file mode 100644 index 0000000..1ccc44d --- /dev/null +++ b/control-structures.do.while.html @@ -0,0 +1,281 @@ +do..while
PHP Manual
PrevChapter 11. Control StructuresNext

do..while

do..while loops are very similar to + while loops, except the truth expression is + checked at the end of each iteration instead of in the beginning. + The main difference from regular while loops is + that the first iteration of a do..while loop is + guarenteed to run (the truth expression is only checked at the end + of the iteration), whereas it's may not necessarily run with a + regular while loop (the truth expression is + checked at the beginning of each iteration, if it evaluates to + FALSE right from the beginning, the loop + execution would end immediately). +

There is just one syntax for do..while loops: + +


$i = 0;
+do {
+   print $i;
+} while ($i>0);
+     

+

The above loop would run one time exactly, since after the first + iteration, when truth expression is checked, it evaluates to + FALSE ($i is not bigger than 0) and the loop + execution ends. +

Advanced C users may be familiar with a different usage of the + do..while loop, to allow stopping execution in + the middle of code blocks, by encapsulating them with + do..while(0), and using the break + statement. The following code fragment demonstrates this: +


do {
+    if ($i < 5) {
+        print "i is not big enough";
+        break;
+    }
+    $i *= $factor;
+    if ($i < $minimum_limit) {
+        break;
+    }
+    print "i is ok";
+
+     ...process i...
+
+} while(0);
+     

+

Don't worry if you don't understand this right away or at all. + You can code scripts and even powerful scripts without using this + `feature'. +


PrevHomeNext
whileUpfor
\ No newline at end of file diff --git a/control-structures.else.html b/control-structures.else.html new file mode 100644 index 0000000..bad58a8 --- /dev/null +++ b/control-structures.else.html @@ -0,0 +1,239 @@ +else
PHP Manual
PrevChapter 11. Control StructuresNext

else

Often you'd want to execute a statement if a certain condition is + met, and a different statement if the condition is not met. This + is what else is for. else + extends an if statement to execute a statement + in case the expression in the if statement + evaluates to FALSE. For example, the following + code would display a is bigger than + b if $a is bigger than + $b, and a is NOT bigger + than b otherwise: +


if ($a > $b) {
+    print "a is bigger than b";
+} else {
+    print "a is NOT bigger than b";
+}
+     

+ + The else statement is only executed if the + if expression evaluated to + FALSE, and if there were any + elseif expressions - only if they evaluated to + FALSE as well (see elseif). + +


PrevHomeNext
Control StructuresUpelseif
\ No newline at end of file diff --git a/control-structures.elseif.html b/control-structures.elseif.html new file mode 100644 index 0000000..5903cfb --- /dev/null +++ b/control-structures.elseif.html @@ -0,0 +1,275 @@ +elseif
PHP Manual
PrevChapter 11. Control StructuresNext

elseif

elseif, as its name suggests, is a combination + of if and else. Like + else, it extends an if + statement to execute a different statement in case the original + if expression evaluates to + FALSE. However, unlike + else, it will execute that alternative + expression only if the elseif conditional + expression evaluates to TRUE. For example, the + following code would display a is bigger than + b, a equal to b + or a is smaller than b: +


if ($a > $b) {
+    print "a is bigger than b";
+} elseif ($a == $b) {
+    print "a is equal to b";
+} else {
+    print "a is smaller than b";
+}
+     

+

There may be several elseifs within the same + if statement. The first + elseif expression (if any) that evaluates to + true would be executed. In PHP, you can also + write 'else if' (in two words) and the behavior would be identical + to the one of 'elseif' (in a single word). The syntactic meaning + is slightly different (if you're familiar with C, this is the same + behavior) but the bottom line is that both would result in exactly + the same behavior. +

The elseif statement is only executed if the + preceding if expression and any preceding + elseif expressions evaluated to + FALSE, and the current + elseif expression evaluated to + TRUE. +


PrevHomeNext
elseUpAlternative syntax for control structures
\ No newline at end of file diff --git a/control-structures.for.html b/control-structures.for.html new file mode 100644 index 0000000..185dfd3 --- /dev/null +++ b/control-structures.for.html @@ -0,0 +1,371 @@ +for
PHP Manual
PrevChapter 11. Control StructuresNext

for

for loops are the most complex loops in PHP. + They behave like their C counterparts. The syntax of a + for loop is: +


for (expr1; expr2; expr3) statement
+     

+

The first expression (expr1) is + evaluated (executed) once unconditionally at the beginning of the + loop. +

In the beginning of each iteration, + expr2 is evaluated. If it evaluates to + TRUE, the loop continues and the nested + statement(s) are executed. If it evaluates to + FALSE, the execution of the loop ends. +

At the end of each iteration, expr3 is + evaluated (executed). +

Each of the expressions can be empty. + expr2 being empty means the loop should + be run indefinitely (PHP implicitly considers it as + TRUE, like C). This may not be as useless as + you might think, since often you'd want to end the loop using a + conditional break + statement instead of using the for truth + expression. +

Consider the following examples. All of them display numbers from + 1 to 10: +


/* example 1 */
+ 
+for ($i = 1; $i <= 10; $i++) {
+    print $i;
+}
+ 
+/* example 2 */
+ 
+for ($i = 1;;$i++) {
+    if ($i > 10) {
+        break;
+    }
+    print $i;
+}
+ 
+/* example 3 */
+ 
+$i = 1;
+for (;;) {
+    if ($i > 10) {
+        break;
+    }
+    print $i;
+    $i++;
+}
+ 
+/* example 4 */
+ 
+for ($i = 1; $i <= 10; print $i, $i++) ;
+     

+

Of course, the first example appears to be the nicest one (or + perhaps the fourth), but you may find that being able to use empty + expressions in for loops comes in handy in many + occasions. +

PHP also supports the alternate "colon syntax" for + for loops. +


for (expr1; expr2; expr3): statement; ...; endfor;
+     

+

Other languages have a foreach statement to + traverse an array or hash. PHP 3 has no such construct; PHP 4 does + (see foreach). In PHP 3, you + can combine while + with the list() and each() + functions to achieve the same effect. See the documentation for + these functions for an example. +


PrevHomeNext
do..whileUpforeach
\ No newline at end of file diff --git a/control-structures.foreach.html b/control-structures.foreach.html new file mode 100644 index 0000000..b927713 --- /dev/null +++ b/control-structures.foreach.html @@ -0,0 +1,375 @@ +foreach
PHP Manual
PrevChapter 11. Control StructuresNext

foreach

PHP 4 (not PHP 3) includes a foreach construct, + much like perl and some other languages. This simply gives an easy + way to iterate over arrays. There are two syntaxes; the second is + a minor but useful extension of the first: +


foreach(array_expression as $value) statement
+foreach(array_expression as $key => $value) statement
+     

+

The first form loops over the array given by + array_expression. On each loop, the value of + the current element is assigned to $value and + the internal array pointer is advanced by one (so on the next + loop, you'll be looking at the next element). +

The second form does the same thing, except that the current + element's key will be assigned to the variable + $key on each loop. +

Note: + When foreach first starts executing, the + internal array pointer is automatically reset to the first element + of the array. This means that you do not need to call + reset() before a foreach + loop. +

+

Note: + Also note that foreach operates on a copy of + the specified array, not the array itself, therefore the array + pointer is not modified like with the each construct. +

+

You may have noticed that the following are functionally + identical: +


reset ($arr);
+while (list(, $value) = each ($arr)) {
+    echo "Value: $value<br>\n";
+}
+
+foreach ($arr as $value) {
+    echo "Value: $value<br>\n";
+}
+     

+ The following are also functionally identical: +


reset ($arr);
+while (list($key, $value) = each ($arr)) {
+    echo "Key: $key; Value: $value<br>\n";
+}
+
+foreach ($arr as $key => $value) {
+    echo "Key: $key; Value: $value<br>\n";
+}
+     

+

Some more examples to demonstrate usages: +


/* foreach example 1: value only */
+
+$a = array (1, 2, 3, 17);
+
+foreach ($a as $v) {
+   print "Current value of \$a: $v.\n";
+}
+
+/* foreach example 2: value (with key printed for illustration) */
+
+$a = array (1, 2, 3, 17);
+
+$i = 0; /* for illustrative purposes only */
+
+foreach($a as $v) {
+    print "\$a[$i] => $k.\n";
+}
+
+/* foreach example 3: key and value */
+
+$a = array (
+    "one" => 1,
+    "two" => 2,
+    "three" => 3,
+    "seventeen" => 17
+);
+
+foreach($a as $k => $v) {
+    print "\$a[$k] => $v.\n";
+}
+     

+


PrevHomeNext
forUpbreak
\ No newline at end of file diff --git a/control-structures.html b/control-structures.html new file mode 100644 index 0000000..d293d8a --- /dev/null +++ b/control-structures.html @@ -0,0 +1,468 @@ +Control Structures
PHP Manual
PrevNext

Chapter 11. Control Structures

Table of Contents
if
else
elseif
Alternative syntax for control structures
while
do..while
for
foreach
break
continue
switch
require()
include()
require_once()
include_once()

Any PHP script is built out of a series of statements. A statement + can be an assignment, a function call, a loop, a conditional + statement of even a statement that does nothing (an empty + statement). Statements usually end with a semicolon. In addition, + statements can be grouped into a statement-group by encapsulating a + group of statements with curly braces. A statement-group is a + statement by itself as well. The various statement types are + described in this chapter. +

if

The if construct is one of the most important + features of many languages, PHP included. It allows for + conditional execution of code fragments. PHP features an + if structure that is similar to that of C: +


if (expr)
+    statement
+     

+

As described in the section about expressions, expr is evaluated + to its truth value. If expr evaluates + to TRUE, PHP will execute statement, and if it + evaluates to FALSE - it'll ignore it. +

The following example would display a is bigger + than b if $a is bigger + than $b: +


if ($a > $b)
+    print "a is bigger than b";
+     

+

Often you'd want to have more than one statement to be executed + conditionally. Of course, there's no need to wrap each statement + with an if clause. Instead, you can group + several statements into a statement group. For example, this code + would display a is bigger than b + if $a is bigger than + $b, and would then assign the value of + $a into $b: +


if ($a > $b) {
+    print "a is bigger than b";
+    $b = $a;
+}
+     

+

If statements can be nested indefinitely within other + if statements, which provides you with complete + flexibility for conditional execution of the various parts of your + program. +


PrevHomeNext
String OperatorsUpelse
\ No newline at end of file diff --git a/control-structures.switch.html b/control-structures.switch.html new file mode 100644 index 0000000..a5b8cf0 --- /dev/null +++ b/control-structures.switch.html @@ -0,0 +1,447 @@ +switch
PHP Manual
PrevChapter 11. Control StructuresNext

switch

The switch statement is similar to a series of + IF statements on the same expression. In many occasions, you may + want to compare the same variable (or expression) with many + different values, and execute a different piece of code depending + on which value it equals to. This is exactly what the + switch statement is for. +

The following two examples are two different ways to write the + same thing, one using a series of if + statements, and the other using the switch + statement: +


if ($i == 0) {
+    print "i equals 0";
+}
+if ($i == 1) {
+    print "i equals 1";
+}
+if ($i == 2) {
+    print "i equals 2";
+}
+ 
+switch ($i) {
+    case 0:
+        print "i equals 0";
+        break;
+    case 1:
+        print "i equals 1";
+        break;
+    case 2:
+        print "i equals 2";
+        break;
+}
+     

+

It is important to understand how the switch + statement is executed in order to avoid mistakes. The + switch statement executes line by line + (actually, statement by statement). In the beginning, no code is + executed. Only when a case statement is found + with a value that matches the value of the + switch expression does PHP begin to execute the + statements. PHP continues to execute the statements until the end + of the switch block, or the first time it sees + a break statement. If you don't write a + break statement at the end of a case's + statement list, PHP will go on executing the statements of the + following case. For example: +


switch ($i) {
+    case 0:
+        print "i equals 0";
+    case 1:
+        print "i equals 1";
+    case 2:
+        print "i equals 2";
+}
+     

+

Here, if $i equals to 0, PHP would execute all of the print + statements! If $i equals to 1, PHP would execute the last two + print statements, and only if $i equals to 2, you'd get the + 'expected' behavior and only 'i equals 2' would be displayed. So, + it's important not to forget break statements + (even though you may want to avoid supplying them on purpose under + certain circumstances). +

In a switch statement, the condition is + evaluated only once and the result is compared to each + case statement. In an elseif + statement, the condition is evaluated again. If your condition is + more complicated than a simple compare and/or is in a tight loop, + a switch may be faster. +

The statement list for a case can also be empty, which simply + passes control into the statement list for the next case. +


switch ($i) {
+    case 0:
+    case 1:
+    case 2:
+        print "i is less than 3 but not negative";
+        break;
+    case 3:
+        print "i is 3";
+}
+     

+

A special case is the default case. This case matches anything + that wasn't matched by the other cases. For example: +


switch ($i) {
+    case 0:
+        print "i equals 0";
+        break;
+    case 1:
+        print "i equals 1";
+        break;
+    case 2:
+        print "i equals 2";
+        break;
+    default:
+        print "i is not equal to 0, 1 or 2";
+}
+     

+

The case expression may be any expression that + evaluates to a simple type, that is, integer or floating-point + numbers and strings. Arrays or objects cannot be used here unless + they are dereferenced to a simple type. +

The alternative syntax for control structures is supported with + switches. For more information, see Alternative syntax + for control structures . +


switch ($i):
+    case 0:
+        print "i equals 0";
+        break;
+    case 1:
+        print "i equals 1";
+        break;
+    case 2:
+        print "i equals 2";
+        break;
+    default:
+        print "i is not equal to 0, 1 or 2";
+endswitch;
+     

+


PrevHomeNext
continueUprequire()
\ No newline at end of file diff --git a/control-structures.while.html b/control-structures.while.html new file mode 100644 index 0000000..c7506ac --- /dev/null +++ b/control-structures.while.html @@ -0,0 +1,285 @@ +while
PHP Manual
PrevChapter 11. Control StructuresNext

while

while loops are the simplest type of loop in + PHP. They behave just like their C counterparts. The basic form + of a while statement is: +


while (expr) statement
+     

+

The meaning of a while statement is simple. It + tells PHP to execute the nested statement(s) repeatedly, as long + as the while expression evaluates to + TRUE. The value of the expression is checked + each time at the beginning of the loop, so even if this value + changes during the execution of the nested statement(s), execution + will not stop until the end of the iteration (each time PHP runs + the statements in the loop is one iteration). Sometimes, if the + while expression evaluates to + FALSE from the very beginning, the nested + statement(s) won't even be run once. +

Like with the if statement, you can group + multiple statements within the same while loop + by surrounding a group of statements with curly braces, or by + using the alternate syntax: +


while (expr): statement ... endwhile;
+     

+

The following examples are identical, and both print numbers from + 1 to 10: +


/* example 1 */
+
+$i = 1;
+while ($i <= 10) {
+    print $i++;  /* the printed value would be
+                    $i before the increment
+                    (post-increment) */
+}
+ 
+/* example 2 */
+ 
+$i = 1;
+while ($i <= 10):
+    print $i;
+    $i++;
+endwhile;
+     

+


PrevHomeNext
Alternative syntax for control structuresUpdo..while
\ No newline at end of file diff --git a/copyright.html b/copyright.html new file mode 100644 index 0000000..90fbc2d --- /dev/null +++ b/copyright.html @@ -0,0 +1,93 @@ +
PHP Manual

Copyright

This manual is © Copyright 1997, 1998, 1999, 2000 by the PHP + Documentation Group. The members of this group are listed on the front page of this manual. +

This manual can be redistributed under the terms of the GNU + General Public License as published by the Free Software + Foundation; either version 2 of the License, or (at your option) + any later version. +


 Home 
\ No newline at end of file diff --git a/debugger-protocol.html b/debugger-protocol.html new file mode 100644 index 0000000..5889b66 --- /dev/null +++ b/debugger-protocol.html @@ -0,0 +1,656 @@ +Debugger Protocol
PHP Manual
PrevAppendix C. The PHP Debugger 

Debugger Protocol

The debugger protocol is line-based. Each line has a + type, and several lines compose a + message. Each message starts with a line of + the type start and terminates with a line of + the type end. PHP may send lines for different + messages simultaneously. +

A line has this format: +


+date time
+host(pid)
+type:
+message-data
+     

+

date

Date in ISO 8601 format + (yyyy-mm-dd) +

time

Time including microseconds: + hh:mm:uuuuuu +

host

DNS name or IP address of the host where the script error was + generated. +

pid

PID (process id) on host of the + process with the PHP script that generated this error. +

type

Type of line. Tells the receiving program about what it + should treat the following data as: +

Table C-1. Debugger Line Types

NameMeaning
start Tells the receiving program that a debugger message + starts here. The contents of + data will be the type of error + message, listed below. +
messageThe PHP error message.
location File name and line number where the error occured. The + first location line will always + contain the top-level location. + data will contain + file:line. + There will always be a location line + after message and after every + function. +
framesNumber of frames + in the following stack dump. If there are four frames, + expect information about four levels of called functions. + If no "frames" line is given, the depth should be assumed + to be 0 (the error occured at top-level). +
function Name of function where the error occured. Will be + repeated once for every level in the function call + stack. +
end Tells the receiving program that a debugger message ends + here. +
+

data

Line data.

+ +

Table C-2. Debugger Error Types

DebuggerPHP Internal
warningE_WARNING
errorE_ERROR
parseE_PARSE
noticeE_NOTICE
core-errorE_CORE_ERROR
core-warningE_CORE_WARNING
unknown(any other)
+ +

Example C-1. Example Debugger Message


+1998-04-05 23:27:400966 lucifer.guardian.no(20481) start: notice
+1998-04-05 23:27:400966 lucifer.guardian.no(20481) message: Uninitialized variable
+1998-04-05 23:27:400966 lucifer.guardian.no(20481) location: (null):7
+1998-04-05 23:27:400966 lucifer.guardian.no(20481) frames: 1
+1998-04-05 23:27:400966 lucifer.guardian.no(20481) function: display
+1998-04-05 23:27:400966 lucifer.guardian.no(20481) location: /home/ssb/public_html/test.php3:10
+1998-04-05 23:27:400966 lucifer.guardian.no(20481) end: notice
+     

+


PrevHome 
The PHP DebuggerUp 
\ No newline at end of file diff --git a/debugger.html b/debugger.html new file mode 100644 index 0000000..bf026af --- /dev/null +++ b/debugger.html @@ -0,0 +1,260 @@ +The PHP Debugger
PHP Manual
PrevNext

Appendix C. The PHP Debugger

Table of Contents
Using the Debugger
Debugger Protocol

Using the Debugger

PHP's internal debugger is useful for tracking down evasive bugs. + The debugger works by connecting to a TCP port + for every time PHP starts up. All error messages from that + request will be sent to this TCP connection. This information is + intended for "debugging server" that can run inside an + IDE or programmable editor (such as Emacs). +

How to set up the debugger: +

  1. + Set up a TCP port for the debugger in the configuration file (debugger.port) and enable it + (debugger.enabled). +

  2. + Set up a TCP listener on that port somewhere (for example + socket -l -s 1400 on UNIX). +

  3. + In your code, run + "debugger_on(host)", where + host is the IP number or name of the + host running the TCP listener. +

+ Now, all warnings, notices etc. will show up on that listener + socket, even if you them turned off with + error_reporting(). +

Note: + The code for the debugger has not been ported to PHP 4, at the + present time only PHP 3 supports the debugger code. +


PrevHomeNext
Reporting ErrorsUpDebugger Protocol
\ No newline at end of file diff --git a/expressions.html b/expressions.html new file mode 100644 index 0000000..7b4e2c0 --- /dev/null +++ b/expressions.html @@ -0,0 +1,378 @@ +Expressions
PHP Manual
PrevNext

Chapter 9. Expressions

Expressions are the most important building stones of PHP. In PHP, + almost anything you write is an expression. The simplest yet + most accurate way to define an expression is "anything that has a + value". + +

The most basic forms of expressions are constants and variables. + When you type "$a = 5", you're assigning '5' into $a. '5', obviously, + has the value 5, or in other words '5' is an expression with the + value of 5 (in this case, '5' is an integer constant). + +

After this assignment, you'd expect $a's value to be 5 as + well, so if you wrote $b = $a, you'd expect it to behave just as + if you wrote $b = 5. In other words, $a is an expression with the + value of 5 as well. If everything works right, this is exactly + what will happen. + +

Slightly more complex examples for expressions are functions. For + instance, consider the following function: + +

function foo () {
+    return 5;
+}
+     

+ +

Assuming you're familiar with the concept of functions (if you're + not, take a look at the chapter about functions), you'd assume + that typing $c = foo() is essentially just like + writing $c = 5, and you're right. Functions + are expressions with the value of their return value. Since foo() + returns 5, the value of the expression 'foo()' is 5. Usually + functions don't just return a static value but compute something. + +

Of course, values in PHP don't have to be integers, and very often + they aren't. PHP supports three scalar value types: integer values, + floating point values and string values (scalar values are values that + you can't 'break' into smaller pieces, unlike arrays, for instance). + PHP also supports two composite (non-scalar) types: arrays and + objects. Each of these value types can be assigned into variables or + returned from functions. + +

So far, users of PHP/FI 2 shouldn't feel any change. However, PHP + takes expressions much further, in the same way many other + languages do. PHP is an expression-oriented language, in the + sense that almost everything is an expression. Consider the + example we've already dealt with, '$a = 5'. It's easy to see that + there are two values involved here, the value of the integer + constant '5', and the value of $a which is being updated to 5 as + well. But the truth is that there's one additional value involved + here, and that's the value of the assignment itself. The + assignment itself evaluates to the assigned value, in this case 5. + In practice, it means that '$a = 5', regardless of what it does, + is an expression with the value 5. Thus, writing something like + '$b = ($a = 5)' is like writing '$a = 5; $b = 5;' (a semicolon + marks the end of a statement). Since assignments are parsed in a + right to left order, you can also write '$b = $a = 5'. + +

Another good example of expression orientation is pre- and + post-increment and decrement. Users of PHP/FI 2 and many other + languages may be familiar with the notation of variable++ and + variable--. These are increment and decrement operators. In + PHP/FI 2, the statement '$a++' has no value (is not an + expression), and thus you can't assign it or use it in any way. + PHP enhances the increment/decrement capabilities by making + these expressions as well, like in C. In PHP, like in C, there + are two types of increment - pre-increment and post-increment. + Both pre-increment and post-increment essentially increment the + variable, and the effect on the variable is idential. The + difference is with the value of the increment expression. + Pre-increment, which is written '++$variable', evaluates to the + incremented value (PHP increments the variable before reading its + value, thus the name 'pre-increment'). Post-increment, which is + written '$variable++' evaluates to the original value of + $variable, before it was incremented (PHP increments the variable + after reading its value, thus the name 'post-increment'). + +

A very common type of expressions are comparison expressions. + These expressions evaluate to either 0 or 1, meaning FALSE or TRUE + (respectively). PHP supports > (bigger than), >= (bigger than + or equal to), == (equal), != (not equal), < (smaller than) and <= + (smaller than or equal to). These expressions are most commonly used + inside conditional execution, such as if + statements. + +

The last example of expressions we'll deal with here is combined + operator-assignment expressions. You already know that if you + want to increment $a by 1, you can simply write '$a++' or '++$a'. + But what if you want to add more than one to it, for instance 3? + You could write '$a++' multiple times, but this is obviously not a + very efficient or comfortable way. A much more common practice is + to write '$a = $a + 3'. '$a + 3' evaluates to the value of $a + plus 3, and is assigned back into $a, which results in + incrementing $a by 3. In PHP, as in several other languages + like C, you can write this in a shorter way, which with time would + become clearer and quicker to understand as well. Adding 3 to the + current value of $a can be written '$a += 3'. This means exactly + "take the value of $a, add 3 to it, and assign it back into $a". + In addition to being shorter and clearer, this also results in + faster execution. The value of '$a += 3', like the value of a + regular assignment, is the assigned value. Notice that it is NOT + 3, but the combined value of $a plus 3 (this is the value that's + assigned into $a). Any two-place operator can be used in this + operator-assignment mode, for example '$a -= 5' (subtract 5 from + the value of $a), '$b *= 7' (multiply the value of $b by 7), etc. + +

There is one more expression that may seem odd if you haven't seen + it in other languages, the ternary conditional operator: + +

$first ? $second : $third

+ + If the value of the first subexpression is true (non-zero), then + it the second subexpression is evaluated, and that is the result + of the conditional expression. Otherwise, the third subexpression + is evaluated, and that is the value. + +

The following example should help you understand pre- and + post-increment and expressions in general a bit better: + +

function double($i) {
+    return $i*2;
+}
+$b = $a = 5;        /* assign the value five into the variable $a and $b */
+$c = $a++;          /* post-increment, assign original value of $a 
+                       (5) to $c */
+$e = $d = ++$b;     /* pre-increment, assign the incremented value of 
+                       $b (6) to $d and $e */
+
+/* at this point, both $d and $e are equal to 6 */
+
+$f = double($d++);  /* assign twice the value of $d before 
+                       the increment, 2*6 = 12 to $f */
+$g = double(++$e);  /* assign twice the value of $e after
+                       the increment, 2*7 = 14 to $g */
+$h = $g += 10;      /* first, $g is incremented by 10 and ends with the 
+                       value of 24. the value of the assignment (24) is 
+                       then assigned into $h, and $h ends with the value 
+                       of 24 as well. */

+ +

In the beginning of the chapter we said that we'll be describing + the various statement types, and as promised, expressions can be + statements. However, not every expression is a statement. In + this case, a statement has the form of 'expr' ';' that is, an + expression followed by a semicolon. In '$b=$a=5;', $a=5 is a + valid expression, but it's not a statement by itself. '$b=$a=5;' + however is a valid statement. + +

One last thing worth mentioning is the truth value of expressions. + In many events, mainly in conditional execution and loops, you're + not interested in the specific value of the expression, but only + care about whether it means TRUE or FALSE (PHP doesn't have a + dedicated boolean type). The truth value of expressions in PHP is + calculated in a similar way to perl. Any numeric non-zero numeric + value is TRUE, zero is FALSE. Be sure to note that negative + values are non-zero and are thus considered TRUE! The empty + string and the string "0" are FALSE; all other strings are TRUE. + With non-scalar values (arrays and objects) - if the value + contains no elements it's considered FALSE, otherwise it's + considered TRUE. + +

PHP provides a full and powerful implementation of expressions, and + documenting it entirely goes beyond the scope of this manual. The + above examples should give you a good idea about what expressions + are and how you can construct useful expressions. Throughout the + rest of this manual we'll write expr + to indicate any valid PHP expression. + +


PrevHomeNext
ConstantsUpOperators
\ No newline at end of file diff --git a/feature-connection-handling.html b/feature-connection-handling.html new file mode 100644 index 0000000..3e24151 --- /dev/null +++ b/feature-connection-handling.html @@ -0,0 +1,256 @@ +Connection Handling
PHP3 Manual
PrevChapter 4. FeaturesNext

Connection Handling

The following applies to PHP version 3.0.7 and later. +

Internally in PHP a connection status is maintained. There are 3 possible states: +

  • 0 - NORMAL +

  • 1 - ABORTED +

  • 2 - TIMEOUT +

+

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 set_time_limit()) is hit, the TIMEOUT state flag + is turned on. +

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 ignore_user_abort() 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 + register_shutdown_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 connection_aborted() function. This function will return + true if the connection was aborted. +

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 set_time_limit() + 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 + connection_timeout() function. This function will return true if a timeout caused + the shutdown function to be called. +

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 + connection_timeout() and connection_aborted() return true. You can also + check both states in a single call by using the connection_status(). This function + returns a bitfield of the active states. So, if both states are active it would return 3, for example. +


PrevHomeNext
Error handlingUpSyntax and grammar
\ No newline at end of file diff --git a/feature-cookies.html b/feature-cookies.html new file mode 100644 index 0000000..a42639e --- /dev/null +++ b/feature-cookies.html @@ -0,0 +1,171 @@ +HTTP cookie support
PHP3 Manual
PrevChapter 4. FeaturesNext

HTTP cookie support

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 + setcookie() function. Cookies are part of the + HTTP header, so the SetCookie() function must be called before any + output is sent to the browser. This is the same restriction as + for the Header() function. +

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 + [] to the cookie name. For more details see + the setcookie() function. +


PrevHomeNext
PUT Method SupportUpRegular expressions
\ No newline at end of file diff --git a/feature-error-handling.html b/feature-error-handling.html new file mode 100644 index 0000000..f306835 --- /dev/null +++ b/feature-error-handling.html @@ -0,0 +1,197 @@ +Error handling
PHP3 Manual
PrevChapter 4. FeaturesNext

Error handling

There are 4 types of errors and warnings in PHP. They are: + +

  • 1 - Normal Function Errors +

  • 2 - Normal Warnings +

  • 4 - Parser Errors +

  • 8 - Notices (warnings you can ignore but which + may imply a bug in your code) +

+ +

The above 4 numbers are added up to define an error reporting + level. The default error reporting level is 7 which is 1 + 2 + 4, + or everything except notices. This level can be changed in the + php3.ini file with the error_reporting directive. It can also be + set in your Apache httpd.conf file with the php3_error_reporting + directive or lastly it may be set at runtime within a script using + the error_reporting() function. + +

+ All PHP expressions 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 + track_errors feature + is enabled, you can find the error message in the global variable + $php_errormsg. + +


PrevHomeNext
Regular expressionsUpConnection Handling
\ No newline at end of file diff --git a/feature-fileupload.html b/feature-fileupload.html new file mode 100644 index 0000000..678875b --- /dev/null +++ b/feature-fileupload.html @@ -0,0 +1,263 @@ +File upload support
PHP3 Manual
PrevChapter 4. FeaturesNext

File upload support

PHP is capable of receiving file uploads from any RFC-1867 + compliant browser (which includes Netscape Navigator 3 or later, + Microsoft Internet Explorer 3 with a patch from Microsoft, or + later without a patch). This feature lets people upload both text + and binary files. With PHP's authentication and file manipulation + functions, you have full control over who is allowed to upload and + what is to be done with the file once it has been uploaded. +

Note that PHP also supports PUT-method file uploads as used by + Netscape Composer and W3C's Amaya clients. See the + PUT Method Support for more + details. +

A file upload screen can be built by creating a special form which + looks something like this: + +

Example 4-4. File Upload Form

<FORM ENCTYPE="multipart/form-data" ACTION="_URL_" METHOD=POST>
+<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000">
+Send this file: <INPUT NAME="userfile" TYPE="file">
+<INPUT TYPE="submit" VALUE="Send File">
+</FORM>
+     
+ + The _URL_ should point to a php html file. The MAX_FILE_SIZE + hidden field must precede the file input field and its value is + the maximum filesize accepted. The value is in bytes. In this + destination file, the following variables will be defined upon a + successful upload: +

  • $userfile - The temporary filename in which the uploaded file + was stored on the server machine. +

  • $userfile_name - The original name of the file on the sender's + system. +

  • $userfile_size - The size of the uploaded file in bytes. +

  • $userfile_type - The mime type of the file if the browser + provided this information. An example would be + "image/gif". +

+ + Note that the "$userfile" part of the above variables is + whatever the name of the INPUT field of TYPE=file is in the upload + form. In the above upload form example, we chose to call it + "userfile". + +

Files will by default be stored in the server's default temporary + directory. This can be changed by setting the environment + variable TMPDIR in the environment in which PHP runs. Setting it + using a PutEnv() call from within a PHP script will not work + though. +

The PHP script which receives the uploaded file should implement + whatever logic is necessary for determining what should be done + with the uploaded file. You can for example use the $file_size + variable to throw away any files that are either too small or too + big. You could use the $file_type variable to throw away any + files that didn't match a certain type criteria. Whatever the + logic, you should either delete the file from the temporary + directory or move it elsewhere. +

The file will be deleted from the temporary directory at the end + of the request if it has not been moved away or renamed. +

Common Pitfalls: +

The MAX_FILE_SIZE item cannot specify a file size greater than the file + size that has been set in the upload_max_filesize in the PHP3.ini file + or the corresponding php3_upload_max_filesize Apache .conf directive. + The default is 2 Megabytes. +

Please note that the CERN httpd seems to strip off everything + starting at the first whitespace in the content-type mime header + it gets from the client. As long as this is the case, CERN httpd + will not support the file upload feature. +


PrevHomeNext
GIF creation with PHPUpPUT Method Support
\ No newline at end of file diff --git a/feature-fileupload.multiple.html b/feature-fileupload.multiple.html new file mode 100644 index 0000000..c729b60 --- /dev/null +++ b/feature-fileupload.multiple.html @@ -0,0 +1,269 @@ +Uploading multiple files
PHP Manual
PrevChapter 19. Handling file uploadsNext

Uploading multiple files

It is possible to upload multiple files simultaneously and have + the information organized automatically in arrays for you. To + do so, you need to use the same array submission syntax in the + HTML form as you do with multiple selects and checkboxes: +

Note: + Support for multiple file uploads was added in version 3.0.10. +

Example 19-3. Uploading multiple files


<form action="file-upload.html" method="post" enctype="multipart/form-data">
+  Send these files:<br>
+  <input name="userfile[]" type="file"><br>
+  <input name="userfile[]" type="file"><br>
+  <input type="submit" value="Send files">
+</form>
+     
+

When the above form is submitted, the arrays + $userfile, + $userfile_name, and + $userfile_size will be formed in + the global scope (as well as in $HTTP_POST_FILES ($HTTP_POST_VARS + in PHP 3)). Each of these will be a numerically indexed array of + the appropriate values for the submitted files. +

For instance, assume that the filenames + /home/test/review.html and + /home/test/xwp.out are submitted. In this + case, $userfile_name[0] would + contain the value review.html, + and $userfile_name[1] would + contain the value + xwp.out. Similarly, + $userfile_size[0] would contain + review.html's filesize, and so forth. +

$userfile['name'][0], + $userfile['tmp_name'][0], + $userfile['size'][0], and + $userfile['type'][0] are also set. +


PrevHomeNext
Common PitfallsUpPUT method support
\ No newline at end of file diff --git a/feature-images.html b/feature-images.html new file mode 100644 index 0000000..75baf39 --- /dev/null +++ b/feature-images.html @@ -0,0 +1,183 @@ +GIF creation with PHP
PHP3 Manual
PrevChapter 4. FeaturesNext

GIF creation with PHP

PHP is not limited to creating just HTML output. It can also be + used to create GIF image files, or even more convenient GIF image + streams. You will need to compile PHP with the GD library of + image functions for this to work. +

Example 4-3. GIF creation with PHP

<?php
+    Header("Content-type: image/gif");
+    $string=implode($argv," ");
+    $im = imagecreatefromgif("images/button1.gif");
+    $orange = ImageColorAllocate($im, 220, 210, 60);
+    $px = (imagesx($im)-7.5*strlen($string))/2;
+    ImageString($im,3,$px,9,$string,$orange);
+    ImageGif($im);
+    ImageDestroy($im);
+?>
+     
+ + This example would be called from a page with a tag like: <img + src="button.php3?text"> The above button.php3 script + then takes this "text" string an overlays it on top of a + base image which in this case is "images/button1.gif" + 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. +


PrevHomeNext
FeaturesUpFile upload support
\ No newline at end of file diff --git a/feature-putsupport.html b/feature-putsupport.html new file mode 100644 index 0000000..190f066 --- /dev/null +++ b/feature-putsupport.html @@ -0,0 +1,196 @@ +PUT Method Support
PHP3 Manual
PrevChapter 4. FeaturesNext

PUT Method Support

PHP provides support for the HTTP PUT method used by clients such + as Netscape Composer and W3C Amaya. PUT requests are much simpler + than a file upload and they look something like this: +

PUT /path/filename.html HTTP/1.1 +

This would normally mean that the remote client would like to save + the content that follows as: /path/filename.html in your web tree. + It is obviously not a good idea for Apache or PHP to automatically + let everybody overwrite any files in your web tree. So, to handle + such a request you have to first tell your web server that you + want a certain PHP script to handle the request. In Apache you do + this with the Script directive. It can be + placed almost anywhere in your Apache configuration file. A + common place is inside a <Directory> block or perhaps inside + a <Virtualhost> block. A line like this would do the trick: +

Script PUT /put.php3 +

This tells Apache to send all PUT requests for URIs that match the + context in which you put this line to the put.php3 script. This + assumes, of course, that you have PHP enabled for the .php3 + extension and PHP is active. +

Inside your put.php3 file you would then do something like this: +

<? copy($PHP_UPLOADED_FILE_NAME,$DOCUMENT_ROOT.$REQUEST_URI); ?> +

This would copy the file to the location requested by the remote + client. You would probably want to perform some checks and/or + authenticate the user before performing this file copy. The only + trick here is that when PHP sees a PUT-method request it stores + the uploaded file in a temporary file just like the File Upload feature. When the + request ends, this temporary file is deleted. So, your PUT + handling PHP script has to copy that file somewhere. The filename + of this temporary file is in the $PHP_PUT_FILENAME variable, and + you can see the suggested destination filename in the $REQUEST_URI + (may vary on non-Apache web servers). This destination filename + is the one that the remote client specified. You do not have to + listen to this client. You could, for example, copy all uploaded + files to a special uploads directory. +


PrevHomeNext
File upload supportUpHTTP cookie support
\ No newline at end of file diff --git a/feature-regexps.html b/feature-regexps.html new file mode 100644 index 0000000..e75eb3c --- /dev/null +++ b/feature-regexps.html @@ -0,0 +1,263 @@ +Regular expressions
PHP3 Manual
PrevChapter 4. FeaturesNext

Regular expressions

Regular expressions are used for complex string manipulation in + PHP. The functions that support regular expressions are: + +

+ + These functions all take a regular expression string as their + first argument. PHP uses the POSIX extended regular expressions + as defined by POSIX 1003.2. For a full description of POSIX + regular expressions see the regex man pages included in the regex + directory in the PHP distribution. + + +

Example 4-5. Regular expression examples

ereg("abc",$string);            
+/* Returns true if "abc"
+   is found anywhere in $string. */
+
+ereg("^abc",$string);
+/* Returns true if "abc"
+   is found at the beginning of $string. */
+
+ereg("abc$",$string);
+/* Returns true if "abc"
+   is found at the end of $string. */
+
+eregi("(ozilla.[23]|MSIE.3)",$HTTP_USER_AGENT);  
+/* Returns true if client browser
+   is Netscape 2, 3 or MSIE 3. */
+
+ereg("([[:alnum:]]+) ([[:alnum:]]+) ([[:alnum:]]+)",
+     $string,$regs); 
+/* Places three space separated words
+   into $regs[1], $regs[2] and $regs[3]. */
+
+ereg_replace("^","<BR>",$string); 
+/* Put a <BR> tag at the beginning of $string. */
+ 
+ereg_replace("$","<BR>",$string); 
+/* Put a <BR> tag at the end of $string. */
+
+ereg_replace("\n","",$string);
+/* Get rid of any carriage return
+   characters in $string. */
+     
+ + +


PrevHomeNext
HTTP cookie supportUpError handling
\ No newline at end of file diff --git a/features.connection-handling.html b/features.connection-handling.html new file mode 100644 index 0000000..41cc0e0 --- /dev/null +++ b/features.connection-handling.html @@ -0,0 +1,273 @@ +Connection handling
PHP Manual
PrevNext

Chapter 21. Connection handling

Note: The following applies to 3.0.7 and later.

Internally in PHP a connection status is maintained. There are 3 + possible states: +

  • 0 - NORMAL

  • 1 - ABORTED

  • 2 - TIMEOUT

+

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 + set_time_limit()) is hit, the TIMEOUT state flag + is turned on.

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 ignore_user_abort() 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 register_shutdown_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 connection_aborted() + function. This function will return true if the connection was + aborted.

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 set_time_limit() 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 + connection_timeout() function. This function will + return true if a timeout caused the shutdown function to be called.

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 connection_timeout() + and connection_aborted() return true. + You can also check both states in a single call by using the + connection_status(). This function returns a + bitfield of the active states. So, if both states are active it + would return 3, for example.


PrevHomeNext
Using remote filesUpPersistent Database Connections
\ No newline at end of file diff --git a/features.cookies.html b/features.cookies.html new file mode 100644 index 0000000..878f570 --- /dev/null +++ b/features.cookies.html @@ -0,0 +1,177 @@ +Cookies
PHP Manual
PrevNext

Chapter 18. Cookies

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 + setcookie() function. Cookies are part of the + HTTP header, so setcookie() must be called before + any output is sent to the browser. This is the same limitation that + header() has.

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 + [] to the cookie name. For more details see + the setcookie() function.


PrevHomeNext
HTTP authentication with PHPUpHandling file uploads
\ No newline at end of file diff --git a/features.error-handling.html b/features.error-handling.html new file mode 100644 index 0000000..0ba462f --- /dev/null +++ b/features.error-handling.html @@ -0,0 +1,736 @@ +Error Handling
PHP Manual
PrevNext

Chapter 15. Error Handling

There are several types of errors and warnings in PHP. They are: + +

Table 15-1. PHP error types

ValueConstantDescriptionNote
1E_ERRORfatal run-time errors 
2E_WARNINGrun-time warnings (non fatal errors) 
4E_PARSEcompile-time parse errors 
8E_NOTICE run-time notices (less serious than warnings) +  
16E_CORE_ERRORfatal errors that occur during PHP's initial startupPHP 4 only
32E_CORE_WARNING warnings (non fatal errors) that occur during PHP's initial + startup + PHP 4 only
64E_COMPILE_ERRORfatal compile-time errorsPHP 4 only
128E_COMPILE_WARNINGcompile-time warnings (non fatal errors)PHP 4 only
256E_USER_ERRORuser-generated error messagePHP 4 only
512E_USER_WARNINGuser-generated warning messagePHP 4 only
1024E_USER_NOTICE user-generated notice messagePHP 4 only
 E_ALLall of the above, as supported 
+

The above values (either numerical or symbolic) are used to build + up a bitmask that specifies which errors to report. You can use the + bitwise operators + to combine these values or mask out certain types of errors. Note + that only '|', '~', '!', and '&' will be understood within + php.ini, however, and that no bitwise + operators will be understood within php3.ini. +

In PHP 4, the default error_reporting setting is + E_ALL & ~E_NOTICE, meaning to display all errors + and warnings which are not E_NOTICE-level. In PHP 3, the default + setting is (E_ERROR | E_WARNING | E_PARSE), + meaning the same thing. Note, however, that since constants are not + supported in PHP 3's php3.ini, the error_reporting setting there + must be numeric; hence, it is 7. +

The initial setting can be changed in the ini file with the error_reporting directive, in + your Apache httpd.conf 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 + error_reporting() function. +

Warning

When upgrading code or servers from PHP 3 to PHP 4 you should + check these settings and calls to + error_reporting() 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. +

All PHP expressions 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 track_errors feature is enabled, + you can find the error message in the global variable + $php_errormsg. +

Warning

Currently the @ + error-control operator prefix will even disable error + reporting for critical errors that will terminate script + execution. Among other things, this means that if you use @ 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. +

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. +

Example 15-1. Using error handling in a script


<?php
+// we will do our own error handling
+error_reporting(0);
+
+// user defined error handling function
+function userErrorHandler ($errno, $errmsg, $filename, $linenum, $vars) {
+    // timestamp for the error entry
+    $dt = date("Y-m-d H:i:s (T)");
+
+    // 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   =>  "Error",
+                2   =>  "Warning",
+                4   =>  "Parsing Error",
+                8   =>  "Notice",
+                16  =>  "Core Error",
+                32  =>  "Core Warning",
+                64  =>  "Compile Error",
+                128 =>  "Compile Warning",
+                256 =>  "User Error",
+                512 =>  "User Warning",
+                1024=>  "User Notice"
+                );
+    // set of errors for which a var trace will be saved
+    $user_errors = array(E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE);
+    
+    $err = "<errorentry>\n";
+    $err .= "\t<datetime>".$dt."</datetime>\n";
+    $err .= "\t<errornum>".$errno."</errnumber>\n";
+    $err .= "\t<errortype>".$errortype[$errno]."</errortype>\n";
+    $err .= "\t<errormsg>".$errmsg."</errormsg>\n";
+    $err .= "\t<scriptname>".$filename."</scriptname>\n";
+    $err .= "\t<scriptlinenum>".$linenum."</scriptlinenum>\n";
+
+    if (in_array($errno, $user_errors))
+        $err .= "\t<vartrace>".wddx_serialize_value($vars,"Variables")."</vartrace>\n";
+    $err .= "</errorentry>\n\n";
+    
+    // for testing
+    // echo $err;
+
+    // save to the error log, and e-mail me if there is a critical user error
+    error_log($err, 3, "/usr/local/php4/error.log");
+    if ($errno == E_USER_ERROR)
+        mail("phpdev@mydomain.com","Critical User Error",$err);
+}
+
+
+function distance ($vect1, $vect2) {
+    if (!is_array($vect1) || !is_array($vect2)) {
+        trigger_error("Incorrect parameters, arrays expected", E_USER_ERROR);
+        return NULL;
+    }
+
+    if (count($vect1) != count($vect2)) {
+        trigger_error("Vectors need to be of the same size", E_USER_ERROR);
+        return NULL;
+    }
+
+    for ($i=0; $i<count($vect1); $i++) {
+        $c1 = $vect1[$i]; $c2 = $vect2[$i];
+        $d = 0.0;
+        if (!is_numeric($c1)) {
+            trigger_error("Coordinate $i in vector 1 is not a number, using zero", 
+                            E_USER_WARNING);
+            $c1 = 0.0;
+        }
+        if (!is_numeric($c2)) {
+            trigger_error("Coordinate $i in vector 2 is not a number, using zero", 
+                            E_USER_WARNING);
+            $c2 = 0.0;
+        }
+        $d += $c2*$c2 - $c1*$c1;
+    }
+    return sqrt($d);
+}
+
+$old_error_handler = set_error_handler("userErrorHandler");
+
+// undefined constant, generates a warning
+$t = I_AM_NOT_DEFINED;
+
+// define some "vectors"
+$a = array(2,3,"foo");
+$b = array(5.5, 4.3, -1.6);
+$c = array (1,-3);
+
+// generate a user error
+$t1 = distance($c,$b)."\n";
+
+// generate another user error
+$t2 = distance($b,"i am not an array")."\n";
+
+// generate a warning
+$t3 = distance($a,$b)."\n";
+
+?>
+    
+ This is just a simple example showing how to use the + Error Handling and Logging + functions. +

See also error_reporting(), + error_log(), + set_error_handler(), + restore_error_handler(), + trigger_error(), + user_error() +


PrevHomeNext
FeaturesUpCreating and manipulating images
\ No newline at end of file diff --git a/features.file-upload.common-pitfalls.html b/features.file-upload.common-pitfalls.html new file mode 100644 index 0000000..f19cbbb --- /dev/null +++ b/features.file-upload.common-pitfalls.html @@ -0,0 +1,153 @@ +Common Pitfalls
PHP Manual
PrevChapter 19. Handling file uploadsNext

Common Pitfalls

The MAX_FILE_SIZE item cannot specify a file size greater than the file + size that has been set in the upload_max_filesize in the PHP 3.ini file + or the corresponding php3_upload_max_filesize Apache .conf directive. + The default is 2 Megabytes. +

Not validating which file you operate on may mean that users can access + sensitive information in other directories. +

Please note that the CERN httpd seems to strip off everything + starting at the first whitespace in the content-type mime header + it gets from the client. As long as this is the case, CERN httpd + will not support the file upload feature. +


PrevHomeNext
Handling file uploadsUpUploading multiple files
\ No newline at end of file diff --git a/features.file-upload.html b/features.file-upload.html new file mode 100644 index 0000000..43b5193 --- /dev/null +++ b/features.file-upload.html @@ -0,0 +1,543 @@ +Handling file uploads
PHP Manual
PrevNext

Chapter 19. Handling file uploads

Table of Contents
POST method uploads
Common Pitfalls
Uploading multiple files
PUT method support

POST method uploads

PHP is capable of receiving file uploads from any RFC-1867 + compliant browser (which includes Netscape Navigator 3 or later, + Microsoft Internet Explorer 3 with a patch from Microsoft, or + later without a patch). This feature lets people upload both text + and binary files. With PHP's authentication and file manipulation + functions, you have full control over who is allowed to upload and + what is to be done with the file once it has been uploaded. +

Note that PHP also supports PUT-method file uploads as used by + Netscape Composer and W3C's Amaya clients. See the PUT Method + Support for more details. +

A file upload screen can be built by creating a special form which + looks something like this: +

Example 19-1. File Upload Form


<FORM ENCTYPE="multipart/form-data" ACTION="_URL_" METHOD=POST>
+<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000">
+Send this file: <INPUT NAME="userfile" TYPE="file">
+<INPUT TYPE="submit" VALUE="Send File">
+</FORM>
+     
+ The _URL_ should point to a PHP file. The MAX_FILE_SIZE hidden + field must precede the file input field and its value is the + maximum filesize accepted. The value is in bytes. +

In PHP 3, the following variables will be defined within the + destination script upon a successful upload, assuming that register_globals is turned + on in php.ini. If track_vars is turned on, they will + also be available within the global array + $HTTP_POST_VARS. Note that the following + variable names assume the use of the file upload name 'userfile', + as used in the example above: + +

  • $userfile - The temporary filename in which + the uploaded file was stored on the server machine. +

  • $userfile_name - The original name or path + of the file on the sender's system. +

  • $userfile_size - The size of the uploaded + file in bytes. +

  • $userfile_type - The mime type of the file + if the browser provided this information. An example would be + "image/gif". +

+ Note that the "$userfile" part of the above variables is + whatever the name of the INPUT field of TYPE=file is in the upload + form. In the above upload form example, we chose to call it + "userfile" +

In PHP 4, the behaviour is slightly different, in that the new + global array $HTTP_POST_FILES is provided to + contain the uploaded file information. This is still only + available if track_vars is + turned on, but track_vars is + always turned on in versions of PHP after PHP 4.0.2. +

The contents of $HTTP_POST_FILES are as + follows. Note that this assumes the use of the file upload name + 'userfile', as used in the example above: +

$HTTP_POST_FILES['userfile']['name']

The original name of the file on the client machine. +

$HTTP_POST_FILES['userfile']['type']

The mime type of the file, if the browser provided this + information. An example would be + "image/gif". +

$HTTP_POST_FILES['userfile']['size']

The size, in bytes, of the uploaded file. +

$HTTP_POST_FILES['userfile']['tmp_name']

The temporary filename of the file in which the uploaded file + was stored on the server. +

+

Files will by default be stored in the server's default temporary + directory, unless another location has been given with the upload_tmp_dir directive in + php.ini. The server's default directory can + be changed by setting the environment variable + TMPDIR in the environment in which PHP runs. + Setting it using putenv() from within a PHP + script will not work. This environment variable can also be used + to make sure that other operations are working on uploaded files, + as well. +

Example 19-2. Validating file uploads

The following examples are for versions of PHP 3 greater than + 3.0.16, and versions of PHP 4 greater than 4.0.2. See the + function entries for is_uploaded_file() and + move_uploaded_file(). +


<?php 
+if (is_uploaded_file($userfile)) {
+    copy($userfile, "/place/to/put/uploaded/file");
+} else {
+    echo "Possible file upload attack: filename '$userfile'.";
+}
+/* ...or... */
+move_uploaded_file($userfile, "/place/to/put/uploaded/file");
+?>
+     

For earlier versions of PHP, you'll need to do something like + the following. +

Note: + This will not work in versions of PHP 4 + after 4.0.2. It depends on internal functionality of PHP which + changed after that version. +

+


<?php 
+/* Userland test for uploaded file. */ 
+function is_uploaded_file($filename) {
+    if (!$tmp_file = get_cfg_var('upload_tmp_dir')) {
+        $tmp_file = dirname(tempnam('', ''));
+    }
+    $tmp_file .= '/' . basename($filename);
+    /* User might have trailing slash in php.ini... */
+    return (ereg_replace('/+', '/', $tmp_file) == $filename);
+}
+
+if (is_uploaded_file($userfile)) {
+    copy($userfile, "/place/to/put/uploaded/file");
+} else {
+    echo "Possible file upload attack: filename '$userfile'.";
+}
+?>
+     
+

The PHP script which receives the uploaded file should implement + whatever logic is necessary for determining what should be done + with the uploaded file. You can for example use the + $file_size variable to throw away any files + that are either too small or too big. You could use the + $file_type variable to throw away any files + that didn't match a certain type criteria. Whatever the logic, + you should either delete the file from the temporary directory or + move it elsewhere. +

The file will be deleted from the temporary directory at the end + of the request if it has not been moved away or renamed. +


PrevHomeNext
CookiesUpCommon Pitfalls
\ No newline at end of file diff --git a/features.file-upload.put-method.html b/features.file-upload.put-method.html new file mode 100644 index 0000000..f5aaebf --- /dev/null +++ b/features.file-upload.put-method.html @@ -0,0 +1,259 @@ +PUT method support
PHP Manual
PrevChapter 19. Handling file uploadsNext

PUT method support

PHP provides support for the HTTP PUT method used by clients such + as Netscape Composer and W3C Amaya. PUT requests are much simpler + than a file upload and they look something like this: +


PUT /path/filename.html HTTP/1.1
+     

+

This would normally mean that the remote client would like to save + the content that follows as: /path/filename.html in your web tree. + It is obviously not a good idea for Apache or PHP to automatically + let everybody overwrite any files in your web tree. So, to handle + such a request you have to first tell your web server that you + want a certain PHP script to handle the request. In Apache you do + this with the Script directive. It can be + placed almost anywhere in your Apache configuration file. A + common place is inside a <Directory> block or perhaps inside + a <Virtualhost> block. A line like this would do the trick: +


Script PUT /put.php3
+     

+

This tells Apache to send all PUT requests for URIs that match the + context in which you put this line to the put.php3 script. This + assumes, of course, that you have PHP enabled for the .php3 + extension and PHP is active. +

Inside your put.php3 file you would then do something like this: +


<? copy($PHP_UPLOADED_FILE_NAME,$DOCUMENT_ROOT.$REQUEST_URI); ?>
+    

+

This would copy the file to the location requested by the remote + client. You would probably want to perform some checks and/or + authenticate the user before performing this file copy. The only + trick here is that when PHP sees a PUT-method request it stores + the uploaded file in a temporary file just like those handled but + the POST-method. + When the request ends, this temporary file is deleted. So, your + PUT handling PHP script has to copy that file somewhere. The + filename of this temporary file is in the $PHP_PUT_FILENAME + variable, and you can see the suggested destination filename in + the $REQUEST_URI (may vary on non-Apache web servers). This + destination filename is the one that the remote client specified. + You do not have to listen to this client. You could, for example, + copy all uploaded files to a special uploads directory. +


PrevHomeNext
Uploading multiple filesUpUsing remote files
\ No newline at end of file diff --git a/features.html b/features.html new file mode 100644 index 0000000..f585785 --- /dev/null +++ b/features.html @@ -0,0 +1,183 @@ +Features
PHP Manual
PrevNext

III. Features

Table of Contents
15. Error Handling
16. Creating and manipulating images
17. HTTP authentication with PHP
18. Cookies
19. Handling file uploads
20. Using remote files
21. Connection handling
22. Persistent Database Connections

PrevHomeNext
Spotting References Error Handling
\ No newline at end of file diff --git a/features.http-auth.html b/features.http-auth.html new file mode 100644 index 0000000..02bcbc2 --- /dev/null +++ b/features.http-auth.html @@ -0,0 +1,304 @@ +HTTP authentication with PHP
PHP Manual
PrevNext

Chapter 17. HTTP authentication with PHP

The HTTP Authentication hooks in PHP are only available when it is + running as an Apache module and is hence not available in the CGI version. + In an Apache module PHP script, it is possible to use the + Header() function to send an "Authentication Required" + message to the client browser causing it to pop up a Username/Password + input window. Once the user has filled in a username and a password, + the URL containing the PHP script will be called again with the variables, + $PHP_AUTH_USER, $PHP_AUTH_PW and $PHP_AUTH_TYPE set to the user + name, password and authentication type respectively. Only "Basic" + authentication is supported at this point. See the Header() + function for more information.

An example script fragment which would force client authentication + on a page would be the following: + +

Example 17-1. HTTP Authentication example


<?php
+  if(!isset($PHP_AUTH_USER)) {
+    Header("WWW-Authenticate: Basic realm=\"My Realm\"");
+    Header("HTTP/1.0 401 Unauthorized");
+    echo "Text to send if user hits Cancel button\n";
+    exit;
+  } else {
+    echo "Hello $PHP_AUTH_USER.<P>";
+    echo "You entered $PHP_AUTH_PW as your password.<P>";
+  }
+?>
+    

Instead of simply printing out the $PHP_AUTH_USER and + $PHP_AUTH_PW, you would probably want to check the username and + password for validity. Perhaps by sending a query to a database, + or by looking up the user in a dbm file.

Watch out for buggy Internet Explorer browsers out there. They + seem very picky about the order of the headers. Sending the + WWW-Authenticate header before the + HTTP/1.0 401 header seems to do the trick + for now.

In order to prevent someone from writing a script which reveals + the password for a page that was authenticated through a + traditional external mechanism, the PHP_AUTH variables will not be + set if external authentication is enabled for that particular + page. In this case, the $REMOTE_USER variable can be used to + identify the externally-authenticated user.

Note, however, that the above does not prevent someone who + controls a non-authenticated URL from stealing passwords from + authenticated URLs on the same server.

Both Netscape and Internet Explorer will clear the local browser + window's authentication cache for the realm upon receiving a + server response of 401. This can effectively "log out" a user, + forcing them to re-enter their username and password. Some people + use this to "time out" logins, or provide a "log-out" button.

Example 17-2. HTTP Authentication example forcing a new name/password


<?php
+  function  authenticate()  {
+      Header( "WWW-authenticate: basic  realm=\"Test  Authentication  System\"");
+      Header( "HTTP/1.0  401  Unauthorized");
+      echo  "You  must  enter  a  valid  login  ID  and  password  to  access  this  resource\n";
+      exit;
+  }
+
+  if(!isset($PHP_AUTH_USER)  ||  ($SeenBefore ==  1  &&  !strcmp($OldAuth,  $PHP_AUTH_USER))  )  {
+    authenticate();
+  }  
+  else  {
+    echo  "Welcome:  $PHP_AUTH_USER<BR>";
+    echo  "Old:  $OldAuth";
+    echo  "<FORM  ACTION=\"$PHP_SELF\"  METHOD=POST>\n";
+    echo  "<INPUT  TYPE=HIDDEN  NAME=\"SeenBefore\"  VALUE=\"1\">\n";
+    echo  "<INPUT  TYPE=HIDDEN  NAME=\"OldAuth\"  VALUE=\"$PHP_AUTH_USER\">\n";
+    echo  "<INPUT  TYPE=Submit  VALUE=\"Re  Authenticate\">\n";
+    echo  "</FORM>\n";
+
+}
+?>
+   

This behavior is not required by the HTTP Basic authentication + standard, so you should never depend on this. Testing with Lynx + has shown that Lynx does not clear the authentication credentials + with a 401 server response, so pressing back and then forward + again will open the resource (as long as the credential + requirements haven't changed).

Also note that this does not work using Microsoft's IIS server and + the CGI version of PHP due to a limitation of IIS.


PrevHomeNext
Creating and manipulating imagesUpCookies
\ No newline at end of file diff --git a/features.images.html b/features.images.html new file mode 100644 index 0000000..d7da9ab --- /dev/null +++ b/features.images.html @@ -0,0 +1,200 @@ +Creating and manipulating images
PHP Manual
PrevNext

Chapter 16. Creating and manipulating images

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. +

Example 16-1. GIF creation with PHP


<?php
+    Header("Content-type: image/gif");
+    $string=implode($argv," ");
+    $im = imagecreatefromgif("images/button1.gif");
+    $orange = ImageColorAllocate($im, 220, 210, 60);
+    $px = (imagesx($im)-7.5*strlen($string))/2;
+    ImageString($im,3,$px,9,$string,$orange);
+    ImageGif($im);
+    ImageDestroy($im);
+?>
+    
+ + This example would be called from a page with a tag like: <img + src="button.php?text"> The above button.php script + then takes this "text" string an overlays it on top of a + base image which in this case is "images/button1.gif" + 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. +


PrevHomeNext
Error HandlingUpHTTP authentication with PHP
\ No newline at end of file diff --git a/features.persistent-connections.html b/features.persistent-connections.html new file mode 100644 index 0000000..4019a90 --- /dev/null +++ b/features.persistent-connections.html @@ -0,0 +1,257 @@ +Persistent Database Connections
PHP Manual
PrevNext

Chapter 22. Persistent Database Connections

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). +

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 not give + you an ability to open 'user sessions' on the same SQL link, they + do not 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 any + functionality that wasn't possible with their non-persistent + brothers. +

Why? +

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. +

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. +

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. +

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. +

If persistent connections don't have any added functionality, what + are they good for? +

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. +

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. +

An important summary. Persistent connections were designed to have + one-to-one mapping to regular connections. That means that you + should always be able to replace persistent + connections with non-persistent connections, and it won't change + the way your script behaves. It may (and + probably will) change the efficiency of the script, but not its + behavior! +


PrevHomeNext
Connection handlingUpFunction Reference
\ No newline at end of file diff --git a/features.remote-files.html b/features.remote-files.html new file mode 100644 index 0000000..8783038 --- /dev/null +++ b/features.remote-files.html @@ -0,0 +1,329 @@ +Using remote files
PHP Manual
PrevNext

Chapter 20. Using remote files

As long as support for the "URL fopen wrapper" is enabled when + you configure PHP (which it is unless you explicitly pass the + --disable-url-fopen-wrapper flag to configure), + you can use HTTP and FTP URLs with most functions that take a + filename as a parameter, including the require() + and include() statements. +

Note: + You can't use remote files in include() and + require() statements on Windows. +

+

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. +

Example 20-1. Getting the title of a remote page


+<?php
+$file = fopen ("http://www.php.net/", "r");
+if (!$file) {
+    echo "<p>Unable to open remote file.\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];
+        break;
+    }
+}
+fclose($file);
+?>
+
+    
+

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.) +

Example 20-2. Storing data on a remote server


+<?php
+$file = fopen ("ftp://ftp.php.net/incoming/outputfile", "w");
+if (!$file) {
+    echo "<p>Unable to open remote file for writing.\n";
+    exit;
+}
+/* Write the data here. */
+fputs ($file, "$HTTP_USER_AGENT\n");
+fclose ($file);
+?>
+  
+    
+

Note: + 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 + syslog(). +

+


PrevHomeNext
PUT method supportUpConnection handling
\ No newline at end of file diff --git a/funcref.html b/funcref.html new file mode 100644 index 0000000..a5300d5 --- /dev/null +++ b/funcref.html @@ -0,0 +1,513 @@ +Function Reference
PHP Manual
PrevNext

IV. Function Reference

Table of Contents
I. Apache-specific Functions
II. Array Functions
III. Aspell functions
IV. BCMath Arbitrary Precision Mathematics Functions
V. Calendar functions
VI. CCVS API Functions
VII. COM support functions for Windows
VIII. Class/Object Functions
IX. ClibPDF functions
X. CURL, Client URL Library Functions
XI. Cybercash payment functions
XII. Database (dbm-style) abstraction layer functions
XIII. Date and Time functions
XIV. dBase functions
XV. DBM Functions
XVI. Directory functions
XVII. DOM XML functions
XVIII. Error Handling and Logging Functions
XIX. filePro functions
XX. Filesystem functions
XXI. Forms Data Format functions
XXII. FTP functions
XXIII. Function Handling functions
XXIV. GNU Gettext
XXV. HTTP functions
XXVI. Hyperwave functions
XXVII. ICAP Functions
XXVIII. Image functions
XXIX. IMAP, POP3 and NNTP functions
XXX. Informix functions
XXXI. InterBase functions
XXXII. LDAP functions
XXXIII. Mail functions
XXXIV. Mathematical Functions
XXXV. MCAL functions
XXXVI. Mcrypt Encryption Functions
XXXVII. Mhash Functions
XXXVIII. Microsoft SQL Server functions
XXXIX. Miscellaneous functions
XL. mSQL functions
XLI. MySQL functions
XLII. Network Functions
XLIII. Unified ODBC functions
XLIV. Oracle 8 functions
XLV. Oracle functions
XLVI. Output Control Functions
XLVII. PDF functions
XLVIII. Verisign Payflow Pro functions
XLIX. PHP options & information
L. POSIX functions
LI. PostgreSQL functions
LII. Program Execution functions
LIII. Pspell Functions
LIV. GNU Readline
LV. GNU Recode functions
LVI. Regular Expression Functions (Perl-Compatible)
LVII. Regular Expression Functions (POSIX Extended)
LVIII. Satellite CORBA client extension
LIX. Semaphore and Shared Memory Functions
LX. Session handling functions
LXI. Shared Memory Functions
LXII. Shockwave Flash functions
LXIII. SNMP functions
LXIV. Socket functions
LXV. String functions
LXVI. Sybase functions
LXVII. URL Functions
LXVIII. Variable Functions
LXIX. Vmailmgr functions
LXX. WDDX functions
LXXI. XML parser functions
LXXII. YAZ functions
LXXIII. YP/NIS Functions
LXXIV. Zlib Compression Functions

PrevHomeNext
Persistent Database Connections Apache-specific Functions
\ No newline at end of file diff --git a/function.abs.html b/function.abs.html new file mode 100644 index 0000000..ab95421 --- /dev/null +++ b/function.abs.html @@ -0,0 +1,173 @@ +abs
PHP Manual
PrevNext

abs

(PHP3 , PHP4 )

abs -- Absolute value

Description

mixed abs (mixed number)

Returns the absolute value of number. If the argument number is + float, return type is also float, otherwise it is int. +


PrevHomeNext
Mathematical FunctionsUpacos
\ No newline at end of file diff --git a/function.accept-connect.html b/function.accept-connect.html new file mode 100644 index 0000000..4b071ac --- /dev/null +++ b/function.accept-connect.html @@ -0,0 +1,294 @@ +accept_connect
PHP Manual
PrevNext

accept_connect

(PHP4 >= 4.0.2)

accept_connect -- Accepts a connection on a socket

Description

int accept_connect (int socket)

After the socket socket has been created + using socket(), bound to a name with + bind(), and told to listen for connections + with listen(), this function will accept + incoming connections on that socket. Once a successful connection + is made, a new socket descriptor is returned, which may be used + for communication. If there are multiple connections queued on + the socket, the first will be used. If there are no pending + connections, accept_connect() will block until + a connection becomes present. If socket + has been made non-blocking using + socket_set_blocking() or + set_nonblock(), an error code will be + returned. +

The socket descriptor returned by + accept_connect() may not be used to accept new + connections. The original listening socket + socket, however, remains open and may be + reused. +

Returns a new socket descriptor on success, or a negative error + code on failure. This code may be passed to + strerror() to get a textual explanation of the + error. +

See also + bind(), + connect(), + listen(), + socket(), + socket_get_status(), and + strerror(). +


PrevHomeNext
Socket functionsUpbind
\ No newline at end of file diff --git a/function.acos.html b/function.acos.html new file mode 100644 index 0000000..3a03294 --- /dev/null +++ b/function.acos.html @@ -0,0 +1,187 @@ +acos
PHP Manual
PrevNext

acos

(PHP3 , PHP4 )

acos -- Arc cosine

Description

float acos (float arg)

Returns the arc cosine of arg in radians. +

See also asin() and atan(). +


PrevHomeNext
absUpasin
\ No newline at end of file diff --git a/function.ada-afetch.html b/function.ada-afetch.html new file mode 100644 index 0000000..a015465 --- /dev/null +++ b/function.ada-afetch.html @@ -0,0 +1,152 @@ +ada_afetch
PHP Manual
PrevNext

ada_afetch

ada_afetch -- fetch a result row into an array

Description

See odbc_fetch_into()


PrevHomeNext
Adabas D functionsUpada_autocommit
\ No newline at end of file diff --git a/function.ada-autocommit.html b/function.ada-autocommit.html new file mode 100644 index 0000000..1727b50 --- /dev/null +++ b/function.ada-autocommit.html @@ -0,0 +1,152 @@ +ada_autocommit
PHP Manual
PrevNext

ada_autocommit

ada_autocommit -- toggle autocommit behaviour

Description

See odbc_autocommit().


PrevHomeNext
ada_afetchUpada_close
\ No newline at end of file diff --git a/function.ada-close.html b/function.ada-close.html new file mode 100644 index 0000000..72be008 --- /dev/null +++ b/function.ada-close.html @@ -0,0 +1,152 @@ +ada_close
PHP Manual
PrevNext

ada_close

ada_close -- close a connection to an Adabas D server

Description

See odbc_close().


PrevHomeNext
ada_autocommitUpada_commit
\ No newline at end of file diff --git a/function.ada-commit.html b/function.ada-commit.html new file mode 100644 index 0000000..9628546 --- /dev/null +++ b/function.ada-commit.html @@ -0,0 +1,152 @@ +ada_commit
PHP Manual
PrevNext

ada_commit

ada_commit -- commit a transaction

Description

See odbc_commit()


PrevHomeNext
ada_closeUpada_connect
\ No newline at end of file diff --git a/function.ada-connect.html b/function.ada-connect.html new file mode 100644 index 0000000..db25a58 --- /dev/null +++ b/function.ada-connect.html @@ -0,0 +1,152 @@ +ada_connect
PHP Manual
PrevNext

ada_connect

ada_connect -- connect to an Adabas D datasource

Description

See odbc_connect().


PrevHomeNext
ada_commitUpada_exec
\ No newline at end of file diff --git a/function.ada-exec.html b/function.ada-exec.html new file mode 100644 index 0000000..19efded --- /dev/null +++ b/function.ada-exec.html @@ -0,0 +1,158 @@ +ada_exec
PHP Manual
PrevNext

ada_exec

ada_exec -- prepare and execute a SQL statement

Description

See odbc_exec() or odbc_do().


PrevHomeNext
ada_connectUpada_fetchrow
\ No newline at end of file diff --git a/function.ada-fetchrow.html b/function.ada-fetchrow.html new file mode 100644 index 0000000..36f619c --- /dev/null +++ b/function.ada-fetchrow.html @@ -0,0 +1,152 @@ +ada_fetchrow
PHP Manual
PrevNext

ada_fetchrow

ada_fetchrow -- fetch a row from a result

Description

See odbc_fetch_row().


PrevHomeNext
ada_execUpada_fieldname
\ No newline at end of file diff --git a/function.ada-fieldname.html b/function.ada-fieldname.html new file mode 100644 index 0000000..d6547de --- /dev/null +++ b/function.ada-fieldname.html @@ -0,0 +1,152 @@ +ada_fieldname
PHP Manual
PrevNext

ada_fieldname

ada_fieldname -- get the columnname

Description

See odbc_field_name().


PrevHomeNext
ada_fetchrowUpada_fieldnum
\ No newline at end of file diff --git a/function.ada-fieldnum.html b/function.ada-fieldnum.html new file mode 100644 index 0000000..00d6224 --- /dev/null +++ b/function.ada-fieldnum.html @@ -0,0 +1,149 @@ +ada_fieldnum
PHP Manual
PrevNext

ada_fieldnum

ada_fieldnum -- get column number

Description

See odbc_field_num().


PrevHomeNext
ada_fieldnameUpada_fieldtype
\ No newline at end of file diff --git a/function.ada-fieldtype.html b/function.ada-fieldtype.html new file mode 100644 index 0000000..900c5ae --- /dev/null +++ b/function.ada-fieldtype.html @@ -0,0 +1,152 @@ +ada_fieldtype
PHP Manual
PrevNext

ada_fieldtype

ada_fieldtype -- get the datatype of a field

Description

See odbc_field_type().


PrevHomeNext
ada_fieldnumUpada_freeresult
\ No newline at end of file diff --git a/function.ada-freeresult.html b/function.ada-freeresult.html new file mode 100644 index 0000000..8f83822 --- /dev/null +++ b/function.ada-freeresult.html @@ -0,0 +1,152 @@ +ada_freeresult
PHP Manual
PrevNext

ada_freeresult

ada_freeresult -- >free resources associated with a result

Description

See odbc_free_result().


PrevHomeNext
ada_fieldtypeUpada_numfields
\ No newline at end of file diff --git a/function.ada-numfields.html b/function.ada-numfields.html new file mode 100644 index 0000000..380d51a --- /dev/null +++ b/function.ada-numfields.html @@ -0,0 +1,152 @@ +ada_numfields
PHP Manual
PrevNext

ada_numfields

ada_numfields -- get the number of columns in a result

Description

See odbc_num_fields().


PrevHomeNext
ada_freeresultUpada_numrows
\ No newline at end of file diff --git a/function.ada-numrows.html b/function.ada-numrows.html new file mode 100644 index 0000000..3bc649d --- /dev/null +++ b/function.ada-numrows.html @@ -0,0 +1,152 @@ +ada_numrows
PHP Manual
PrevNext

ada_numrows

ada_numrows -- number of rows in a result

Description

See odbc_num_rows().


PrevHomeNext
ada_numfieldsUpada_result
\ No newline at end of file diff --git a/function.ada-result.html b/function.ada-result.html new file mode 100644 index 0000000..ec71c88 --- /dev/null +++ b/function.ada-result.html @@ -0,0 +1,152 @@ +ada_result
PHP Manual
PrevNext

ada_result

ada_result -- get data from results

Description

See odbc_result().


PrevHomeNext
ada_numrowsUpada_resultall
\ No newline at end of file diff --git a/function.ada-resultall.html b/function.ada-resultall.html new file mode 100644 index 0000000..82b912a --- /dev/null +++ b/function.ada-resultall.html @@ -0,0 +1,152 @@ +ada_resultall
PHP Manual
PrevNext

ada_resultall

ada_resultall -- print result as HTML table

Description

See odbc_result_all().


PrevHomeNext
ada_resultUpada_rollback
\ No newline at end of file diff --git a/function.ada-rollback.html b/function.ada-rollback.html new file mode 100644 index 0000000..bd5a1be --- /dev/null +++ b/function.ada-rollback.html @@ -0,0 +1,152 @@ +ada_rollback
PHP Manual
PrevNext

ada_rollback

ada_rollback -- rollback a transaction

Description

See odbc_rollback().


PrevHomeNext
ada_resultallUpApache-specific functions
\ No newline at end of file diff --git a/function.addcslashes.html b/function.addcslashes.html new file mode 100644 index 0000000..8c723ff --- /dev/null +++ b/function.addcslashes.html @@ -0,0 +1,282 @@ +AddCSlashes
PHP Manual
PrevNext

AddCSlashes

(PHP4 >= 4.0b4)

AddCSlashes -- Quote string with slashes in a C style

Description

string addcslashes (string str, string charlist)

Returns a string with backslashes before characters that are + listed in charlist parameter. It escapes + \n, \r etc. in C-like + style, characters with ASCII code lower than 32 and higher than + 126 are converted to octal representation. Be carefull when + escaping alphanumeric characters. You can specify a range in + charlist like "\0..\37", which would + escape all characters with ASCII code between 0 and 31. +

Example 1. Addcslashes() example


$escaped = addcslashes ($not_escaped, "\0..\37!@\177..\377");
+      
+

Note: + Added in PHP4b3-dev.

+

See also stripcslashes(), + stripslashes(), + htmlspecialchars(), + htmlspecialchars(), and + quotemeta(). +


PrevHomeNext
String functionsUpAddSlashes
\ No newline at end of file diff --git a/function.addslashes.html b/function.addslashes.html new file mode 100644 index 0000000..a47f530 --- /dev/null +++ b/function.addslashes.html @@ -0,0 +1,208 @@ +AddSlashes
PHP Manual
PrevNext

AddSlashes

(PHP3 , PHP4 )

AddSlashes -- Quote string with slashes

Description

string addslashes (string str)

Returns a string with backslashes before characters that need + to be quoted in database queries etc. These characters are + single quote ('), double quote + ("), backslash (\) + and NUL (the null byte). +

See also stripslashes(), + htmlspecialchars(), and + quotemeta(). +


PrevHomeNext
AddCSlashesUpbin2hex
\ No newline at end of file diff --git a/function.apache-lookup-uri.html b/function.apache-lookup-uri.html new file mode 100644 index 0000000..19c949f --- /dev/null +++ b/function.apache-lookup-uri.html @@ -0,0 +1,288 @@ +apache_lookup_uri
PHP Manual
PrevNext

apache_lookup_uri

(PHP3 >= 3.0.4, PHP4 )

apache_lookup_uri --  + Perform a partial request for the specified URI and return all + info about it +

Description

class apache_lookup_uri (string filename)

This performs a partial request for a URI. It goes just far + enough to obtain all the important information about the given + resource and returns this information in a class. The properties + of the returned class are: +

status
the_request
status_line
method
content_type
handler
uri
filename
path_info
args
boundary
no_cache
no_local_copy
allowed
send_bodyct
bytes_sent
byterange
clength
unparsed_uri
mtime
request_time

+

Note: + Apache_lookup_uri() only works when PHP + is installed as an Apache module. +


PrevHomeNext
Apache-specific FunctionsUpapache_note
\ No newline at end of file diff --git a/function.apache-note.html b/function.apache-note.html new file mode 100644 index 0000000..c97495a --- /dev/null +++ b/function.apache-note.html @@ -0,0 +1,198 @@ +apache_note
PHP Manual
PrevNext

apache_note

(PHP3 >= 3.0.2, PHP4 )

apache_note -- Get and set apache request notes

Description

string apache_note (string note_name [, string + note_value])

Apache_note() is an Apache-specific function + which gets and sets values in a request's + notes table. If called with one argument, it + returns the current value of note + note_name. If called with two arguments, it + sets the value of note note_name to + note_value and returns the previous value of + note note_name. +


PrevHomeNext
apache_lookup_uriUpgetallheaders
\ No newline at end of file diff --git a/function.array-count-values.html b/function.array-count-values.html new file mode 100644 index 0000000..bf6d2a6 --- /dev/null +++ b/function.array-count-values.html @@ -0,0 +1,228 @@ +array_count_values
PHP Manual
PrevNext

array_count_values

(PHP4 >= 4.0b4)

array_count_values -- Counts all the values of an array

Description

array array_count_values (array input)

Array_count_values() returns an array using + the values of the input array as keys and + their frequency in input as values. +

Example 1. Array_count_values() example


$array = array (1, "hello", 1, "world", "hello");
+array_count_values ($array); // returns array (1=>2, "hello"=>2, "world"=>1)
+      
+


PrevHomeNext
arrayUparray_diff
\ No newline at end of file diff --git a/function.array-diff.html b/function.array-diff.html new file mode 100644 index 0000000..5127ff7 --- /dev/null +++ b/function.array-diff.html @@ -0,0 +1,245 @@ +array_diff
PHP Manual
PrevNext

array_diff

(PHP4 >= 4.0.1)

array_diff -- Computes the difference of arrays

Description

array array_diff (array array1, array array2 [, array + ...])

Array_diff() returns an array + containing all the values of array1 + that are not present in any of the other arguments. + Note that keys are preserved. +

Example 1. Array_diff() example


$array1 = array ("a" => "green", "red", "blue");
+$array2 = array ("b" => "green", "yellow", "red");
+$result = array_diff ($array1, $array2);
+      
+

This makes $result have array + ("blue"); +

See also array_intersect(). +


PrevHomeNext
array_count_valuesUparray_flip
\ No newline at end of file diff --git a/function.array-flip.html b/function.array-flip.html new file mode 100644 index 0000000..6e31bf8 --- /dev/null +++ b/function.array-flip.html @@ -0,0 +1,216 @@ +array_flip
PHP Manual
PrevNext

array_flip

(PHP4 >= 4.0b4)

array_flip -- Flip all the values of an array

Description

array array_flip (array trans)

Array_flip() returns an array in flip order. +

Example 1. Array_flip() example


$trans = array_flip ($trans);
+$original = strtr ($str, $trans);
+      
+


PrevHomeNext
array_diffUparray_intersect
\ No newline at end of file diff --git a/function.array-intersect.html b/function.array-intersect.html new file mode 100644 index 0000000..75a7ee1 --- /dev/null +++ b/function.array-intersect.html @@ -0,0 +1,245 @@ +array_intersect
PHP Manual
PrevNext

array_intersect

(PHP4 >= 4.0.1)

array_intersect -- Computes the intersection of arrays

Description

array array_intersect (array array1, array array2 [, array + ...])

Array_intersect() returns an array + containing all the values of array1 + that are present in all the arguments. + Note that keys are preserved. +

Example 1. Array_intersect() example


$array1 = array ("a" => "green", "red", "blue");
+$array2 = array ("b" => "green", "yellow", "red");
+$result = array_intersect ($array1, $array2);
+      
+

This makes $result have array ("a" + => "green", "red"); +

See also array_diff(). +


PrevHomeNext
array_flipUparray_keys
\ No newline at end of file diff --git a/function.array-keys.html b/function.array-keys.html new file mode 100644 index 0000000..0736b3d --- /dev/null +++ b/function.array-keys.html @@ -0,0 +1,312 @@ +array_keys
PHP Manual
PrevNext

array_keys

(PHP4 )

array_keys -- Return all the keys of an array

Description

array array_keys (array input [, mixed + search_value])

Array_keys() returns the keys, numeric and + string, from the input array. +

If the optional search_value is specified, + then only the keys for that value are returned. Otherwise, all + the keys from the input are returned. +

Example 1. Array_keys() example


$array = array (0 => 100, "color" => "red");
+array_keys ($array);       // returns array (0, "color")
+
+$array = array ("blue", "red", "green", "blue", "blue");
+array_keys ($array, "blue");  //  returns array (0, 3, 4) 
+      
+

Note: + This function was added to PHP 4, below is an implementation for + those still using PHP 3. +

Example 2. + Implementation of array_keys() for PHP 3 + users +


function array_keys ($arr, $term="") {
+    $t = array();
+    while (list($k,$v) = each($arr)) {
+        if ($term && $v != $term)
+            continue;
+            $t[] = $k;
+        }
+        return $t;
+}
+       
+

See also array_values(). +


PrevHomeNext
array_intersectUparray_merge
\ No newline at end of file diff --git a/function.array-merge-recursive.html b/function.array-merge-recursive.html new file mode 100644 index 0000000..abfeb06 --- /dev/null +++ b/function.array-merge-recursive.html @@ -0,0 +1,244 @@ +array_merge_recursive
PHP Manual
PrevNext

array_merge_recursive

(PHP4 >= 4.0.1)

array_merge_recursive -- Merge two or more arrays recursively

Description

array array_merge_recursive (array array1, array array2 [, array + ...])

Array_merge_recursive() merges the elements of + two or more arrays together so that the values of one are appended + to the end of the previous one. It returns the resulting array. +

If the input arrays have the same string keys, then the values for + these keys are merged together into an array, and this is done + recursively, so that if one of the values is an array itself, the + function will merge it with a corresponding entry in another array + too. If, however, the arrays have the same numeric key, the later + value will not overwrite the original value, but will be appended. +

Example 1. Array_merge_recursive() example


$ar1 = array ("color" => array ("favorite" => "red"), 5);
+$ar2 = array (10, "color" => array ("favorite" => "green", "blue"));
+$result = array_merge_recursive ($ar1, $ar2);
+      
+

Resulting array will be array ("color" => array + ("favorite" => array ("red", "green"), "blue"), 5, 10). +

See also array_merge(). +


PrevHomeNext
array_mergeUparray_multisort
\ No newline at end of file diff --git a/function.array-merge.html b/function.array-merge.html new file mode 100644 index 0000000..efdd578 --- /dev/null +++ b/function.array-merge.html @@ -0,0 +1,242 @@ +array_merge
PHP Manual
PrevNext

array_merge

(PHP4 )

array_merge -- Merge two or more arrays

Description

array array_merge (array array1, array array2 [, array + ...])

Array_merge() merges the elements of two or + more arrays together so that the values of one are appended to + the end of the previous one. It returns the resulting array. +

If the input arrays have the same string keys, then the later + value for that key will overwrite the previous one. If, however, + the arrays have the same numeric key, the later value will not + overwrite the original value, but will be appended. +

Example 1. array_merge() example


$array1 = array ("color" => "red", 2, 4);
+$array2 = array ("a", "b", "color" => "green", "shape" => "trapezoid", 4);
+array_merge ($array1, $array2);
+      
+

Resulting array will be array("color" => "green", 2, 4, + "a", "b", "shape" => "trapezoid", 4). +

See also array_merge_recursive(). +


PrevHomeNext
array_keysUparray_merge_recursive
\ No newline at end of file diff --git a/function.array-multisort.html b/function.array-multisort.html new file mode 100644 index 0000000..417c014 --- /dev/null +++ b/function.array-multisort.html @@ -0,0 +1,328 @@ +array_multisort
PHP Manual
PrevNext

array_multisort

(PHP4 >= 4.0b4)

array_multisort -- Sort multiple or multi-dimensional arrays

Description

bool array_multisort (array ar1 [, mixed + arg [, mixed + ... [, array + ...]]])

Array_multisort() can be used to sort several + arrays at once or a multi-dimensional array according by one of + more dimensions. It maintains key association when sorting. +

The input arrays are treated as columns of a table to be sorted + by rows - this resembles the functionality of SQL ORDER BY + clause. The first array is the primary one to sort by. The rows + (values) in that array that compare the same are sorted by the + next input array, and so on. +

The argument structure of this function is a bit unusual, but + flexible. The very first argument has to be an + array. Subsequently, each argument can be either an array or a + sorting flag from the following lists. +

Sorting order flags: +

  • SORT_ASC - sort in ascending order

  • SORT_DESC - sort in descending order

+

Sorting type flags: +

  • SORT_REGULAR - compare items normally

  • SORT_NUMERIC - compare items numerically

  • SORT_STRING - compare items as strings

+

No two sorting flags of the same type can be specified after each + array. The sortings flags specified after an array argument apply + only to that array - they are reset to default SORT_ASC and + SORT_REGULAR after before each new array argument. +

Returns true on success, false on failure. +

Example 1. Sorting multiple arrays


$ar1 = array ("10", 100, 100, "a");
+$ar2 = array (1, 3, "2", 1);
+array_multisort ($ar1, $ar2);
+      
+

In this example, after sorting, the first array will contain 10, + "a", 100, 100. The second array will contain 1, 1, 2, "3". The + entries in the second array corresponding to the identical + entries in the first array (100 and 100) were sorted as well. +

Example 2. Sorting multi-dimensional array


$ar = array (array ("10", 100, 100, "a"), array (1, 3, "2", 1));
+array_multisort ($ar[0], SORT_ASC, SORT_STRING, 
+                 $ar[1], SORT_NUMERIC, SORT_DESC);
+      
+

In this example, after sorting, the first array will contain 10, + 100, 100, "a" (it was sorted as strings in ascending order), and + the second one will contain 1, 3, "2", 1 (sorted as numbers, in + descending order). +


PrevHomeNext
array_merge_recursiveUparray_pad
\ No newline at end of file diff --git a/function.array-pad.html b/function.array-pad.html new file mode 100644 index 0000000..2f1a444 --- /dev/null +++ b/function.array-pad.html @@ -0,0 +1,264 @@ +array_pad
PHP Manual
PrevNext

array_pad

(PHP4 >= 4.0b4)

array_pad --  + Pad array to the specified length with a value +

Description

array array_pad (array input, int pad_size, mixed pad_value)

Array_pad() returns a copy of the + input padded to size specified by + pad_size with value + pad_value. If + pad_size is positive then the array is + padded on the right, if it's negative then on the left. If the + absolute value of pad_size is less than or + equal to the length of the input then no + padding takes place. +

Example 1. Array_pad() example


$input = array (12, 10, 9);
+
+$result = array_pad ($input, 5, 0);
+// result is array (12, 10, 9, 0, 0)
+
+$result = array_pad ($input, -7, -1);
+// result is array (-1, -1, -1, -1, 12, 10, 9)
+
+$result = array_pad ($input, 2, "noop");
+// not padded
+      
+


PrevHomeNext
array_multisortUparray_pop
\ No newline at end of file diff --git a/function.array-pop.html b/function.array-pop.html new file mode 100644 index 0000000..408e7a5 --- /dev/null +++ b/function.array-pop.html @@ -0,0 +1,262 @@ +array_pop
PHP Manual
PrevNext

array_pop

(PHP4 )

array_pop -- Pop the element off the end of array

Description

mixed array_pop (array array)

Array_pop() pops and returns the last value of + the array, shortening the + array by one element. +

Example 1. Array_pop() example


$stack = array ("orange", "apple", "raspberry");
+$fruit = array_pop ($stack);
+      
+

After this, $stack has only 2 elements: + "orange" and "apple", and $fruit has + "raspberry". +

See also array_push(), + array_shift(), and + array_unshift(). +


PrevHomeNext
array_padUparray_push
\ No newline at end of file diff --git a/function.array-push.html b/function.array-push.html new file mode 100644 index 0000000..3f74ce2 --- /dev/null +++ b/function.array-push.html @@ -0,0 +1,291 @@ +array_push
PHP Manual
PrevNext

array_push

(PHP4 )

array_push --  + Push one or more elements onto the end of array +

Description

int array_push (array array, mixed var [, mixed + ...])

Array_push() treats + array as a stack, and pushes the passed + variables onto the end of array. The + length of array increases by the number of + variables pushed. Has the same effect as: +

$array[] = $var;
+     
+ repeated for each var. +

Returns the new number of elements in the array. +

Example 1. Array_push() example


$stack = array (1, 2);
+array_push ($stack, "+", 3);
+      
+

This example would result in $stack having 4 + elements: 1, 2, "+", and 3. +

See also: array_pop(), + array_shift(), and + array_unshift(). +


PrevHomeNext
array_popUparray_rand
\ No newline at end of file diff --git a/function.array-rand.html b/function.array-rand.html new file mode 100644 index 0000000..bfe5c0d --- /dev/null +++ b/function.array-rand.html @@ -0,0 +1,255 @@ +array_rand
PHP Manual
PrevNext

array_rand

(PHP4 >= 4.0.0)

array_rand --  + Pick one or more random entries out of an array +

Description

mixed array_rand (array input [, int + num_req])

Array_rand() is rather useful when you want to + pick one or more random entries out of an array. It takes an + input array and an optional argument + num_req which specifies how many entries you + want to pick - if not specified, it defaults to 1. +

If you are picking only one entry, array_rand() + returns the key for a random entry. Otherwise, it returns an array + of keys for the random entries. This is done so that you can pick + random keys as well as values out of the array. +

Don't forget to call srand() to seed the random + number generator. +

Example 1. Array_rand() example


srand ((double) microtime() * 10000000);
+$input = array ("Neo", "Morpheus", "Trinity", "Cypher", "Tank");
+$rand_keys = array_rand ($input, 2);
+print $input[$rand_keys[0]]."\n";
+print $input[$rand_keys[1]]."\n";
+      
+


PrevHomeNext
array_pushUparray_reverse
\ No newline at end of file diff --git a/function.array-reverse.html b/function.array-reverse.html new file mode 100644 index 0000000..0eb3015 --- /dev/null +++ b/function.array-reverse.html @@ -0,0 +1,235 @@ +array_reverse
PHP Manual
PrevNext

array_reverse

(PHP4 >= 4.0b4)

array_reverse --  + Return an array with elements in reverse order +

Description

array array_reverse (array array)

Array_reverse() takes input + array and returns a new array with the + order of the elements reversed. +

Example 1. Array_reverse() example


$input = array ("php", 4.0, array ("green", "red"));
+$result = array_reverse ($input);
+      
+

This makes $result have array + (array ("green", "red"), 4.0, "php"). +


PrevHomeNext
array_randUparray_shift
\ No newline at end of file diff --git a/function.array-shift.html b/function.array-shift.html new file mode 100644 index 0000000..6e941d5 --- /dev/null +++ b/function.array-shift.html @@ -0,0 +1,264 @@ +array_shift
PHP Manual
PrevNext

array_shift

(PHP4 )

array_shift --  + Pop an element off the beginning of array +

Description

mixed array_shift (array array)

Array_shift() shifts the first value of the + array off and returns it, shortening the + array by one element and moving everything + down. +

Example 1. Array_shift() example


$args = array ("-v", "-f");
+$opt = array_shift ($args);
+      
+

This would result in $args having one element + "-f" left, and $opt being "-v". +

See also array_unshift(), + array_push(), and + array_pop(). +


PrevHomeNext
array_reverseUparray_slice
\ No newline at end of file diff --git a/function.array-slice.html b/function.array-slice.html new file mode 100644 index 0000000..41d3474 --- /dev/null +++ b/function.array-slice.html @@ -0,0 +1,303 @@ +array_slice
PHP Manual
PrevNext

array_slice

(PHP4 )

array_slice -- Extract a slice of the array

Description

array array_slice (array array, int offset [, int + length])

Array_slice() returns a sequence of elements + from the array specified by the + offset and length + parameters. +

If offset is positive, the sequence will + start at that offset in the array. If + offset is negative, the sequence will + start that far from the end of the array. +

If length is given and is positive, then + the sequence will have that many elements in it. If + length is given and is negative then the + sequence will stop that many elements from the end of the + array. If it is omitted, then the sequence will have everything + from offset up until the end of the + array. +

Example 1. Array_slice() examples


$input = array ("a", "b", "c", "d", "e");
+
+$output = array_slice ($input, 2);      // returns "c", "d", and "e"
+$output = array_slice ($input, 2, -1);  // returns "c", "d"
+$output = array_slice ($input, -2, 1);  // returns "d"
+$output = array_slice ($input, 0, 3);   // returns "a", "b", and "c"
+      
+

See also array_splice(). +


PrevHomeNext
array_shiftUparray_splice
\ No newline at end of file diff --git a/function.array-splice.html b/function.array-splice.html new file mode 100644 index 0000000..af17cfc --- /dev/null +++ b/function.array-splice.html @@ -0,0 +1,404 @@ +array_splice
PHP Manual
PrevNext

array_splice

(PHP4 )

array_splice --  + Remove a portion of the array and replace it with something + else +

Description

array array_splice (array input, int offset [, int + length [, array + replacement]])

Array_splice() removes the elements designated + by offset and + length from the + input array, and replaces them with the + elements of the replacement array, if + supplied. +

If offset is positive then the start of + removed portion is at that offset from the beginning of the + input array. If + offset is negative then it starts that far + from the end of the input array. +

If length is omitted, removes everything + from offset to the end of the array. If + length is specified and is positive, then + that many elements will be removed. If + length is specified and is negative then + the end of the removed portion will be that many elements from + the end of the array. Tip: to remove everything from + offset to the end of the array when + replacement is also specified, use + count($input) for + length. +

If replacement array is specified, then + the removed elements are replaced with elements from this array. + If offset and + length are such that nothing is removed, + then the elements from the replacement + array are inserted in the place specified by the + offset. Tip: if the replacement is just + one element it is not necessary to put array() + around it, unless the element is an array itself. +

The following equivalences hold: +

array_push ($input, $x, $y)     array_splice ($input, count ($input), 0, 
+                                             array ($x, $y))
+array_pop ($input)              array_splice ($input, -1)
+array_shift ($input)            array_splice ($input, 0, 1)
+array_unshift ($input, $x, $y)  array_splice ($input, 0, 0, array ($x, $y))
+$a[$x] = $y                     array_splice ($input, $x, 1, $y)
+     
+

Returns the array consisting of removed elements. +

Example 1. Array_splice() examples


$input = array ("red", "green", "blue", "yellow");
+
+array_splice ($input, 2);      // $input is now array ("red", "green")
+array_splice ($input, 1, -1);  // $input is now array ("red", "yellow")
+array_splice ($input, 1, count($input), "orange");  
+                               // $input is now array ("red", "orange")
+array_splice ($input, -1, 1, array("black", "maroon")); 
+                               // $input is now array ("red", "green", 
+                               //          "blue", "black", "maroon")
+      
+

See also array_slice(). +


PrevHomeNext
array_sliceUparray_unique
\ No newline at end of file diff --git a/function.array-unique.html b/function.array-unique.html new file mode 100644 index 0000000..0e32b6f --- /dev/null +++ b/function.array-unique.html @@ -0,0 +1,234 @@ +array_unique
PHP Manual
PrevNext

array_unique

(PHP4 >= 4.0.1)

array_unique -- Removes duplicate values from an array

Description

array array_unique (array array)

Array_unique() takes input + array and returns a new array + without duplicate values. + Note that keys are preserved. +

Example 1. Array_unique() example


$input = array ("a" => "green", "red", "b" => "green", "blue", "red");
+$result = array_unique ($input);
+      
+

This makes $result have array ("a" => + "green", "red", "blue");. +


PrevHomeNext
array_spliceUparray_unshift
\ No newline at end of file diff --git a/function.array-unshift.html b/function.array-unshift.html new file mode 100644 index 0000000..1055be2 --- /dev/null +++ b/function.array-unshift.html @@ -0,0 +1,266 @@ +array_unshift
PHP Manual
PrevNext

array_unshift

(PHP4 )

array_unshift --  + Push one or more elements onto the beginning of array +

Description

int array_unshift (array array, mixed var [, mixed + ...])

Array_unshift() prepends passed elements to + the front of the array. Note that the list + of elements is prepended as a whole, so that the prepended + elements stay in the same order. +

Returns the new number of elements in the + array. +

Example 1. Array_unshift() example


$queue = array ("p1", "p3");
+array_unshift ($queue, "p4", "p5", "p6");
+      
+

This would result in $queue having 5 + elements: "p4", "p5", "p6", "p1", and "p3". +

See also array_shift(), + array_push(), and + array_pop(). +


PrevHomeNext
array_uniqueUparray_values
\ No newline at end of file diff --git a/function.array-values.html b/function.array-values.html new file mode 100644 index 0000000..f3dd23b --- /dev/null +++ b/function.array-values.html @@ -0,0 +1,282 @@ +array_values
PHP Manual
PrevNext

array_values

(PHP4 )

array_values -- Return all the values of an array

Description

array array_values (array input)

Array_values() returns all the values from the + input array. +

Example 1. Array_values() example


$array = array ("size" => "XL", "color" => "gold");
+array_values ($array);    // returns array ("XL", "gold")
+      
+

Note: + This function was added to PHP 4, below is an implementation for + those still using PHP 3. +

Example 2. + Implementation of array_values() for PHP 3 + users +


function array_values ($arr) {
+    $t = array();
+    while (list($k, $v) = each ($arr)) {
+        $t[] = $v;
+        return $t;
+    }
+}
+       
+


PrevHomeNext
array_unshiftUparray_walk
\ No newline at end of file diff --git a/function.array-walk.html b/function.array-walk.html new file mode 100644 index 0000000..6b741ad --- /dev/null +++ b/function.array-walk.html @@ -0,0 +1,362 @@ +array_walk
PHP Manual
PrevNext

array_walk

(PHP3 >= 3.0.3, PHP4 )

array_walk --  + Apply a user function to every member of an array +

Description

int array_walk (array arr, string func, mixed userdata)

Applies the function named by func to each + element of arr. + func will be passed array value as the + first parameter and array key as the second parameter. If + userdata is supplied, it will be passed as + the third parameter to the user function. +

If func requires more than two or three + arguments, depending on userdata, a + warning will be generated each time + array_walk() calls + func. These warnings may be suppressed by + prepending the '@' sign to the array_walk() + call, or by using error_reporting(). +

Note: + If func needs to be working with the + actual values of the array, specify that the first parameter of + func should be passed by reference. Then + any changes made to those elements will be made in the array + itself. +

Note: + Passing the key and userdata to func was + added in 4.0. +

In PHP 4 reset() needs to be called as + necessary since array_walk() does not reset + the array by default. +

Example 1. Array_walk() example


$fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
+
+function test_alter (&$item1, $key, $prefix) {
+    $item1 = "$prefix: $item1";
+}
+
+function test_print ($item2, $key) {
+    echo "$key. $item2<br>\n";
+}
+
+array_walk ($fruits, 'test_print');
+reset ($fruits);
+array_walk ($fruits, 'test_alter', 'fruit');
+reset ($fruits);
+array_walk ($fruits, 'test_print');
+      
+

See also each() and list(). +


PrevHomeNext
array_valuesUparsort
\ No newline at end of file diff --git a/function.array.html b/function.array.html new file mode 100644 index 0000000..b115d29 --- /dev/null +++ b/function.array.html @@ -0,0 +1,255 @@ +array
PHP Manual
PrevNext

array

(unknown)

array --  + Create an array +

Description

array array ([mixed + ...])

Returns an array of the parameters. The parameters can be given + an index with the => operator. +

Note: + Array() is a language construct used to + represent literal arrays, and not a regular function. +

+

The following example demonstrates how to create a + two-dimensional array, how to specify keys for associative + arrays, and how to skip-and-continue numeric indices in normal + arrays. +

Example 1. Array() example


$fruits = array (
+    "fruits"  => array ("a"=>"orange", "b"=>"banana", "c"=>"apple"),
+    "numbers" => array (1, 2, 3, 4, 5, 6),
+    "holes"   => array ("first", 5 => "second", "third")
+);
+      
+

See also: list(). +


PrevHomeNext
Array FunctionsUparray_count_values
\ No newline at end of file diff --git a/function.arsort.html b/function.arsort.html new file mode 100644 index 0000000..a15b57c --- /dev/null +++ b/function.arsort.html @@ -0,0 +1,301 @@ +arsort
PHP Manual
PrevNext

arsort

(PHP3 , PHP4 )

arsort --  + Sort an array in reverse order and maintain index association +

Description

void arsort (array array [, int + sort_flags])

This function sorts an array such that array indices maintain + their correlation with the array elements they are associated + with. This is used mainly when sorting associative arrays where + the actual element order is significant. +

Example 1. Arsort() example


$fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
+arsort ($fruits);
+reset ($fruits);
+while (list ($key, $val) = each ($fruits)) {
+    echo "$key = $val\n";
+}
+      
+

This example would display: +


fruits[a] = orange
+fruits[d] = lemon
+fruits[b] = banana
+fruits[c] = apple
+      

+

The fruits have been sorted in reverse alphabetical order, and + the index associated with each element has been maintained. +

You may modify the behavior of the sort using the optional + parameter sort_flags, for details + see sort(). +

See also: asort(), rsort(), + ksort(), and sort(). +


PrevHomeNext
array_walkUpasort
\ No newline at end of file diff --git a/function.asin.html b/function.asin.html new file mode 100644 index 0000000..e55db13 --- /dev/null +++ b/function.asin.html @@ -0,0 +1,187 @@ +asin
PHP Manual
PrevNext

asin

(PHP3 , PHP4 )

asin -- Arc sine

Description

float asin (float arg)

Returns the arc sine of arg in radians. +

See also acos() and atan(). +


PrevHomeNext
acosUpatan
\ No newline at end of file diff --git a/function.asort.html b/function.asort.html new file mode 100644 index 0000000..677944a --- /dev/null +++ b/function.asort.html @@ -0,0 +1,298 @@ +asort
PHP Manual
PrevNext

asort

(PHP3 , PHP4 )

asort -- Sort an array and maintain index association

Description

void asort (array array [, int sort_flags])

This function sorts an array such that array indices maintain + their correlation with the array elements they are associated + with. This is used mainly when sorting associative arrays where + the actual element order is significant. +

Example 1. Asort() example


$fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
+asort ($fruits);
+reset ($fruits);
+while (list ($key, $val) = each ($fruits)) {
+    echo "$key = $val\n";
+}
+      
+

This example would display: +


fruits[c] = apple
+fruits[b] = banana
+fruits[d] = lemon
+fruits[a] = orange
+      

+

The fruits have been sorted in alphabetical order, and the index + associated with each element has been maintained. +

You may modify the behavior of the sort using the optional + parameter sort_flags, for details + see sort(). +

See also arsort(), rsort(), + ksort(), and sort(). +


PrevHomeNext
arsortUpcompact
\ No newline at end of file diff --git a/function.aspell-check-raw.html b/function.aspell-check-raw.html new file mode 100644 index 0000000..2b26e72 --- /dev/null +++ b/function.aspell-check-raw.html @@ -0,0 +1,224 @@ +aspell_check_raw
PHP Manual
PrevNext

aspell_check_raw

(PHP3 >= 3.0.7, PHP4 )

aspell_check_raw --  + Check a word without changing its case or trying to trim it +

Description

boolean aspell_check_raw (int dictionary_link, string word)

Aspell_check_raw() checks the spelling of a + word, without changing its case or trying to trim it in any way + and returns true if the spelling is correct, false if not. +

Example 1. Aspell_check_raw()


$aspell_link=aspell_new ("english");
+if (aspell_check_raw ($aspell_link, "test")) {
+    echo "This is a valid spelling";
+} else {
+    echo "Sorry, wrong spelling";
+}
+      
+


PrevHomeNext
aspell_checkUpaspell_suggest
\ No newline at end of file diff --git a/function.aspell-check.html b/function.aspell-check.html new file mode 100644 index 0000000..3cc53a5 --- /dev/null +++ b/function.aspell-check.html @@ -0,0 +1,221 @@ +aspell_check
PHP Manual
PrevNext

aspell_check

(PHP3 >= 3.0.7, PHP4 )

aspell_check -- Check a word

Description

boolean aspell_check (int dictionary_link, string word)

Aspell_check() checks the spelling of a word + and returns true if the spelling is correct, false if not. +

Example 1. Aspell_check()


$aspell_link=aspell_new ("english");
+if (aspell_check ($aspell_link, "testt")) {
+    echo "This is a valid spelling";
+} else {
+    echo "Sorry, wrong spelling";
+}
+      
+


PrevHomeNext
aspell_newUpaspell_check_raw
\ No newline at end of file diff --git a/function.aspell-new.html b/function.aspell-new.html new file mode 100644 index 0000000..8d75c06 --- /dev/null +++ b/function.aspell-new.html @@ -0,0 +1,216 @@ +aspell_new
PHP Manual
PrevNext

aspell_new

(PHP3 >= 3.0.7, PHP4 )

aspell_new -- Load a new dictionary

Description

int aspell_new (string master, string personal)

Aspell_new() opens up a new dictionary and + returns the dictionary link identifier for use in other aspell + functions.

Example 1. Aspell_new()


$aspell_link=aspell_new ("english");
+      
+


PrevHomeNext
Aspell functionsUpaspell_check
\ No newline at end of file diff --git a/function.aspell-suggest.html b/function.aspell-suggest.html new file mode 100644 index 0000000..8a04ac2 --- /dev/null +++ b/function.aspell-suggest.html @@ -0,0 +1,224 @@ +aspell_suggest
PHP Manual
PrevNext

aspell_suggest

(PHP3 >= 3.0.7, PHP4 )

aspell_suggest -- Suggest spellings of a word

Description

array aspell_suggest (int dictionary_link, string word)

Aspell_suggest() returns an array of possible + spellings for the given word. +

Example 1. Aspell_suggest()


$aspell_link=aspell_new ("english");
+
+if (!aspell_check ($aspell_link, "test")) {
+    $suggestions=aspell_suggest ($aspell_link, "test");
+
+    for ($i=0; $i < count ($suggestions); $i++) {
+        echo "Possible spelling: " . $suggestions[$i] . "<br>"; 
+    }
+}
+      
+


PrevHomeNext
aspell_check_rawUpBCMath Arbitrary Precision Mathematics Functions
\ No newline at end of file diff --git a/function.assert-options.html b/function.assert-options.html new file mode 100644 index 0000000..9030fdf --- /dev/null +++ b/function.assert-options.html @@ -0,0 +1,328 @@ +assert_options
PHP Manual
PrevNext

assert_options

(PHP4 >= 4.0b4)

assert_options -- Set/get the various assert flags

Description

mixed assert_options (int what [, mixed + value])

Using assert_options() you may set the various + assert() control options or just query their + current settings. +

Table 1. assert options

optionini-parameterdefaultdescription
ASSERT_ACTIVEassert.active1enable assert() evaluation
ASSERT_WARNINGassert.warning1issue a PHP warning for each failed assertion
ASSERT_BAILassert.bail0terminate execution on failed assertions
ASSERT_QUIET_EVALassert.quiet_eval0 disable error_reporting during assertion expression + evaluation +
ASSERT_CALLBACKassert_callback(null)user function to call on failed assertions

assert_options() will return the original + setting of any option or false on errors. +


PrevHomeNext
assertUpextension_loaded
\ No newline at end of file diff --git a/function.assert.html b/function.assert.html new file mode 100644 index 0000000..1edefd0 --- /dev/null +++ b/function.assert.html @@ -0,0 +1,238 @@ +assert
PHP Manual
PrevNext

assert

(PHP4 >= 4.0b4)

assert -- Checks if assertion is false

Description

int assert (string|bool assertion)

assert() will check the given + assertion and take appropriate + action if its result is false. +

If the assertion is given as a string it + will be evaluated as PHP code by assert(). + The advantages of a string assertion + are less overhead when assertion checking is off and messages + containing the assertion expression when + an assertion failes. +

Assertion should be used as a debugging feature only. You may + use them for sanity-checks that test for conditions that should + always be true and that indicate some programming errors if not + or to check for the presence of certain features like extension + functions or certain system limits and features. +

Assertions should not be used for normal runtime operations + like input parameter checks. As a rule of thumb your code + should always be able to work correct if assertion checking + is not activated. +

The behavior of assert() may be configured + by assert_options() or by .ini-settings + described in that functions manual page. +


PrevHomeNext
PHP options & informationUpassert_options
\ No newline at end of file diff --git a/function.assert_options.html b/function.assert_options.html new file mode 100644 index 0000000..391bd43 --- /dev/null +++ b/function.assert_options.html @@ -0,0 +1,322 @@ +assert-options
PHP Manual
PrevNext

assert-options

(PHP4 >= 4.0b4)

assert-options -- Set/get the various assert flags

Description

mixed assert_options (int what [, mixed + value])

Using assert_options() you may set the various + assert() control options or just query their + current settings. +

Table 1. assert options

optionini-parameterdefaultdescription
ASSERT_ACTIVEassert.active1enable assert() evaluation
ASSERT_WARNINGassert.warning1issue a PHP warning for each failed assertion
ASSERT_BAILassert.bail0terminate execution on failed assertions
ASSERT_QUIET_EVALassert.quiet_eval0 disable error_reporting during assertion expression + evaluation +
ASSERT_CALLBACKassert_callback(null)user function to call on failed assertions

assert_options() will return the original + setting of any option or false on errors. +


PrevHomeNext
assertUpextension_loaded
\ No newline at end of file diff --git a/function.atan.html b/function.atan.html new file mode 100644 index 0000000..e8b0477 --- /dev/null +++ b/function.atan.html @@ -0,0 +1,187 @@ +atan
PHP Manual
PrevNext

atan

(PHP3 , PHP4 )

atan -- Arc tangent

Description

float atan (float arg)

Returns the arc tangent of arg in radians. +

See also asin() and acos(). +


PrevHomeNext
asinUpatan2
\ No newline at end of file diff --git a/function.atan2.html b/function.atan2.html new file mode 100644 index 0000000..f5669d0 --- /dev/null +++ b/function.atan2.html @@ -0,0 +1,216 @@ +atan2
PHP Manual
PrevNext

atan2

(PHP3 >= 3.0.5, PHP4 )

atan2 -- arc tangent of two variables

Description

float atan2 (float y, float x)

This function calculates the arc tangent of the two variables + x and y. It is + similar to calculating the arc tangent of + y / x, except that + the signs of both arguments are used to determine the quadrant of + the result. +

The function returns the result in radians, which is between -PI + and PI (inclusive). +

See also acos() and atan(). +


PrevHomeNext
atanUpbase_convert
\ No newline at end of file diff --git a/function.base-convert.html b/function.base-convert.html new file mode 100644 index 0000000..4d948e9 --- /dev/null +++ b/function.base-convert.html @@ -0,0 +1,247 @@ +base_convert
PHP Manual
PrevNext

base_convert

(PHP3 >= 3.0.6, PHP4 )

base_convert -- Convert a number between arbitrary bases

Description

string base_convert (string number, int frombase, int tobase)

Returns a string containing number + represented in base tobase. The base in + which number is given is specified in + frombase. Both + frombase and tobase + have to be between 2 and 36, inclusive. Digits in numbers with a + base higher than 10 will be represented with the letters a-z, + with a meaning 10, b meaning 11 and z meaning 35. +

Example 1. Base_convert()


$binary = base_convert ($hexadecimal, 16, 2);
+
+


PrevHomeNext
atan2Upbindec
\ No newline at end of file diff --git a/function.base64-decode.html b/function.base64-decode.html new file mode 100644 index 0000000..021a1b2 --- /dev/null +++ b/function.base64-decode.html @@ -0,0 +1,192 @@ +base64_decode
PHP Manual
PrevNext

base64_decode

(PHP3 , PHP4 )

base64_decode -- Decodes data encoded with MIME base64

Description

string base64_decode (string encoded_data)

Base64_decode() decodes + encoded_data and returns the original + data. The returned data may be binary. +

See also: base64_encode(), RFC-2045 section + 6.8. +


PrevHomeNext
URL FunctionsUpbase64_encode
\ No newline at end of file diff --git a/function.base64-encode.html b/function.base64-encode.html new file mode 100644 index 0000000..c7e9312 --- /dev/null +++ b/function.base64-encode.html @@ -0,0 +1,204 @@ +base64_encode
PHP Manual
PrevNext

base64_encode

(PHP3 , PHP4 )

base64_encode -- Encodes data with MIME base64

Description

string base64_encode (string data)

Base64_encode() returns + data encoded with base64. This encoding + is designed to make binary data survive transport through + transport layers that are not 8-bit clean, such as mail bodies. +

Base64-encoded data takes about 33% more space than the original + data.

See also: + base64_decode(), + chunk_split(), + RFC-2045 section 6.8. +


PrevHomeNext
base64_decodeUpparse_url
\ No newline at end of file diff --git a/function.basename.html b/function.basename.html new file mode 100644 index 0000000..83f2fc3 --- /dev/null +++ b/function.basename.html @@ -0,0 +1,240 @@ +basename
PHP Manual
PrevNext

basename

(PHP3 , PHP4 )

basename --  + Returns filename component of path +

Description

string basename (string path)

Given a string containing a path to a file, this function will + return the base name of the file. +

On Windows, both slash (/) and backslash + (\) are used as path separator character. In + other environments, it is the forward slash + (/). +

Example 1. basename() example


$path = "/home/httpd/html/index.php3";
+$file = basename ($path); // $file is set to "index.php3"
+      
+

See also: dirname() +


PrevHomeNext
Filesystem functionsUpchgrp
\ No newline at end of file diff --git a/function.bcadd.html b/function.bcadd.html new file mode 100644 index 0000000..8ef476c --- /dev/null +++ b/function.bcadd.html @@ -0,0 +1,201 @@ +bcadd
PHP Manual
PrevNext

bcadd

(PHP3 , PHP4 )

bcadd -- Add two arbitrary precision numbers

Description

string bcadd (string left operand, string right operand [, int + scale])

Adds the left operand to the + right operand and returns the sum in a + string. The optional scale parameter is + used to set the number of digits after the decimal place in the + result. +

See also bcsub(). +


PrevHomeNext
BCMath Arbitrary Precision Mathematics FunctionsUpbccomp
\ No newline at end of file diff --git a/function.bccomp.html b/function.bccomp.html new file mode 100644 index 0000000..1966891 --- /dev/null +++ b/function.bccomp.html @@ -0,0 +1,217 @@ +bccomp
PHP Manual
PrevNext

bccomp

(PHP3 , PHP4 )

bccomp -- Compare two arbitrary precision numbers

Description

int bccomp (string left operand, string right operand [, int + scale])

Compares the left operand to the + right operand and returns the result as an + integer. The optional scale parameter is + used to set the number of digits after the decimal place which + will be used in the comparion. The return value is 0 if the two + operands are equal. If the left operand + is larger than the right operand the + return value is +1 and if the left operand + is less than the right operand the return + value is -1. +


PrevHomeNext
bcaddUpbcdiv
\ No newline at end of file diff --git a/function.bcdiv.html b/function.bcdiv.html new file mode 100644 index 0000000..0ae98f7 --- /dev/null +++ b/function.bcdiv.html @@ -0,0 +1,200 @@ +bcdiv
PHP Manual
PrevNext

bcdiv

(PHP3 , PHP4 )

bcdiv -- Divide two arbitrary precision numbers

Description

string bcdiv (string left operand, string right operand [, int + scale])

Divides the left operand by the + right operand and returns the result. The + optional scale sets the number of digits + after the decimal place in the result. +

See also bcmul(). +


PrevHomeNext
bccompUpbcmod
\ No newline at end of file diff --git a/function.bcmod.html b/function.bcmod.html new file mode 100644 index 0000000..80439d3 --- /dev/null +++ b/function.bcmod.html @@ -0,0 +1,194 @@ +bcmod
PHP Manual
PrevNext

bcmod

(PHP3 , PHP4 )

bcmod --  + Get modulus of an arbitrary precision number +

Description

string bcmod (string left operand, string modulus)

Get the modulus of the left operand using + modulus. +

See also bcdiv(). +


PrevHomeNext
bcdivUpbcmul
\ No newline at end of file diff --git a/function.bcmul.html b/function.bcmul.html new file mode 100644 index 0000000..7e54fe5 --- /dev/null +++ b/function.bcmul.html @@ -0,0 +1,200 @@ +bcmul
PHP Manual
PrevNext

bcmul

(PHP3 , PHP4 )

bcmul -- Multiply two arbitrary precision number

Description

string bcmul (string left operand, string right operand [, int + scale])

Multiply the left operand by the + right operand and returns the result. The + optional scale sets the number of digits + after the decimal place in the result. +

See also bcdiv(). +


PrevHomeNext
bcmodUpbcpow
\ No newline at end of file diff --git a/function.bcpow.html b/function.bcpow.html new file mode 100644 index 0000000..7716c92 --- /dev/null +++ b/function.bcpow.html @@ -0,0 +1,202 @@ +bcpow
PHP Manual
PrevNext

bcpow

(PHP3 , PHP4 )

bcpow --  + Raise an arbitrary precision number to another +

Description

string bcpow (string x, string y [, int + scale])

Raise x to the power + y. The optional + scale can be used to set the number of + digits after the decimal place in the result. +

See also bcsqrt(). +


PrevHomeNext
bcmulUpbcscale
\ No newline at end of file diff --git a/function.bcscale.html b/function.bcscale.html new file mode 100644 index 0000000..564b07e --- /dev/null +++ b/function.bcscale.html @@ -0,0 +1,176 @@ +bcscale
PHP Manual
PrevNext

bcscale

(PHP3 , PHP4 )

bcscale --  + Set default scale parameter for all bc math functions +

Description

string bcscale (int scale)

This function sets the default scale parameter for all subsequent + bc math functions that do not explicitly specify a scale + parameter. +


PrevHomeNext
bcpowUpbcsqrt
\ No newline at end of file diff --git a/function.bcsqrt.html b/function.bcsqrt.html new file mode 100644 index 0000000..ac8aa93 --- /dev/null +++ b/function.bcsqrt.html @@ -0,0 +1,195 @@ +bcsqrt
PHP Manual
PrevNext

bcsqrt

(PHP3 , PHP4 )

bcsqrt --  + Get the square root of an arbitray precision number +

Description

string bcsqrt (string operand, int scale)

Return the square root of the operand. + The optional scale parameter sets the + number of digits after the decimal place in the result. +

See also bcpow(). +


PrevHomeNext
bcscaleUpbcsub
\ No newline at end of file diff --git a/function.bcsub.html b/function.bcsub.html new file mode 100644 index 0000000..dc927fc --- /dev/null +++ b/function.bcsub.html @@ -0,0 +1,203 @@ +bcsub
PHP Manual
PrevNext

bcsub

(PHP3 , PHP4 )

bcsub --  + Subtract one arbitrary precision number from another +

Description

string bcsub (string left operand, string right operand [, int + scale])

Subtracts the right operand from the + left operand and returns the result in a + string. The optional scale parameter is + used to set the number of digits after the decimal place in the + result. +

See also bcadd(). +


PrevHomeNext
bcsqrtUpCalendar functions
\ No newline at end of file diff --git a/function.bin2hex.html b/function.bin2hex.html new file mode 100644 index 0000000..54372f1 --- /dev/null +++ b/function.bin2hex.html @@ -0,0 +1,181 @@ +bin2hex
PHP Manual
PrevNext

bin2hex

(PHP3 >= 3.0.9, PHP4 )

bin2hex --  + Convert binary data into hexadecimal representation +

Description

string bin2hex (string str)

Returns an ASCII string containing the hexadecimal representation + of str. The conversion is done byte-wise + with the high-nibble first. +


PrevHomeNext
AddSlashesUpChop
\ No newline at end of file diff --git a/function.bind.html b/function.bind.html new file mode 100644 index 0000000..8009a88 --- /dev/null +++ b/function.bind.html @@ -0,0 +1,287 @@ +bind
PHP Manual
PrevNext

bind

(PHP4 >= 4.0.2)

bind -- Binds a name to a socket

Description

int bind (int socket, string address [, int + protocol])

bind() binds the name given in + address to the socket described by + socket, which must be a valid socket + descriptor created with socket(). +

The address parameter is either an IP + address in dotted-quad notation + (e.g. 127.0.0.1), if the socket is of the + AF_INET family; or the pathname of a + Unix-domain socket, if the socket family is + AF_UNIX. +

The port parameter is only used when + connecting to an AF_INET socket, and + designates the port on the remote host to which a connection + should be made. +

Returns zero on success, or a negative error code on + failure. This code may be passed to strerror() + to get a textual explanation of the error. +

See also + accept_connect(), + connect(), + listen(), + socket(), + socket_get_status(), and + strerror(). +


PrevHomeNext
accept_connectUpclose
\ No newline at end of file diff --git a/function.bindec.html b/function.bindec.html new file mode 100644 index 0000000..84a465d --- /dev/null +++ b/function.bindec.html @@ -0,0 +1,188 @@ +bindec
PHP Manual
PrevNext

bindec

(PHP3 , PHP4 )

bindec -- Binary to decimal

Description

int bindec (string binary_string)

Returns the decimal equivalent of the binary number represented by + the binary_string argument. +

Octdec converts a binary number to a decimal number. The largest + number that can be converted is 31 bits of 1's or 2147483647 in + decimal. +

See also the decbin() + function. +


PrevHomeNext
base_convertUpceil
\ No newline at end of file diff --git a/function.bindtextdomain.html b/function.bindtextdomain.html new file mode 100644 index 0000000..33376fc --- /dev/null +++ b/function.bindtextdomain.html @@ -0,0 +1,176 @@ +bindtextdomain
PHP Manual
PrevNext

bindtextdomain

(PHP3 >= 3.0.7, PHP4 )

bindtextdomain -- Sets the path for a domain

Description

string bindtextdomain (string domain, string directory)

The bindtextdomain() function sets the path + for a domain. +


PrevHomeNext
GNU GettextUpdcgettext
\ No newline at end of file diff --git a/function.call-user-func.html b/function.call-user-func.html new file mode 100644 index 0000000..cd118e1 --- /dev/null +++ b/function.call-user-func.html @@ -0,0 +1,214 @@ +call_user_func
PHP Manual
PrevNext

call_user_func

(PHP3 >= 3.0.3, PHP4 )

call_user_func --  + Call a user function given by the first parameter +

Description

mixed + call_user_func + (string + function_name [, mixed + parameter [, mixed + ...]])

Call a user defined function given by the + function_name parameter. Take the + following: +


function barber ($type) {
+    print "You wanted a $type haircut, no problem";
+}
+call_user_func ('barber', "mushroom");
+call_user_func ('barber', "shave");
+      

+


PrevHomeNext
Function Handling functionsUpcreate_function
\ No newline at end of file diff --git a/function.call-user-method.html b/function.call-user-method.html new file mode 100644 index 0000000..2b43572 --- /dev/null +++ b/function.call-user-method.html @@ -0,0 +1,256 @@ +call_user_method
PHP Manual
PrevNext

call_user_method

(PHP3 >= 3.0.3, PHP4 )

call_user_method --  + Call a user method on an specific object +

Description

mixed + call_user_method + (string + method_name, object + obj [, mixed + parameter [, mixed + ...]])

Calls a the method referred by method_name from + the user defined obj object. An example of usage + is below, where we define a class, instantiate an object and use + call_user_method() to call indirectly its + print_info method. +


<?php
+class Country {
+    var $NAME;
+    var $TLD;
+    
+    function Country($name, $tld) {
+        $this->NAME = $name;
+        $this->TLD = $tld;
+    }
+
+    function print_info($prestr="") {
+        echo $prestr."Country: ".$this->NAME."\n";
+        echo $prestr."Top Level Domain: ".$this->TLD."\n";
+    }
+}
+
+$cntry = new Country("Peru","pe");
+
+echo "* Calling the object method directly\n";
+$cntry->print_info();
+
+echo "\n* Calling the same method indirectly\n";
+call_user_method ("print_info", $cntry, "\t");
+?>
+      

+

See also call_user_func(). +


PrevHomeNext
Class/Object FunctionsUpclass_exists
\ No newline at end of file diff --git a/function.ceil.html b/function.ceil.html new file mode 100644 index 0000000..39c3c55 --- /dev/null +++ b/function.ceil.html @@ -0,0 +1,209 @@ +ceil
PHP Manual
PrevNext

ceil

(PHP3 , PHP4 )

ceil -- Round fractions up

Description

int ceil (float number)

Returns the next highest integer value from + number. Using ceil() + on integers is absolutely a waste of time. +

NOTE: PHP/FI 2's ceil() returned a + float. Use: $new = (double)ceil($number); to + get the old behaviour. +

See also floor() and + round(). +


PrevHomeNext
bindecUpcos
\ No newline at end of file diff --git a/function.chdir.html b/function.chdir.html new file mode 100644 index 0000000..1481ad3 --- /dev/null +++ b/function.chdir.html @@ -0,0 +1,179 @@ +chdir
PHP Manual
PrevNext

chdir

(PHP3 , PHP4 )

chdir -- change directory

Description

int chdir (string directory)

Changes PHP's current directory to + directory. Returns FALSE if unable to + change directory, TRUE otherwise. +


PrevHomeNext
Directory functionsUpdir
\ No newline at end of file diff --git a/function.checkdate.html b/function.checkdate.html new file mode 100644 index 0000000..399e76e --- /dev/null +++ b/function.checkdate.html @@ -0,0 +1,211 @@ +checkdate
PHP Manual
PrevNext

checkdate

(PHP3 , PHP4 )

checkdate -- Validate a gregorian date/time

Description

int checkdate (int month, int day, int year)

Returns true if the date given is valid; otherwise returns false. + Checks the validity of the date formed by the arguments. A date + is considered valid if: +

  • year is between 1 and 32767 inclusive +

  • month is between 1 and 12 inclusive +

  • Day is within the allowed number of + days for the given month. Leap + years are taken into consideration. +

+


PrevHomeNext
Date and Time functionsUpdate
\ No newline at end of file diff --git a/function.checkdnsrr.html b/function.checkdnsrr.html new file mode 100644 index 0000000..1a0c428 --- /dev/null +++ b/function.checkdnsrr.html @@ -0,0 +1,238 @@ +checkdnsrr
PHP Manual
PrevNext

checkdnsrr

(PHP3 , PHP4 )

checkdnsrr --  + Check DNS records corresponding to a given Internet host name or + IP address +

Description

int checkdnsrr (string host [, string + type])

Searches DNS for records of type type + corresponding to host. Returns true if any + records are found; returns false if no records were found or if + an error occurred. +

type may be any one of: A, MX, NS, SOA, + PTR, CNAME, or ANY. The default is MX. +

Host may either be the IP address in + dotted-quad notation or the host name. +

See also getmxrr(), + gethostbyaddr(), + gethostbyname(), + gethostbynamel(), and the named(8) manual + page. +


PrevHomeNext
Network FunctionsUpcloselog
\ No newline at end of file diff --git a/function.chgrp.html b/function.chgrp.html new file mode 100644 index 0000000..bc982de --- /dev/null +++ b/function.chgrp.html @@ -0,0 +1,217 @@ +chgrp
PHP Manual
PrevNext

chgrp

(PHP3 , PHP4 )

chgrp -- Changes file group

Description

int chgrp (string filename, mixed group)

Attempts to change the group of the file + filename to + group. Only the superuser may change the + group of a file arbitrarily; other users may change the group of + a file to any group of which that user is a member. +

Returns true on success; otherwise returns false. +

See also chown() and + chmod(). +

Note: + This function does not work on Windows systems +


PrevHomeNext
basenameUpchmod
\ No newline at end of file diff --git a/function.chmod.html b/function.chmod.html new file mode 100644 index 0000000..8b3adba --- /dev/null +++ b/function.chmod.html @@ -0,0 +1,257 @@ +chmod
PHP Manual
PrevNext

chmod

(PHP3 , PHP4 )

chmod -- Changes file mode

Description

int chmod (string filename, int mode)

Attempts to change the mode of the file specified by + filename to that given in + mode. +

Note that mode is not automatically + assumed to be an octal value, so strings (such as "g+w") will + not work properly. To ensure the expected operation, + you need to prefix mode with a zero (0): +


chmod ("/somedir/somefile", 755);   // decimal; probably incorrect   
+chmod ("/somedir/somefile", "u+rwx,go+rx"); // string; incorrect       
+chmod ("/somedir/somefile", 0755);  // octal; correct value of mode
+      

+

Returns true on success and false otherwise. +

See also chown() and + chgrp(). +

Note: + This function does not work on Windows systems +


PrevHomeNext
chgrpUpchown
\ No newline at end of file diff --git a/function.chop.html b/function.chop.html new file mode 100644 index 0000000..58157f3 --- /dev/null +++ b/function.chop.html @@ -0,0 +1,258 @@ +Chop
PHP Manual
PrevNext

Chop

(PHP3 , PHP4 )

Chop -- Remove trailing whitespace

Description

string chop (string str)

Returns the argument string without trailing whitespace, + including newlines. +

Example 1. Chop() example


$trimmed = chop ($line);
+      
+

Note: + chop() is different than the Perl + chop() function, which removes the last + character in the string. +

See also trim(), ltrim(), + rtrim(), and chop(). +


PrevHomeNext
bin2hexUpChr
\ No newline at end of file diff --git a/function.chown.html b/function.chown.html new file mode 100644 index 0000000..b099236 --- /dev/null +++ b/function.chown.html @@ -0,0 +1,201 @@ +chown
PHP Manual
PrevNext

chown

(PHP3 , PHP4 )

chown -- Changes file owner

Description

int chown (string filename, mixed user)

Attempts to change the owner of the file filename to user + user. Only the superuser may change the owner of a file. +

Returns true on success; otherwise returns false. +

See also chown() and + chmod(). +

Note: + This function does not work on Windows systems +


PrevHomeNext
chmodUpclearstatcache
\ No newline at end of file diff --git a/function.chr.html b/function.chr.html new file mode 100644 index 0000000..8d849b4 --- /dev/null +++ b/function.chr.html @@ -0,0 +1,238 @@ +Chr
PHP Manual
PrevNext

Chr

(PHP3 , PHP4 )

Chr -- Return a specific character

Description

string chr (int ascii)

Returns a one-character string containing the character specified + by ascii. +

Example 1. Chr() example


$str .= chr (27); /* add an escape character at the end of $str */
+
+/* Often this is more useful */
+
+$str = sprintf ("The string ends in escape: %c", 27);
+      
+ This function complements ord(). See also + sprintf() with a format string of + %c. +


PrevHomeNext
ChopUpchunk_split
\ No newline at end of file diff --git a/function.chunk-split.html b/function.chunk-split.html new file mode 100644 index 0000000..8bf572f --- /dev/null +++ b/function.chunk-split.html @@ -0,0 +1,253 @@ +chunk_split
PHP Manual
PrevNext

chunk_split

(PHP3 >= 3.0.6, PHP4 )

chunk_split -- Split a string into smaller chunks

Description

string chunk_split (string string [, int + chunklen [, string + end]])

Can be used to split a string into smaller chunks which is useful + for e.g. converting base64_encode output to + match RFC 2045 semantics. It inserts every + chunklen (defaults to 76) chars the string + end (defaults to "\r\n"). It returns the + new string leaving the original string untouched. +

Example 1. Chunk_split() example


# format $data using RFC 2045 semantics
+
+$new_string = chunk_split (base64_encode($data));
+      
+ This function is significantly faster than + ereg_replace(). +

Note: + This function was added in 3.0.6. +

+


PrevHomeNext
ChrUpconvert_cyr_string
\ No newline at end of file diff --git a/function.class-exists.html b/function.class-exists.html new file mode 100644 index 0000000..199470d --- /dev/null +++ b/function.class-exists.html @@ -0,0 +1,179 @@ +class_exists
PHP Manual
PrevNext

class_exists

(PHP4 >= 4.0b4)

class_exists -- Checks if the class has been defined

Description

bool class_exists (string class_name)

This function returns true if the class given by + class_name has been defined, + false otherwise. +


PrevHomeNext
call_user_methodUpget_class
\ No newline at end of file diff --git a/function.clearstatcache.html b/function.clearstatcache.html new file mode 100644 index 0000000..56b18be --- /dev/null +++ b/function.clearstatcache.html @@ -0,0 +1,316 @@ +clearstatcache
PHP Manual
PrevNext

clearstatcache

(PHP3 , PHP4 )

clearstatcache -- Clears file stat cache

Description

void clearstatcache(void);

Invoking the stat or + lstat system call on most systems is + quite expensive. Therefore, the result of the last call to any of + the status functions (listed below) is stored for use on the next + such call using the same filename. If you wish to force a new + status check, for instance if the file is being checked many + times and may change or disappear, use this function to clear the + results of the last call from memory. +

This value is only cached for the lifetime of a single request. +

Affected functions include stat(), + lstat(), + file_exists(), + is_writeable(), + is_readable(), + is_executable(), + is_file(), + is_dir(), + is_link(), + filectime(), + fileatime(), + filemtime(), + fileinode(), + filegroup(), + fileowner(), + filesize(), + filetype(), and + fileperms(). +


PrevHomeNext
chownUpcopy
\ No newline at end of file diff --git a/function.close.html b/function.close.html new file mode 100644 index 0000000..c4ef24d --- /dev/null +++ b/function.close.html @@ -0,0 +1,270 @@ +close
PHP Manual
PrevNext

close

(PHP4 )

close -- Closes a file descriptor

Description

bool close (int socket)

close() closes the file (or socket) descriptor + given by socket. +

Note that close() should not be used on PHP + file descriptors created with fopen(), + popen(), fsockopen(), or + psockopen(); it is meant for sockets created + with socket() or + accept_connect(). +

Returns true on success, or false if an error occurs (i.e., + socket is invalid). +

See also bind(), listen(), + socket(), + socket_get_status(), and + strerror(). +


PrevHomeNext
bindUpconnect
\ No newline at end of file diff --git a/function.closedir.html b/function.closedir.html new file mode 100644 index 0000000..aa6e30c --- /dev/null +++ b/function.closedir.html @@ -0,0 +1,185 @@ +closedir
PHP Manual
PrevNext

closedir

(PHP3 , PHP4 )

closedir -- close directory handle

Description

void closedir (int dir_handle)

Closes the directory stream indicated by + dir_handle. The stream must have previously + been opened by opendir(). +


PrevHomeNext
dirUpgetcwd
\ No newline at end of file diff --git a/function.closelog.html b/function.closelog.html new file mode 100644 index 0000000..f8614e6 --- /dev/null +++ b/function.closelog.html @@ -0,0 +1,203 @@ +closelog
PHP Manual
PrevNext

closelog

(PHP3 , PHP4 )

closelog -- Close connection to system logger

Description

int closelog(void);

Closelog() closes the descriptor being used to + write to the system logger. The use of + closelog() is optional. +

See also define_syslog_variables(), + syslog() and + openlog(). +


PrevHomeNext
checkdnsrrUpdebugger_off
\ No newline at end of file diff --git a/function.com-get.html b/function.com-get.html new file mode 100644 index 0000000..740cf68 --- /dev/null +++ b/function.com-get.html @@ -0,0 +1,189 @@ +com_get
PHP Manual
PrevNext

com_get

(PHP3 >= 3.0.3, PHP4 )

com_get --  + Gets the value of a COM Component's property +

Description

mixed com_get (resource com_object, string property)

Returns the value of the property of the + COM component referenced by com_object. + Returns false on error. +


PrevHomeNext
com_propgetUpcom_propput
\ No newline at end of file diff --git a/function.com-invoke.html b/function.com-invoke.html new file mode 100644 index 0000000..a0fc665 --- /dev/null +++ b/function.com-invoke.html @@ -0,0 +1,195 @@ +com_invoke
PHP Manual
PrevNext

com_invoke

(PHP3 >= 3.0.3, PHP4 )

com_invoke --  + Calls a COM component's method. +

Description

mixed com_invoke (resource com_object, string function_name [, mixed + function parameters, ...])

Com_invoke() invokes a method of the COM + component referenced by + com_object. Returns + false on error, returns the + function_name's return value on success. +


PrevHomeNext
com_loadUpcom_propget
\ No newline at end of file diff --git a/function.com-load.html b/function.com-load.html new file mode 100644 index 0000000..d90d74b --- /dev/null +++ b/function.com-load.html @@ -0,0 +1,183 @@ +com_load
PHP Manual
PrevNext

com_load

(PHP3 >= 3.0.3)

com_load --  + Creates a new reference to a COM component +

Description

string com_load (string module name [, string + server name])

com_load() creates a new COM component and + returns a reference to it. Returns false on + failiure. +


PrevHomeNext
COM support functions for WindowsUpcom_invoke
\ No newline at end of file diff --git a/function.com-propget.html b/function.com-propget.html new file mode 100644 index 0000000..48ee982 --- /dev/null +++ b/function.com-propget.html @@ -0,0 +1,180 @@ +com_propget
PHP Manual
PrevNext

com_propget

(PHP3 >= 3.0.3, PHP4 )

com_propget --  + Gets the value of a COM Component's property +

Description

mixed com_propget (resource com_object, string property)

This function is an alias for com_get(). +


PrevHomeNext
com_invokeUpcom_get
\ No newline at end of file diff --git a/function.com-propput.html b/function.com-propput.html new file mode 100644 index 0000000..5b759b0 --- /dev/null +++ b/function.com-propput.html @@ -0,0 +1,180 @@ +com_propput
PHP Manual
PrevNext

com_propput

(PHP3 >= 3.0.3, PHP4 )

com_propput --  + Assigns a value to a COM component's property +

Description

void com_propput (resource com_object, string property, mixed value)

This function is an alias for com_set(). +


PrevHomeNext
com_getUpcom_propset
\ No newline at end of file diff --git a/function.com-propset.html b/function.com-propset.html new file mode 100644 index 0000000..c86a437 --- /dev/null +++ b/function.com-propset.html @@ -0,0 +1,180 @@ +com_propset
PHP Manual
PrevNext

com_propset

(PHP3 >= 3.0.3, PHP4 )

com_propset --  + Assigns a value to a COM component's property +

Description

void com_propset (resource com_object, string property, mixed value)

This function is an alias for com_set(). +


PrevHomeNext
com_propputUpcom_set
\ No newline at end of file diff --git a/function.com-set.html b/function.com-set.html new file mode 100644 index 0000000..daa6f4c --- /dev/null +++ b/function.com-set.html @@ -0,0 +1,199 @@ +com_set
PHP Manual
PrevNext

com_set

(PHP3 >= 3.0.3, PHP4 )

com_set --  + Assigns a value to a COM component's property +

Description

void com_set (resource com_object, string property, mixed value)

Sets the value of the property of the COM + component referenced by com_object. + Returns true if + property is set. Returns + false on error. +


PrevHomeNext
com_propsetUpClass/Object Functions
\ No newline at end of file diff --git a/function.compact.html b/function.compact.html new file mode 100644 index 0000000..44f6cc5 --- /dev/null +++ b/function.compact.html @@ -0,0 +1,267 @@ +compact
PHP Manual
PrevNext

compact

(PHP4 )

compact --  + Create array containing variables and their values +

Description

array compact (mixed varname [, mixed + ...])

Compact() takes a variable number of + parameters. Each parameter can be either a string containing the + name of the variable, or an array of variable names. The array + can contain other arrays of variable names inside it; + compact() handles it recursively. +

For each of these, compact() looks for a + variable with that name in the current symbol table and adds it + to the output array such that the variable name becomes the key + and the contents of the variable become the value for that key. + In short, it does the opposite of extract(). + It returns the output array with all the variables added to it. +

Example 1. Compact() example


$city = "San Francisco";
+$state = "CA";
+$event = "SIGGRAPH";
+
+$location_vars = array ("city", "state");
+
+$result = compact ("event", $location_vars);
+      

After this, $result will be array ("event" + => "SIGGRAPH", "city" => "San Francisco", "state" => "CA"). +

+

See also extract(). +


PrevHomeNext
asortUpcount
\ No newline at end of file diff --git a/function.connect.html b/function.connect.html new file mode 100644 index 0000000..6471861 --- /dev/null +++ b/function.connect.html @@ -0,0 +1,271 @@ +connect
PHP Manual
PrevNext

connect

(PHP4 >= 4.0.2)

connect -- Initiates a connection on a socket

Description

int connect (int socket, string address [, int + port])

Initiates a connection using the socket descriptor + socket, which must be a valid socket + descriptor created with socket(). +

The address parameter is either an IP + address in dotted-quad notation + (e.g. 127.0.0.1), if the socket is of the + AF_INET family; or the pathname of a + Unix-domain socket, if the socket family is + AF_UNIX. +

The port parameter is only used when + connecting to an AF_INET socket, and + designates the port on the remote host to which a connection + should be made. +

Returns zero on success, or a negative error code on + failure. This code may be passed to strerror() + to get a textual explanation of the error. +

See also + bind(), + listen(), + socket(), + socket_get_status(), and + strerror(). +


PrevHomeNext
closeUplisten
\ No newline at end of file diff --git a/function.connection-aborted.html b/function.connection-aborted.html new file mode 100644 index 0000000..4393ea4 --- /dev/null +++ b/function.connection-aborted.html @@ -0,0 +1,180 @@ +connection_aborted
PHP Manual
PrevNext

connection_aborted

(PHP3 >= 3.0.7, PHP4 >= 4.0b4)

connection_aborted -- Returns true if client disconnected

Description

int connection_aborted (void )

Returns true if client disconnected. See the Connection Handling + description in the Features + chapter for a complete explanation. +


PrevHomeNext
Miscellaneous functionsUpconnection_status
\ No newline at end of file diff --git a/function.connection-status.html b/function.connection-status.html new file mode 100644 index 0000000..1e2c640 --- /dev/null +++ b/function.connection-status.html @@ -0,0 +1,180 @@ +connection_status
PHP Manual
PrevNext

connection_status

(PHP3 >= 3.0.7, PHP4 >= 4.0b4)

connection_status -- Returns connection status bitfield

Description

int connection_status (void )

Returns the connection status bitfield. See the Connection Handling + description in the Features + chapter for a complete explanation. +


PrevHomeNext
connection_abortedUpconnection_timeout
\ No newline at end of file diff --git a/function.connection-timeout.html b/function.connection-timeout.html new file mode 100644 index 0000000..1e9672e --- /dev/null +++ b/function.connection-timeout.html @@ -0,0 +1,180 @@ +connection_timeout
PHP Manual
PrevNext

connection_timeout

(PHP3 >= 3.0.7, PHP4 >= 4.0b4)

connection_timeout -- Return true if script timed out

Description

int connection_timeout (void )

Returns true if script timed out. See the Connection Handling + description in the Features + chapter for a complete explanation. +


PrevHomeNext
connection_statusUpdefine
\ No newline at end of file diff --git a/function.convert-cyr-string.html b/function.convert-cyr-string.html new file mode 100644 index 0000000..5eafeff --- /dev/null +++ b/function.convert-cyr-string.html @@ -0,0 +1,223 @@ +convert_cyr_string
PHP Manual
PrevNext

convert_cyr_string

(PHP3 >= 3.0.6, PHP4 )

convert_cyr_string --  + Convert from one Cyrillic character set to another +

Description

string convert_cyr_string (string str, string from, string to)

This function converts the given string from one Cyrillic + character set to another. The from and + to arguments are single characters that + represent the source and target Cyrillic character sets. The + supported types are: +

  • k - koi8-r +

  • w - windows-1251 +

  • i - iso8859-5 +

  • a - x-cp866 +

  • d - x-cp866 +

  • m - x-mac-cyrillic +

+


PrevHomeNext
chunk_splitUpcount_chars
\ No newline at end of file diff --git a/function.copy.html b/function.copy.html new file mode 100644 index 0000000..acde9ad --- /dev/null +++ b/function.copy.html @@ -0,0 +1,222 @@ +copy
PHP Manual
PrevNext

copy

(PHP3 , PHP4 )

copy -- Copies file

Description

int copy (string source, string dest)

Makes a copy of a file. Returns true if the copy succeeded, + false otherwise. +

Example 1. Copy() example


if (!copy($file, $file.'.bak')) {
+    print ("failed to copy $file...<br>\n");
+}
+      
+

See also: rename(). +


PrevHomeNext
clearstatcacheUpdelete
\ No newline at end of file diff --git a/function.cos.html b/function.cos.html new file mode 100644 index 0000000..3014504 --- /dev/null +++ b/function.cos.html @@ -0,0 +1,187 @@ +cos
PHP Manual
PrevNext

cos

(PHP3 , PHP4 )

cos -- Cosine

Description

float cos (float arg)

Returns the cosine of arg in radians. +

See also sin() and tan(). +


PrevHomeNext
ceilUpdecbin
\ No newline at end of file diff --git a/function.count-chars.html b/function.count-chars.html new file mode 100644 index 0000000..792bf9a --- /dev/null +++ b/function.count-chars.html @@ -0,0 +1,243 @@ +count_chars
PHP Manual
PrevNext

count_chars

(PHP4 >= 4.0b4)

count_chars --  + Return information abouts characters used in a string +

Description

mixed count_chars (string string [, mode])

Counts the number of occurances of every byte-value (0..255) in + string and returns it in various ways. + The optional parameter Mode default to + 0. Depending on mode + count_chars() returns one of the following: +

  • 0 - an array with the byte-value as key and the freqency of + every byte as value. +

  • 1 - same as 0 but only byte-values with a frequency greater + than zero are listed. +

  • 2 - same as 0 but only byte-values with a frequency equal to + zero are listed. +

  • + 3 - a string containing all used byte-values is returned. +

  • + 4 - a string containing all not used byte-values is returned. +

+

Note: + This function was added in PHP 4.0. +


PrevHomeNext
convert_cyr_stringUpcrc32
\ No newline at end of file diff --git a/function.count.html b/function.count.html new file mode 100644 index 0000000..fb35f0d --- /dev/null +++ b/function.count.html @@ -0,0 +1,246 @@ +count
PHP Manual
PrevNext

count

(PHP3 , PHP4 )

count -- Count elements in a variable

Description

int count (mixed var)

Returns the number of elements in var, + which is typically an array (since anything else will have one + element). +

Returns 1 if the variable is not an array. +

Returns 0 if the variable is not set. +

Warning

Count() may return 0 for a variable that + isn't set, but it may also return 0 for a variable that has + been initialized with an empty array. Use + isset() to test if a variable is set. +

+

See also: sizeof(), + isset(), and + is_array(). +


PrevHomeNext
compactUpcurrent
\ No newline at end of file diff --git a/function.cpdf-add-annotation.html b/function.cpdf-add-annotation.html new file mode 100644 index 0000000..95aabd3 --- /dev/null +++ b/function.cpdf-add-annotation.html @@ -0,0 +1,210 @@ +cpdf_add_annotation
PHP Manual
PrevNext

cpdf_add_annotation

(PHP3 >= 3.0.12, PHP4 >= 4.0b4)

cpdf_add_annotation -- Adds annotation

Description

void cpdf_add_annotation (int pdf document, double llx, double lly, double urx, double ury, string title, string content [, int + mode])

The cpdf_add_annotation() adds a note with the + lower left corner at (llx, + lly) and the upper right corner at + (urx, ury). +

The optional parameter mode determines the + unit length. If it's 0 or omitted the default unit as specified + for the page is used. Otherwise the coordinates are measured in + postscript points disregarding the current unit. +


PrevHomeNext
cpdf_place_inline_imageUpCURL, Client URL Library Functions
\ No newline at end of file diff --git a/function.cpdf-add-outline.html b/function.cpdf-add-outline.html new file mode 100644 index 0000000..23ca1a2 --- /dev/null +++ b/function.cpdf-add-outline.html @@ -0,0 +1,227 @@ +cpdf_add_outline
PHP Manual
PrevNext

cpdf_add_outline

(PHP3 >= 3.0.9, PHP4 >= 4.0b4)

cpdf_add_outline -- Adds bookmark for current page

Description

void cpdf_add_outline (int pdf document, string text)

The cpdf_add_outline() function adds a bookmark + with text text that points to the current page. +

Example 1. Adding a page outline


<?php
+$cpdf = cpdf_open(0);
+cpdf_page_init($cpdf, 1, 0, 595, 842);
+cpdf_add_outline($cpdf, 0, 0, 0, 1, "Page 1");
+// ...
+// some drawing
+// ...
+cpdf_finalize($cpdf);
+Header("Content-type: application/pdf");
+cpdf_output_buffer($cpdf);
+cpdf_close($cpdf);
+?>
+      
+


PrevHomeNext
cpdf_setrgbcolorUpcpdf_set_page_animation
\ No newline at end of file diff --git a/function.cpdf-arc.html b/function.cpdf-arc.html new file mode 100644 index 0000000..80d10ed --- /dev/null +++ b/function.cpdf-arc.html @@ -0,0 +1,225 @@ +cpdf_arc
PHP Manual
PrevNext

cpdf_arc

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_arc -- Draws an arc

Description

void cpdf_arc (int pdf document, double x-coor, double y-coor, double radius, double start, double end [, int mode])

The cpdf_arc() function draws an arc with + center at point + (x-coor, y-coor) + and radius radius, starting at angle + start and ending at angle + end. +

The optional parameter mode determines the unit + length. If it's 0 or omitted the default unit as specified for the page + is used. Otherwise the coordinates are measured in postscript points + disregarding the current unit. +

See also cpdf_circle(). +


PrevHomeNext
cpdf_circleUpcpdf_rect
\ No newline at end of file diff --git a/function.cpdf-begin-text.html b/function.cpdf-begin-text.html new file mode 100644 index 0000000..87e270c --- /dev/null +++ b/function.cpdf-begin-text.html @@ -0,0 +1,231 @@ +cpdf_begin_text
PHP Manual
PrevNext

cpdf_begin_text

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_begin_text -- Starts text section

Description

void cpdf_begin_text (int pdf document)

The cpdf_begin_text() function starts a text + section. It must be ended with cpdf_end_text(). +

Example 1. Text output


<?php
+cpdf_begin_text($pdf);
+cpdf_set_font($pdf, 16, "Helvetica", "WinAnsiEncoding");
+cpdf_text($pdf, 100, 100, "Some text");
+cpdf_end_text($pdf)
+?>
+      
+

See also cpdf_end_text(). +


PrevHomeNext
cpdf_set_current_pageUpcpdf_end_text
\ No newline at end of file diff --git a/function.cpdf-circle.html b/function.cpdf-circle.html new file mode 100644 index 0000000..26bf524 --- /dev/null +++ b/function.cpdf-circle.html @@ -0,0 +1,213 @@ +cpdf_circle
PHP Manual
PrevNext

cpdf_circle

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_circle -- Draw a circle

Description

void cpdf_circle (int pdf document, double x-coor, double y-coor, double radius [, int mode])

The cpdf_circle() function draws a circle with + center at point + (x-coor, y-coor) + and radius radius. +

The optional parameter mode determines the unit + length. If it's 0 or omitted the default unit as specified for the page + is used. Otherwise the coordinates are measured in postscript points + disregarding the current unit. +

See also cpdf_arc(). +


PrevHomeNext
cpdf_rlinetoUpcpdf_arc
\ No newline at end of file diff --git a/function.cpdf-clip.html b/function.cpdf-clip.html new file mode 100644 index 0000000..5dd03c0 --- /dev/null +++ b/function.cpdf-clip.html @@ -0,0 +1,176 @@ +cpdf_clip
PHP Manual
PrevNext

cpdf_clip

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_clip -- Clips to current path

Description

void cpdf_clip (int pdf document)

The cpdf_clip() function clips all drawing + to the current path. +


PrevHomeNext
cpdf_closepath_fill_strokeUpcpdf_setgray_fill
\ No newline at end of file diff --git a/function.cpdf-close.html b/function.cpdf-close.html new file mode 100644 index 0000000..7ce46de --- /dev/null +++ b/function.cpdf-close.html @@ -0,0 +1,205 @@ +cpdf_close
PHP Manual
PrevNext

cpdf_close

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_close -- Closes the pdf document

Description

void cpdf_close (int pdf document)

The cpdf_close() function closes the pdf document. + This should be the last function even after + cpdf_finalize(), cpdf_output_buffer() + and cpdf_save_to_file(). +

See also cpdf_open(). +


PrevHomeNext
cpdf_openUpcpdf_page_init
\ No newline at end of file diff --git a/function.cpdf-closepath-fill-stroke.html b/function.cpdf-closepath-fill-stroke.html new file mode 100644 index 0000000..d435ed7 --- /dev/null +++ b/function.cpdf-closepath-fill-stroke.html @@ -0,0 +1,228 @@ +cpdf_closepath_fill_stroke
PHP Manual
PrevNext

cpdf_closepath_fill_stroke

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_closepath_fill_stroke -- Close, fill and stroke current path

Description

void cpdf_closepath_fill_stroke (int pdf document)

The cpdf_closepath_fill_stroke() function closes, + fills the interior of the current path with the current fill color and + draws current path. +

See also cpdf_closepath(), + cpdf_stroke(), + cpdf_fill(), + cpdf_setgray_fill(), + cpdf_setgray(), + cpdf_setrgbcolor_fill(), + cpdf_setrgbcolor(). +


PrevHomeNext
cpdf_fill_strokeUpcpdf_clip
\ No newline at end of file diff --git a/function.cpdf-closepath-stroke.html b/function.cpdf-closepath-stroke.html new file mode 100644 index 0000000..a5a451b --- /dev/null +++ b/function.cpdf-closepath-stroke.html @@ -0,0 +1,205 @@ +cpdf_closepath_stroke
PHP Manual
PrevNext

cpdf_closepath_stroke

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_closepath_stroke -- Close path and draw line along path

Description

void cpdf_closepath_stroke (int pdf document)

The cpdf_closepath_stroke() function is a + combination of cpdf_closepath() and + cpdf_stroke(). Than clears the path. +

See also cpdf_closepath(), + cpdf_stroke(). +


PrevHomeNext
cpdf_strokeUpcpdf_fill
\ No newline at end of file diff --git a/function.cpdf-closepath.html b/function.cpdf-closepath.html new file mode 100644 index 0000000..df70d99 --- /dev/null +++ b/function.cpdf-closepath.html @@ -0,0 +1,176 @@ +cpdf_closepath
PHP Manual
PrevNext

cpdf_closepath

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_closepath -- Close path

Description

void cpdf_closepath (int pdf document)

The cpdf_closepath() function closes the + current path. +


PrevHomeNext
cpdf_rectUpcpdf_stroke
\ No newline at end of file diff --git a/function.cpdf-continue-text.html b/function.cpdf-continue-text.html new file mode 100644 index 0000000..1331588 --- /dev/null +++ b/function.cpdf-continue-text.html @@ -0,0 +1,211 @@ +cpdf_continue_text
PHP Manual
PrevNext

cpdf_continue_text

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_continue_text -- Output text in next line

Description

void cpdf_continue_text (int pdf document, string text)

The cpdf_continue_text() function outputs the + string in text in the next line. +

See also cpdf_show_xy(), + cpdf_text(), + cpdf_set_leading(), + cpdf_set_text_pos(). +


PrevHomeNext
cpdf_set_word_spacingUpcpdf_stringwidth
\ No newline at end of file diff --git a/function.cpdf-curveto.html b/function.cpdf-curveto.html new file mode 100644 index 0000000..a2c764b --- /dev/null +++ b/function.cpdf-curveto.html @@ -0,0 +1,251 @@ +cpdf_curveto
PHP Manual
PrevNext

cpdf_curveto

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_curveto -- Draws a curve

Description

void cpdf_curveto (int pdf document, double x1, double y1, double x2, double y2, double x3, double y3 [, int mode])

The cpdf_curveto() function draws a Bezier curve + from the current point to the point + (x3, y3) using + (x1, y1) and + (x2, y2) as control + points. +

The optional parameter mode determines the unit + length. If it's 0 or omitted the default unit as specified for the page is + used. Otherwise the coordinates are measured in postscript points + disregarding the current unit. +

See also cpdf_moveto(), + cpdf_rmoveto(), + cpdf_rlineto(), + cpdf_lineto(). +


PrevHomeNext
cpdf_rmovetoUpcpdf_lineto
\ No newline at end of file diff --git a/function.cpdf-end-text.html b/function.cpdf-end-text.html new file mode 100644 index 0000000..33a2d06 --- /dev/null +++ b/function.cpdf-end-text.html @@ -0,0 +1,231 @@ +cpdf_end_text
PHP Manual
PrevNext

cpdf_end_text

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_end_text -- Ends text section

Description

void cpdf_end_text (int pdf document)

The cpdf_end_text() function ends a text + section which was started with cpdf_begin_text(). +

Example 1. Text output


<?php
+cpdf_begin_text($pdf);
+cpdf_set_font($pdf, 16, "Helvetica", "WinAnsiEncoding");
+cpdf_text($pdf, 100, 100, "Some text");
+cpdf_end_text($pdf)
+?>
+      
+

See also cpdf_begin_text(). +


PrevHomeNext
cpdf_begin_textUpcpdf_show
\ No newline at end of file diff --git a/function.cpdf-endpath.html b/function.cpdf-endpath.html new file mode 100644 index 0000000..312f663 --- /dev/null +++ b/function.cpdf-endpath.html @@ -0,0 +1,172 @@ +cpdf_endpath
PHP3 Manual
PrevNext

cpdf_endpath

cpdf_endpath -- Ends current path

Description

void cpdf_endpath(int pdf document);

The cpdf_endpath() function ends + the current path but does not close it. + +

See also cpdf_closepath(). + +


PrevHomeNext
cpdf_closepath_fill_strokeUpcpdf_clip
\ No newline at end of file diff --git a/function.cpdf-fill-stroke.html b/function.cpdf-fill-stroke.html new file mode 100644 index 0000000..44b0e27 --- /dev/null +++ b/function.cpdf-fill-stroke.html @@ -0,0 +1,227 @@ +cpdf_fill_stroke
PHP Manual
PrevNext

cpdf_fill_stroke

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_fill_stroke -- Fill and stroke current path

Description

void cpdf_fill_stroke (int pdf document)

The cpdf_fill_stroke() function fills the interior of + the current path with the current fill color and draws current path. +

See also cpdf_closepath(), + cpdf_stroke(), + cpdf_fill(), + cpdf_setgray_fill(), + cpdf_setgray(), + cpdf_setrgbcolor_fill(), + cpdf_setrgbcolor(). +


PrevHomeNext
cpdf_fillUpcpdf_closepath_fill_stroke
\ No newline at end of file diff --git a/function.cpdf-fill.html b/function.cpdf-fill.html new file mode 100644 index 0000000..1903075 --- /dev/null +++ b/function.cpdf-fill.html @@ -0,0 +1,220 @@ +cpdf_fill
PHP Manual
PrevNext

cpdf_fill

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_fill -- Fill current path

Description

void cpdf_fill (int pdf document)

The cpdf_fill() function fills the interior of + the current path with the current fill color. +

See also cpdf_closepath(), + cpdf_stroke(), + cpdf_setgray_fill(), + cpdf_setgray(), + cpdf_setrgbcolor_fill(), + cpdf_setrgbcolor(). +


PrevHomeNext
cpdf_closepath_strokeUpcpdf_fill_stroke
\ No newline at end of file diff --git a/function.cpdf-finalize-page.html b/function.cpdf-finalize-page.html new file mode 100644 index 0000000..15247cc --- /dev/null +++ b/function.cpdf-finalize-page.html @@ -0,0 +1,194 @@ +cpdf_finalize_page
PHP Manual
PrevNext

cpdf_finalize_page

(PHP3 >= 3.0.10, PHP4 >= 4.0b4)

cpdf_finalize_page -- Ends page

Description

void cpdf_finalize_page (int pdf document, int page number)

The cpdf_finalize_page() function ends the page + with page number page number. +

This function is only for saving memory. A finalized page takes + less memory but cannot be modified anymore. +

See also cpdf_page_init(). +


PrevHomeNext
cpdf_page_initUpcpdf_finalize
\ No newline at end of file diff --git a/function.cpdf-finalize.html b/function.cpdf-finalize.html new file mode 100644 index 0000000..954c275 --- /dev/null +++ b/function.cpdf-finalize.html @@ -0,0 +1,191 @@ +cpdf_finalize
PHP Manual
PrevNext

cpdf_finalize

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_finalize -- Ends document

Description

void cpdf_finalize (int pdf document)

The cpdf_finalize() function ends the document. + You still have to call cpdf_close() +

See also cpdf_close(). +


PrevHomeNext
cpdf_finalize_pageUpcpdf_output_buffer
\ No newline at end of file diff --git a/function.cpdf-global-set-document-limits.html b/function.cpdf-global-set-document-limits.html new file mode 100644 index 0000000..58bc61b --- /dev/null +++ b/function.cpdf-global-set-document-limits.html @@ -0,0 +1,194 @@ +cpdf_global_set_document_limits
PHP Manual
PrevNext

cpdf_global_set_document_limits

(PHP4 >= 4.0b4)

cpdf_global_set_document_limits -- Sets document limits for any pdf document

Description

void cpdf_global_set_document_limits + (int maxpages, int maxfonts, int maximages, int maxannotations, int maxobjects)

The cpdf_global_set_document_limits() function sets + several document limits. This function has to be called before + cpdf_open() to take effect. It sets the limits + for any document open afterwards. +

See also cpdf_open(). +


PrevHomeNext
ClibPDF functionsUpcpdf_set_creator
\ No newline at end of file diff --git a/function.cpdf-import-jpeg.html b/function.cpdf-import-jpeg.html new file mode 100644 index 0000000..b0a45d3 --- /dev/null +++ b/function.cpdf-import-jpeg.html @@ -0,0 +1,221 @@ +cpdf_import_jpeg
PHP Manual
PrevNext

cpdf_import_jpeg

(PHP3 >= 3.0.9, PHP4 >= 4.0b4)

cpdf_import_jpeg -- Opens a JPEG image

Description

int cpdf_import_jpeg (int pdf document, string file name, double x-coor, double y-coor, double angle, double width, double height, double x-scale, double y-scale [, int + mode])

The cpdf_import_jpeg() function opens an image + stored in the file with the name file + name. The format of the image has to be jpeg. The + image is placed on the current page at position + (x-coor, y-coor). + The image is rotated by angle degres. +

The optional parameter mode determines the + unit length. If it's 0 or omitted the default unit as specified + for the page is used. Otherwise the coordinates are measured in + postscript points disregarding the current unit. +

See also cpdf_place_inline_image(). +


PrevHomeNext
cpdf_set_page_animationUpcpdf_place_inline_image
\ No newline at end of file diff --git a/function.cpdf-lineto.html b/function.cpdf-lineto.html new file mode 100644 index 0000000..c5d5470 --- /dev/null +++ b/function.cpdf-lineto.html @@ -0,0 +1,221 @@ +cpdf_lineto
PHP Manual
PrevNext

cpdf_lineto

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_lineto -- Draws a line

Description

void cpdf_lineto (int pdf document, double x-coor, double y-coor [, int mode])

The cpdf_lineto() function draws a line from + the current point to the point with coordinates + (x-coor, y-coor). +

The optional parameter mode determines the unit + length. If it's 0 or omitted the default unit as specified for the page + is used. Otherwise the coordinates are measured in postscript points + disregarding the current unit. +

See also cpdf_moveto(), + cpdf_rmoveto(), + cpdf_curveto(). +


PrevHomeNext
cpdf_curvetoUpcpdf_rlineto
\ No newline at end of file diff --git a/function.cpdf-moveto.html b/function.cpdf-moveto.html new file mode 100644 index 0000000..74462e7 --- /dev/null +++ b/function.cpdf-moveto.html @@ -0,0 +1,199 @@ +cpdf_moveto
PHP Manual
PrevNext

cpdf_moveto

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_moveto -- Sets current point

Description

void cpdf_moveto (int pdf document, double x-coor, double y-coor [, int + mode])

The cpdf_moveto() function set the current + point to the coordinates x-coor and + y-coor. +

The optional parameter mode determines the + unit length. If it's 0 or omitted the default unit as specified + for the page is used. Otherwise the coordinates are measured in + postscript points disregarding the current unit. +


PrevHomeNext
cpdf_newpathUpcpdf_rmoveto
\ No newline at end of file diff --git a/function.cpdf-newpath.html b/function.cpdf-newpath.html new file mode 100644 index 0000000..6a58338 --- /dev/null +++ b/function.cpdf-newpath.html @@ -0,0 +1,185 @@ +cpdf_newpath
PHP Manual
PrevNext

cpdf_newpath

(PHP3 >= 3.0.9, PHP4 >= 4.0b4)

cpdf_newpath -- Starts a new path

Description

void + cpdf_newpath + (int + pdf_document)

The cpdf_newpath() starts a new path on the + document given by the pdf_document + parameter. +


PrevHomeNext
cpdf_setdashUpcpdf_moveto
\ No newline at end of file diff --git a/function.cpdf-open.html b/function.cpdf-open.html new file mode 100644 index 0000000..d3477f0 --- /dev/null +++ b/function.cpdf-open.html @@ -0,0 +1,238 @@ +cpdf_open
PHP Manual
PrevNext

cpdf_open

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_open -- Opens a new pdf document

Description

int cpdf_open (int compression [, string filename])

The cpdf_open() function opens + a new pdf document. The first parameter turns document compression + on if it is unequal to 0. The second optional parameter sets the + file in which the document is written. If it is omitted the document + is created in memory and can either be written into a file with + the cpdf_save_to_file() or written to standard + output with cpdf_output_buffer(). +

Note: + The return value will be needed in further versions of ClibPDF + as the first parameter in all other functions which are writing + to the pdf document. +

The ClibPDF library takes the filename "-" as a synonym for + stdout. If PHP is compiled as an apache module this will not + work because the way ClibPDF outputs to stdout does not work + with apache. You can solve this problem by skipping the + filename and using cpdf_output_buffer() to + output the pdf document. +

+

See also cpdf_close(), + cpdf_output_buffer(). +


PrevHomeNext
cpdf_set_keywordsUpcpdf_close
\ No newline at end of file diff --git a/function.cpdf-output-buffer.html b/function.cpdf-output-buffer.html new file mode 100644 index 0000000..5c769df --- /dev/null +++ b/function.cpdf-output-buffer.html @@ -0,0 +1,193 @@ +cpdf_output_buffer
PHP Manual
PrevNext

cpdf_output_buffer

(PHP3 >= 3.0.9, PHP4 >= 4.0b4)

cpdf_output_buffer -- Outputs the pdf document in memory buffer

Description

void cpdf_output_buffer (int pdf document)

The cpdf_output_buffer() function outputs + the pdf document to stdout. The document has to be created in memory which + is the case if cpdf_open() has been called with + no filename parameter. +

See also cpdf_open(). +


PrevHomeNext
cpdf_finalizeUpcpdf_save_to_file
\ No newline at end of file diff --git a/function.cpdf-page-init.html b/function.cpdf-page-init.html new file mode 100644 index 0000000..10f23c3 --- /dev/null +++ b/function.cpdf-page-init.html @@ -0,0 +1,223 @@ +cpdf_page_init
PHP Manual
PrevNext

cpdf_page_init

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_page_init -- Starts new page

Description

void cpdf_page_init (int pdf document, int page number, int orientation, double height, double width [, double unit])

The cpdf_page_init() function starts a new + page with height height and width + width. The page has number + page number and orientation + orientation. orientation + can be 0 for portrait and 1 for landscape. The last optional parameter + unit sets the unit for the coordinate system. + The value should be the number of postscript points per unit. Since + one inch is equal to 72 points, a value of 72 would set the unit + to one inch. The default is also 72. +

See also cpdf_set_current_page(). +


PrevHomeNext
cpdf_closeUpcpdf_finalize_page
\ No newline at end of file diff --git a/function.cpdf-place-inline-image.html b/function.cpdf-place-inline-image.html new file mode 100644 index 0000000..327ad88 --- /dev/null +++ b/function.cpdf-place-inline-image.html @@ -0,0 +1,210 @@ +cpdf_place_inline_image
PHP Manual
PrevNext

cpdf_place_inline_image

(PHP3 >= 3.0.9, PHP4 >= 4.0b4)

cpdf_place_inline_image -- Places an image on the page

Description

void cpdf_place_inline_image (int pdf document, int image, double x-coor, double y-coor, double angle, double width, double height [, int + mode])

The cpdf_place_inline_image() function places + an image created with the php image functions on the page at + postion (x-coor, + y-coor). The image can be scaled at the + same time. +

The optional parameter mode determines the + unit length. If it's 0 or omitted the default unit as specified + for the page is used. Otherwise the coordinates are measured in + postscript points disregarding the current unit. +

See also cpdf_import_jpeg(). +


PrevHomeNext
cpdf_import_jpegUpcpdf_add_annotation
\ No newline at end of file diff --git a/function.cpdf-rect.html b/function.cpdf-rect.html new file mode 100644 index 0000000..3b257c6 --- /dev/null +++ b/function.cpdf-rect.html @@ -0,0 +1,210 @@ +cpdf_rect
PHP Manual
PrevNext

cpdf_rect

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_rect -- Draw a rectangle

Description

void cpdf_rect (int pdf document, double x-coor, double y-coor, double width, double height [, int mode])

The cpdf_rect() function draws a rectangle with + its lower left corner at point + (x-coor, y-coor). + This width is set to widgth. + This height is set to height. +

The optional parameter mode determines the unit + length. If it's 0 or omitted the default unit as specified for the page + is used. Otherwise the coordinates are measured in postscript points + disregarding the current unit. +


PrevHomeNext
cpdf_arcUpcpdf_closepath
\ No newline at end of file diff --git a/function.cpdf-restore.html b/function.cpdf-restore.html new file mode 100644 index 0000000..5794cd6 --- /dev/null +++ b/function.cpdf-restore.html @@ -0,0 +1,232 @@ +cpdf_restore
PHP Manual
PrevNext

cpdf_restore

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_restore -- Restores formerly saved enviroment

Description

void cpdf_restore (int pdf document)

The cpdf_restore() function restores the + enviroment saved with cpdf_save(). It works + like the postscript command grestore. Very useful if you want + to translate or rotate an object without effecting other objects. +

Example 1. Save/Restore


<?php
+cpdf_save($pdf);
+// do all kinds of rotations, transformations, ...
+cpdf_restore($pdf)
+?>
+      
+

See also cpdf_save(). +


PrevHomeNext
cpdf_saveUpcpdf_translate
\ No newline at end of file diff --git a/function.cpdf-rlineto.html b/function.cpdf-rlineto.html new file mode 100644 index 0000000..0b59a6d --- /dev/null +++ b/function.cpdf-rlineto.html @@ -0,0 +1,221 @@ +cpdf_rlineto
PHP Manual
PrevNext

cpdf_rlineto

(PHP3 >= 3.0.9, PHP4 >= 4.0b4)

cpdf_rlineto -- Draws a line

Description

void cpdf_rlineto (int pdf document, double x-coor, double y-coor [, int mode])

The cpdf_rlineto() function draws a line from + the current point to the relative point with coordinates + (x-coor, y-coor). +

The optional parameter mode determines the unit + length. If it's 0 or omitted the default unit as specified for the page + is used. Otherwise the coordinates are measured in postscript points + disregarding the current unit. +

See also cpdf_moveto(), + cpdf_rmoveto(), + cpdf_curveto(). +


PrevHomeNext
cpdf_linetoUpcpdf_circle
\ No newline at end of file diff --git a/function.cpdf-rmoveto.html b/function.cpdf-rmoveto.html new file mode 100644 index 0000000..f6be5dd --- /dev/null +++ b/function.cpdf-rmoveto.html @@ -0,0 +1,207 @@ +cpdf_rmoveto
PHP Manual
PrevNext

cpdf_rmoveto

(PHP3 >= 3.0.9, PHP4 >= 4.0b4)

cpdf_rmoveto -- Sets current point

Description

void cpdf_rmoveto (int pdf document, double x-coor, double y-coor [, int mode])

The cpdf_rmoveto() function set the current point + relative to the coordinates x-coor and + y-coor. +

The optional parameter mode determines the unit + length. If it's 0 or omitted the default unit as specified for the page is + used. Otherwise the coordinates are measured in postscript points + disregarding the current unit. +

See also cpdf_moveto(). +


PrevHomeNext
cpdf_movetoUpcpdf_curveto
\ No newline at end of file diff --git a/function.cpdf-rotate.html b/function.cpdf-rotate.html new file mode 100644 index 0000000..e13a717 --- /dev/null +++ b/function.cpdf-rotate.html @@ -0,0 +1,181 @@ +cpdf_rotate
PHP Manual
PrevNext

cpdf_rotate

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_rotate -- Sets rotation

Description

void cpdf_rotate (int pdf document, double angle)

The cpdf_rotate() function set the rotation in + degress to angle. +


PrevHomeNext
cpdf_scaleUpcpdf_setflat
\ No newline at end of file diff --git a/function.cpdf-save-to-file.html b/function.cpdf-save-to-file.html new file mode 100644 index 0000000..190822c --- /dev/null +++ b/function.cpdf-save-to-file.html @@ -0,0 +1,202 @@ +cpdf_save_to_file
PHP Manual
PrevNext

cpdf_save_to_file

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_save_to_file -- Writes the pdf document into a file

Description

void cpdf_save_to_file (int pdf document, string filename)

The cpdf_save_to_file() function outputs + the pdf document into a file if it has been created in memory. +

This function is not needed if the pdf document has been open + by specifying a filename as a parameter of cpdf_open(). +

See also cpdf_output_buffer(), + cpdf_open(). +


PrevHomeNext
cpdf_output_bufferUpcpdf_set_current_page
\ No newline at end of file diff --git a/function.cpdf-save.html b/function.cpdf-save.html new file mode 100644 index 0000000..a68b6b7 --- /dev/null +++ b/function.cpdf-save.html @@ -0,0 +1,187 @@ +cpdf_save
PHP Manual
PrevNext

cpdf_save

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_save -- Saves current enviroment

Description

void cpdf_save (int pdf document)

The cpdf_save() function saves the current + enviroment. It works like the postscript command gsave. Very + useful if you want to translate or rotate an object without effecting + other objects. +

See also cpdf_restore(). +


PrevHomeNext
cpdf_stringwidthUpcpdf_restore
\ No newline at end of file diff --git a/function.cpdf-scale.html b/function.cpdf-scale.html new file mode 100644 index 0000000..f5f9fc4 --- /dev/null +++ b/function.cpdf-scale.html @@ -0,0 +1,176 @@ +cpdf_scale
PHP Manual
PrevNext

cpdf_scale

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_scale -- Sets scaling

Description

void cpdf_scale (int pdf document, double x-scale, double y-scale)

The cpdf_scale() function set the scaling factor + in both directions. +


PrevHomeNext
cpdf_translateUpcpdf_rotate
\ No newline at end of file diff --git a/function.cpdf-set-char-spacing.html b/function.cpdf-set-char-spacing.html new file mode 100644 index 0000000..0302abf --- /dev/null +++ b/function.cpdf-set-char-spacing.html @@ -0,0 +1,192 @@ +cpdf_set_char_spacing
PHP Manual
PrevNext

cpdf_set_char_spacing

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_set_char_spacing -- Sets character spacing

Description

void cpdf_set_char_spacing (int pdf document, double space)

The cpdf_set_char_spacing() function sets the + spacing between characters. +

See also cpdf_set_word_spacing(), + cpdf_set_leading(). +


PrevHomeNext
cpdf_set_text_posUpcpdf_set_word_spacing
\ No newline at end of file diff --git a/function.cpdf-set-creator.html b/function.cpdf-set-creator.html new file mode 100644 index 0000000..5f8c6ad --- /dev/null +++ b/function.cpdf-set-creator.html @@ -0,0 +1,199 @@ +cpdf_set_creator
PHP Manual
PrevNext

cpdf_set_creator

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_set_creator -- Sets the creator field in the pdf document

Description

void cpdf_set_creator (string creator)

The cpdf_set_creator() function sets the + creator of a pdf document. +

See also cpdf_set_subject(), + cpdf_set_title(), + cpdf_set_keywords(). +


PrevHomeNext
cpdf_global_set_document_limitsUpcpdf_set_title
\ No newline at end of file diff --git a/function.cpdf-set-current-page.html b/function.cpdf-set-current-page.html new file mode 100644 index 0000000..aa645b6 --- /dev/null +++ b/function.cpdf-set-current-page.html @@ -0,0 +1,192 @@ +cpdf_set_current_page
PHP Manual
PrevNext

cpdf_set_current_page

(PHP3 >= 3.0.9, PHP4 >= 4.0b4)

cpdf_set_current_page -- Sets current page

Description

void cpdf_set_current_page (int pdf document, int page number)

The cpdf_set_current_page() function set the page + on which all operations are performed. One can switch between pages + until a page is finished with cpdf_finalize_page(). +

See also cpdf_finalize_page(). +


PrevHomeNext
cpdf_save_to_fileUpcpdf_begin_text
\ No newline at end of file diff --git a/function.cpdf-set-font.html b/function.cpdf-set-font.html new file mode 100644 index 0000000..5ebc0cd --- /dev/null +++ b/function.cpdf-set-font.html @@ -0,0 +1,192 @@ +cpdf_set_font
PHP Manual
PrevNext

cpdf_set_font

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_set_font -- Select the current font face and size

Description

void cpdf_set_font (int pdf document, string font name, double size, string encoding)

The cpdf_set_font() function sets the + current font face, font size and encoding. Currently only + the standard postscript fonts are supported. +

The last parameter encoding can take the + following values: "MacRomanEncoding", "MacExpertEncoding", + "WinAnsiEncoding", and "NULL". "NULL" stands for the font's + built-in encoding. +

See the ClibPDF Manual for more information, especially how to support + asian fonts. +


PrevHomeNext
cpdf_textUpcpdf_set_leading
\ No newline at end of file diff --git a/function.cpdf-set-horiz-scaling.html b/function.cpdf-set-horiz-scaling.html new file mode 100644 index 0000000..667d4b4 --- /dev/null +++ b/function.cpdf-set-horiz-scaling.html @@ -0,0 +1,181 @@ +cpdf_set_horiz_scaling
PHP Manual
PrevNext

cpdf_set_horiz_scaling

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_set_horiz_scaling -- Sets horizontal scaling of text

Description

void cpdf_set_horiz_scaling (int pdf document, double scale)

The cpdf_set_horiz_scaling() function sets the + horizontal scaling to scale percent. +


PrevHomeNext
cpdf_set_text_renderingUpcpdf_set_text_rise
\ No newline at end of file diff --git a/function.cpdf-set-keywords.html b/function.cpdf-set-keywords.html new file mode 100644 index 0000000..0f1ef88 --- /dev/null +++ b/function.cpdf-set-keywords.html @@ -0,0 +1,199 @@ +cpdf_set_keywords
PHP Manual
PrevNext

cpdf_set_keywords

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_set_keywords -- Sets the keywords field of the pdf document

Description

void cpdf_set_keywords (string keywords)

The cpdf_set_keywords() function sets the + keywords of a pdf document. +

See also cpdf_set_title(), + cpdf_set_creator(), + cpdf_set_subject(). +


PrevHomeNext
cpdf_set_subjectUpcpdf_open
\ No newline at end of file diff --git a/function.cpdf-set-leading.html b/function.cpdf-set-leading.html new file mode 100644 index 0000000..72ed44d --- /dev/null +++ b/function.cpdf-set-leading.html @@ -0,0 +1,192 @@ +cpdf_set_leading
PHP Manual
PrevNext

cpdf_set_leading

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_set_leading -- Sets distance between text lines

Description

void cpdf_set leading (int pdf document, double distance)

The cpdf_set_leading() function sets the distance + between text lines. This will be used if text is output by + cpdf_continue_text(). +

See also cpdf_continue_text(). +


PrevHomeNext
cpdf_set_fontUpcpdf_set_text_rendering
\ No newline at end of file diff --git a/function.cpdf-set-page-animation.html b/function.cpdf-set-page-animation.html new file mode 100644 index 0000000..09e76e1 --- /dev/null +++ b/function.cpdf-set-page-animation.html @@ -0,0 +1,241 @@ +cpdf_set_page_animation
PHP Manual
PrevNext

cpdf_set_page_animation

(PHP3 >= 3.0.9, PHP4 >= 4.0b4)

cpdf_set_page_animation -- Sets duration between pages

Description

void cpdf_set_page_animation (int pdf document, int transition, double duration)

The cpdf_set_page_animation() function set the + transition between following pages. +

The value of transition + can be +

0 for none,
1 for two lines sweeping across the screen reveal the page, +
2 for multiple lines sweeping across the screen reveal the page, +
3 for a box reveals the page,
4 for a single line sweeping across the screen reveals the page, +
5 for the old page dissolves to reveal the page,
6 for the dissolve effect moves from one screen edge to another, +
7 for the old page is simply replaced by the new page (default) +

+

The value of duration is the number of seconds + between page flipping. +


PrevHomeNext
cpdf_add_outlineUpcpdf_import_jpeg
\ No newline at end of file diff --git a/function.cpdf-set-subject.html b/function.cpdf-set-subject.html new file mode 100644 index 0000000..28f5ec5 --- /dev/null +++ b/function.cpdf-set-subject.html @@ -0,0 +1,199 @@ +cpdf_set_subject
PHP Manual
PrevNext

cpdf_set_subject

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_set_subject -- Sets the subject field of the pdf document

Description

void cpdf_set_subject (string subject)

The cpdf_set_subject() function sets the + subject of a pdf document. +

See also cpdf_set_title(), + cpdf_set_creator(), + cpdf_set_keywords(). +


PrevHomeNext
cpdf_set_titleUpcpdf_set_keywords
\ No newline at end of file diff --git a/function.cpdf-set-text-matrix.html b/function.cpdf-set-text-matrix.html new file mode 100644 index 0000000..1649ac4 --- /dev/null +++ b/function.cpdf-set-text-matrix.html @@ -0,0 +1,177 @@ +cpdf_set_text_matrix
PHP Manual
PrevNext

cpdf_set_text_matrix

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_set_text_matrix -- Sets the text matrix

Description

void cpdf_set_text_matrix (int pdf document, array matrix)

The cpdf_set_text_matrix() function sets + a matrix which describes a transformation applied on the current + text font. +


PrevHomeNext
cpdf_set_text_riseUpcpdf_set_text_pos
\ No newline at end of file diff --git a/function.cpdf-set-text-pos.html b/function.cpdf-set-text-pos.html new file mode 100644 index 0000000..2bbca8c --- /dev/null +++ b/function.cpdf-set-text-pos.html @@ -0,0 +1,210 @@ +cpdf_set_text_pos
PHP Manual
PrevNext

cpdf_set_text_pos

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_set_text_pos -- Sets text position

Description

void cpdf_set_text_pos (int pdf document, double x-coor, double y-coor [, int mode])

The cpdf_set_text_pos() function sets the + position of text for the next cpdf_show() + function call. +

The optional parameter mode determines the unit + length. If it's 0 or omitted the default unit as specified for the page is + used. Otherwise the coordinates are measured in postscript points + disregarding the current unit. +

See also cpdf_show(), + cpdf_text(). +


PrevHomeNext
cpdf_set_text_matrixUpcpdf_set_char_spacing
\ No newline at end of file diff --git a/function.cpdf-set-text-rendering.html b/function.cpdf-set-text-rendering.html new file mode 100644 index 0000000..f6fea5b --- /dev/null +++ b/function.cpdf-set-text-rendering.html @@ -0,0 +1,188 @@ +cpdf_set_text_rendering
PHP Manual
PrevNext

cpdf_set_text_rendering

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_set_text_rendering -- Determines how text is rendered

Description

void cpdf_set_text_rendering (int pdf document, int mode)

The cpdf_set_text_rendering() function + determines how text is rendered. +

The possible values for mode are 0=fill + text, 1=stroke text, 2=fill and stroke text, 3=invisible, 4=fill + text and add it to clipping path, 5=stroke text and add it to + clipping path, 6=fill and stroke text and add it to clipping + path, 7=add it to clipping path. +


PrevHomeNext
cpdf_set_leadingUpcpdf_set_horiz_scaling
\ No newline at end of file diff --git a/function.cpdf-set-text-rise.html b/function.cpdf-set-text-rise.html new file mode 100644 index 0000000..49b9a74 --- /dev/null +++ b/function.cpdf-set-text-rise.html @@ -0,0 +1,181 @@ +cpdf_set_text_rise
PHP Manual
PrevNext

cpdf_set_text_rise

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_set_text_rise -- Sets the text rise

Description

void cpdf_set_text_rise (int pdf document, double value)

The cpdf_set_text_rise() function sets the + text rising to value units. +


PrevHomeNext
cpdf_set_horiz_scalingUpcpdf_set_text_matrix
\ No newline at end of file diff --git a/function.cpdf-set-title.html b/function.cpdf-set-title.html new file mode 100644 index 0000000..b158ef0 --- /dev/null +++ b/function.cpdf-set-title.html @@ -0,0 +1,199 @@ +cpdf_set_title
PHP Manual
PrevNext

cpdf_set_title

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_set_title -- Sets the title field of the pdf document

Description

void cpdf_set_title (string title)

The cpdf_set_title() function sets the + title of a pdf document. +

See also cpdf_set_subject(), + cpdf_set_creator(), + cpdf_set_keywords(). +


PrevHomeNext
cpdf_set_creatorUpcpdf_set_subject
\ No newline at end of file diff --git a/function.cpdf-set-word-spacing.html b/function.cpdf-set-word-spacing.html new file mode 100644 index 0000000..e4c595d --- /dev/null +++ b/function.cpdf-set-word-spacing.html @@ -0,0 +1,192 @@ +cpdf_set_word_spacing
PHP Manual
PrevNext

cpdf_set_word_spacing

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_set_word_spacing -- Sets spacing between words

Description

void cpdf_set_word_spacing (int pdf document, double space)

The cpdf_set_word_spacing() function sets the + spacing between words. +

See also cpdf_set_char_spacing(), + cpdf_set_leading(). +


PrevHomeNext
cpdf_set_char_spacingUpcpdf_continue_text
\ No newline at end of file diff --git a/function.cpdf-setdash.html b/function.cpdf-setdash.html new file mode 100644 index 0000000..95212d0 --- /dev/null +++ b/function.cpdf-setdash.html @@ -0,0 +1,188 @@ +cpdf_setdash
PHP Manual
PrevNext

cpdf_setdash

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_setdash -- Sets dash pattern

Description

void cpdf_setdash (int pdf document, double white, double black)

The cpdf_setdash() function set the dash + pattern white white units and + black black units. If both are 0 a solid + line is set. +


PrevHomeNext
cpdf_setlinewidthUpcpdf_newpath
\ No newline at end of file diff --git a/function.cpdf-setflat.html b/function.cpdf-setflat.html new file mode 100644 index 0000000..a80f6b5 --- /dev/null +++ b/function.cpdf-setflat.html @@ -0,0 +1,176 @@ +cpdf_setflat
PHP Manual
PrevNext

cpdf_setflat

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_setflat -- Sets flatness

Description

void cpdf_setflat (int pdf document, double value)

The cpdf_setflat() function set the flatness to + a value between 0 and 100. +


PrevHomeNext
cpdf_rotateUpcpdf_setlinejoin
\ No newline at end of file diff --git a/function.cpdf-setgray-fill.html b/function.cpdf-setgray-fill.html new file mode 100644 index 0000000..bb636bd --- /dev/null +++ b/function.cpdf-setgray-fill.html @@ -0,0 +1,185 @@ +cpdf_setgray_fill
PHP Manual
PrevNext

cpdf_setgray_fill

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_setgray_fill -- Sets filling color to gray value

Description

void cpdf_setgray_fill (int pdf document, double value)

The cpdf_setgray_fill() function sets the current + gray value to fill a path. +

See also cpdf_setrgbcolor_fill(). +


PrevHomeNext
cpdf_clipUpcpdf_setgray_stroke
\ No newline at end of file diff --git a/function.cpdf-setgray-stroke.html b/function.cpdf-setgray-stroke.html new file mode 100644 index 0000000..627a3ac --- /dev/null +++ b/function.cpdf-setgray-stroke.html @@ -0,0 +1,185 @@ +cpdf_setgray_stroke
PHP Manual
PrevNext

cpdf_setgray_stroke

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_setgray_stroke -- Sets drawing color to gray value

Description

void cpdf_setgray_stroke (int pdf document, double gray value)

The cpdf_setgray_stroke() function sets the current + drawing color to the given gray value. +

See also cpdf_setrgbcolor_stroke(). +


PrevHomeNext
cpdf_setgray_fillUpcpdf_setgray
\ No newline at end of file diff --git a/function.cpdf-setgray.html b/function.cpdf-setgray.html new file mode 100644 index 0000000..55880d3 --- /dev/null +++ b/function.cpdf-setgray.html @@ -0,0 +1,195 @@ +cpdf_setgray
PHP Manual
PrevNext

cpdf_setgray

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_setgray -- Sets drawing and filling color to gray value

Description

void cpdf_setgray (int pdf document, double gray value)

The cpdf_setgray_stroke() function sets the current + drawing and filling color to the given gray value. +

See also cpdf_setrgbcolor_stroke(), + cpdf_setrgbcolor_fill(). +


PrevHomeNext
cpdf_setgray_strokeUpcpdf_setrgbcolor_fill
\ No newline at end of file diff --git a/function.cpdf-setlinecap.html b/function.cpdf-setlinecap.html new file mode 100644 index 0000000..8290544 --- /dev/null +++ b/function.cpdf-setlinecap.html @@ -0,0 +1,177 @@ +cpdf_setlinecap
PHP Manual
PrevNext

cpdf_setlinecap

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_setlinecap -- Sets linecap parameter

Description

void cpdf_setlinecap (int pdf document, int value)

The cpdf_setlinecap() function set the linecap + parameter between a value of 0 and 2. 0 = butt end, 1 = round, + 2 = projecting square. +


PrevHomeNext
cpdf_setlinejoinUpcpdf_setmiterlimit
\ No newline at end of file diff --git a/function.cpdf-setlinejoin.html b/function.cpdf-setlinejoin.html new file mode 100644 index 0000000..a50d87c --- /dev/null +++ b/function.cpdf-setlinejoin.html @@ -0,0 +1,177 @@ +cpdf_setlinejoin
PHP Manual
PrevNext

cpdf_setlinejoin

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_setlinejoin -- Sets linejoin parameter

Description

void cpdf_setlinejoin (int pdf document, long value)

The cpdf_setlinejoin() function set the + linejoin parameter between a value of 0 and 2. 0 = miter, 1 = + round, 2 = bevel. +


PrevHomeNext
cpdf_setflatUpcpdf_setlinecap
\ No newline at end of file diff --git a/function.cpdf-setlinewidth.html b/function.cpdf-setlinewidth.html new file mode 100644 index 0000000..40176e5 --- /dev/null +++ b/function.cpdf-setlinewidth.html @@ -0,0 +1,181 @@ +cpdf_setlinewidth
PHP Manual
PrevNext

cpdf_setlinewidth

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_setlinewidth -- Sets line width

Description

void cpdf_setlinewidth (int pdf document, double width)

The cpdf_setlinewidth() function set the line + width to width. +


PrevHomeNext
cpdf_setmiterlimitUpcpdf_setdash
\ No newline at end of file diff --git a/function.cpdf-setmiterlimit.html b/function.cpdf-setmiterlimit.html new file mode 100644 index 0000000..67eb06e --- /dev/null +++ b/function.cpdf-setmiterlimit.html @@ -0,0 +1,176 @@ +cpdf_setmiterlimit
PHP Manual
PrevNext

cpdf_setmiterlimit

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_setmiterlimit -- Sets miter limit

Description

void cpdf_setmiterlimit (int pdf document, double value)

The cpdf_setmiterlimit() function set the + miter limit to a value greater or equal than 1. +


PrevHomeNext
cpdf_setlinecapUpcpdf_setlinewidth
\ No newline at end of file diff --git a/function.cpdf-setrgbcolor-fill.html b/function.cpdf-setrgbcolor-fill.html new file mode 100644 index 0000000..59c22bb --- /dev/null +++ b/function.cpdf-setrgbcolor-fill.html @@ -0,0 +1,192 @@ +cpdf_setrgbcolor_fill
PHP Manual
PrevNext

cpdf_setrgbcolor_fill

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_setrgbcolor_fill -- Sets filling color to rgb color value

Description

void cpdf_setrgbcolor_fill (int pdf document, double red value, double green value, double blue value)

The cpdf_setrgbcolor_fill() function sets the current + rgb color value to fill a path. +

See also cpdf_setrgbcolor_stroke(), + cpdf_setrgbcolor(). +


PrevHomeNext
cpdf_setgrayUpcpdf_setrgbcolor_stroke
\ No newline at end of file diff --git a/function.cpdf-setrgbcolor-stroke.html b/function.cpdf-setrgbcolor-stroke.html new file mode 100644 index 0000000..c81db66 --- /dev/null +++ b/function.cpdf-setrgbcolor-stroke.html @@ -0,0 +1,192 @@ +cpdf_setrgbcolor_stroke
PHP Manual
PrevNext

cpdf_setrgbcolor_stroke

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_setrgbcolor_stroke -- Sets drawing color to rgb color value

Description

void cpdf_setrgbcolor_stroke (int pdf document, double red value, double green value, double blue value)

The cpdf_setrgbcolor_stroke() function sets the current + drawing color to the given rgb color value. +

See also cpdf_setrgbcolor_fill(), + cpdf_setrgbcolor(). +


PrevHomeNext
cpdf_setrgbcolor_fillUpcpdf_setrgbcolor
\ No newline at end of file diff --git a/function.cpdf-setrgbcolor.html b/function.cpdf-setrgbcolor.html new file mode 100644 index 0000000..0043eb6 --- /dev/null +++ b/function.cpdf-setrgbcolor.html @@ -0,0 +1,195 @@ +cpdf_setrgbcolor
PHP Manual
PrevNext

cpdf_setrgbcolor

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_setrgbcolor -- Sets drawing and filling color to rgb color value

Description

void cpdf_setrgbcolor (int pdf document, double red value, double green value, double blue value)

The cpdf_setrgbcolor_stroke() function sets the current + drawing and filling color to the given rgb color value. +

See also cpdf_setrgbcolor_stroke(), + cpdf_setrgbcolor_fill(). +


PrevHomeNext
cpdf_setrgbcolor_strokeUpcpdf_add_outline
\ No newline at end of file diff --git a/function.cpdf-show-xy.html b/function.cpdf-show-xy.html new file mode 100644 index 0000000..f20d752 --- /dev/null +++ b/function.cpdf-show-xy.html @@ -0,0 +1,235 @@ +cpdf_show_xy
PHP Manual
PrevNext

cpdf_show_xy

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_show_xy -- Output text at position

Description

void cpdf_show_xy (int pdf document, string text, double x-coor, double y-coor [, int mode])

The cpdf_show_xy() function outputs the + string text at position with coordinates + (x-coor, y-coor). +

The optional parameter mode determines the unit + length. If it's 0 or omitted the default unit as specified for the page is + used. Otherwise the coordinates are measured in postscript points + disregarding the current unit. +

Note: + The function cpdf_show_xy() is identical to + cpdf_text() without the optional parameters. +

+

See also cpdf_text(). +


PrevHomeNext
cpdf_showUpcpdf_text
\ No newline at end of file diff --git a/function.cpdf-show.html b/function.cpdf-show.html new file mode 100644 index 0000000..6f41c4a --- /dev/null +++ b/function.cpdf-show.html @@ -0,0 +1,204 @@ +cpdf_show
PHP Manual
PrevNext

cpdf_show

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_show -- Output text at current position

Description

void cpdf_show (int pdf document, string text)

The cpdf_show() function outputs the + string in text at the current position. +

See also cpdf_text(), + cpdf_begin_text(), + cpdf_end_text(). +


PrevHomeNext
cpdf_end_textUpcpdf_show_xy
\ No newline at end of file diff --git a/function.cpdf-stringwidth.html b/function.cpdf-stringwidth.html new file mode 100644 index 0000000..1614b94 --- /dev/null +++ b/function.cpdf-stringwidth.html @@ -0,0 +1,191 @@ +cpdf_stringwidth
PHP Manual
PrevNext

cpdf_stringwidth

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_stringwidth -- Returns width of text in current font

Description

double cpdf_stringwidth (int pdf document, string text)

The cpdf_stringwidth() function returns the + width of the string in text. It requires + a font to be set before. +

See also cpdf_set_font(). +


PrevHomeNext
cpdf_continue_textUpcpdf_save
\ No newline at end of file diff --git a/function.cpdf-stroke.html b/function.cpdf-stroke.html new file mode 100644 index 0000000..6ffd54e --- /dev/null +++ b/function.cpdf-stroke.html @@ -0,0 +1,192 @@ +cpdf_stroke
PHP Manual
PrevNext

cpdf_stroke

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_stroke -- Draw line along path

Description

void cpdf_stroke (int pdf document)

The cpdf_stroke() function draws a line along + current path. +

See also cpdf_closepath(), + cpdf_closepath_stroke(). +


PrevHomeNext
cpdf_closepathUpcpdf_closepath_stroke
\ No newline at end of file diff --git a/function.cpdf-text.html b/function.cpdf-text.html new file mode 100644 index 0000000..78fd554 --- /dev/null +++ b/function.cpdf-text.html @@ -0,0 +1,229 @@ +cpdf_text
PHP Manual
PrevNext

cpdf_text

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_text -- Output text with parameters

Description

void cpdf_text (int pdf document, string text, double x-coor, double y-coor [, int mode [, double orientation [, int alignmode]]])

The cpdf_text() function outputs the string + text at position with coordinates + (x-coor, y-coor). +

The optional parameter mode determines the + unit length. If it's 0 or omitted the default unit as specified + for the page is used. Otherwise the coordinates are measured in + postscript points disregarding the current unit. The optional + parameter orientation is the rotation of + the text in degree. The optional parameter + alignmode determines how the text is + aligned. +

See the ClibPDF documentation for possible values. +

See also cpdf_show_xy(). +


PrevHomeNext
cpdf_show_xyUpcpdf_set_font
\ No newline at end of file diff --git a/function.cpdf-translate.html b/function.cpdf-translate.html new file mode 100644 index 0000000..10eeb33 --- /dev/null +++ b/function.cpdf-translate.html @@ -0,0 +1,198 @@ +cpdf_translate
PHP Manual
PrevNext

cpdf_translate

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

cpdf_translate -- Sets origin of coordinate system

Description

void cpdf_translate (int pdf document, double x-coor, double y-coor [, int mode])

The cpdf_translate() function set the origin of + coordinate system to the point (x-coor, + y-coor). +

The optional parameter mode determines the unit + length. If it's 0 or omitted the default unit as specified for the page + is used. Otherwise the coordinates are measured in postscript points + disregarding the current unit. +


PrevHomeNext
cpdf_restoreUpcpdf_scale
\ No newline at end of file diff --git a/function.crc32.html b/function.crc32.html new file mode 100644 index 0000000..1ff9341 --- /dev/null +++ b/function.crc32.html @@ -0,0 +1,188 @@ +crc32
PHP Manual
PrevNext

crc32

(PHP4 >= 4.0.1)

crc32 -- Calculates the crc32 polynomial of a string

Description

int crc32 (string str)

Generates the cyclic redundancy checksum polynomial of 32-bit lengths of + the str. This is usually used to validate the + integrity of data being trasmited. +

See also: md5() +


PrevHomeNext
count_charsUpcrypt
\ No newline at end of file diff --git a/function.create-function.html b/function.create-function.html new file mode 100644 index 0000000..6673089 --- /dev/null +++ b/function.create-function.html @@ -0,0 +1,435 @@ +create_function
PHP Manual
PrevNext

create_function

(PHP4 >= 4.0.1)

create_function -- Create an anonymous (lambda-style) function

Description

string create_function (string args, string code)

Creates an anonymous function from the parameters passed, and + returns a unique name for it. Usually the + args will be passed as a single quote + delimited string, and this is also recommended for the + code. The reason for using single quoted + strings, is to protect + the variable names from parsing, otherwise, if you use double + quotes there will be a need to escape the variable names, e.g. + \$avar. +

You can use this function, to (for example) create a function + from information gathered at run time: +

Example 1. + Creating an anonymous function with create_function() +


$newfunc = create_function('$a,$b','return "ln($a) + ln($b) = ".log($a * $b);');
+echo "New anonymous function: $newfunc\n";
+echo $newfunc(2,M_E)."\n";
+// outputs
+// New anonymous function: lambda_1
+// ln(2) + ln(2.718281828459) = 1.6931471805599
+      
+ Or, perhaps to have general handler function that can apply a set + of operations to a list of parameters: +

Example 2. + Making a general processing function with + create_function() +


function process($var1, $var2, $farr) {
+    for ($f=0; $f < count($farr); $f++)
+    echo $farr[$f]($var1,$var2)."\n";
+}
+
+// create a bunch of math functions
+$f1 = 'if ($a >=0) {return "b*a^2 = ".$b*sqrt($a);} else {return false;}';
+$f2 = "return \"min(b^2+a, a^2,b) = \".min(\$a*\$a+\$b,\$b*\$b+\$a);";
+$f3 = 'if ($a > 0 && $b != 0) {return "ln(a)/b = ".log($a)/$b;} else {return false;}';
+$farr = array(
+    create_function('$x,$y', 'return "some trig: ".(sin($x) + $x*cos($y));'),
+    create_function('$x,$y', 'return "a hypotenuse: ".sqrt($x*$x + $y*$y);'),
+    create_function('$a,$b', $f1),
+    create_function('$a,$b', $f2),
+    create_function('$a,$b', $f3)
+    );
+
+echo "\nUsing the first array of anonymous functions\n";
+echo "parameters: 2.3445, M_PI\n";
+process(2.3445, M_PI, $farr);
+
+// now make a bunch of string processing functions
+$garr = array(
+    create_function('$b,$a','if (strncmp($a,$b,3) == 0) return "** \"$a\" '.
+    'and \"$b\"\n** Look the same to me! (looking at the first 3 chars)";'),
+    create_function('$a,$b','; return "CRCs: ".crc32($a)." , ".crc32(b);'),
+    create_function('$a,$b','; return "similar(a,b) = ".similar_text($a,$b,&$p)."($p%)";')
+    );
+echo "\nUsing the second array of anonymous functions\n";
+process("Twas brilling and the slithy toves", "Twas the night", $garr);
+      
+ and when you run the code above, the output will be: +


Using the first array of anonymous functions
+parameters: 2.3445, M_PI
+some trig: -1.6291725057799
+a hypotenuse: 3.9199852871011
+b*a^2 = 4.8103313314525
+min(b^2+a, a^2,b) = 8.6382729035898
+ln(a/b) = 0.27122299212594
+
+Using the second array of anonymous functions
+** "Twas the night" and "Twas brilling and the slithy toves"
+** Look the same to me! (looking at the first 3 chars)
+CRCs: -725381282 , 1908338681
+similar(a,b) = 11(45.833333333333%)
+      

+ But perhaps the most common use for of lambda-style (anonymous) functions + is to create callback functions, for example when using + array_walk() or usort() +

Example 3. Using anonymous functions as callback functions


$av = array("the ","a ","that ","this ");
+array_walk($av, create_function('&$v,$k','$v = $v."mango";'));
+print_r($av);  // for PHP 3 use var_dump()
+// outputs:
+// Array
+// (
+//   [0] => the mango
+//   [1] => a mango
+//   [2] => that mango
+//   [3] => this mango
+// )
+
+// an array of strings ordered from shorter to longer
+$sv = array("small","larger","a big string","it is a string thing");
+print_r($sv);
+// outputs:
+// Array
+// (
+//   [0] => small
+//   [1] => larger
+//   [2] => a big string
+//   [3] => it is a string thing
+// )
+
+// sort it from longer to shorter
+usort($sv, create_function('$a,$b','return strlen($b) - strlen($a);'));
+print_r($sv);
+// outputs:
+// Array
+// (
+//   [0] => it is a string thing
+//   [1] => a big string
+//   [2] => larger
+//   [3] => small
+// )
+     
+


PrevHomeNext
call_user_funcUpfunc_get_arg
\ No newline at end of file diff --git a/function.crypt.html b/function.crypt.html new file mode 100644 index 0000000..92a594a --- /dev/null +++ b/function.crypt.html @@ -0,0 +1,261 @@ +crypt
PHP Manual
PrevNext

crypt

(PHP3 , PHP4 )

crypt -- DES-encrypt a string

Description

string crypt (string str [, string + salt])

crypt() will encrypt a string using the + standard Unix DES encryption method. Arguments + are a string to be encrypted and an optional two-character salt + string to base the encryption on. See the Unix man page for your + crypt function for more information. +

If the salt argument is not provided, one will be randomly + generated by PHP. +

Some operating systems support more than one type of encryption. + In fact, sometimes the standard DES encryption is replaced by an + MD5 based encryption algorithm. The encryption type is triggered + by the salt argument. At install time, PHP determines the + capabilities of the crypt function and will accept salts for + other encryption types. If no salt is provided, PHP will + auto-generate a standard 2-character DES salt by default, unless + the default encryption type on the system is MD5, in which case a + random MD5-compatible salt is generated. PHP sets a constant + named CRYPT_SALT_LENGTH which tells you whether a regular + 2-character salt applies to your system or the longer 12-char MD5 + salt is applicable. +

If you are using the supplied salt, you should be aware that the + salt is generated once. If you are calling this function + recursively, this may impact both appearance and, to a certain + extent, security. +

The standard DES encryption crypt() contains + the salt as the first two characters of the output. +

On systems where the crypt() function supports multiple + encryption types, the following constants are set to 0 or 1 + depending on whether the given type is available: +

  • CRYPT_STD_DES - Standard DES encryption with a 2-char SALT +

  • CRYPT_EXT_DES - Extended DES encryption with a 9-char SALT +

  • CRYPT_MD5 - MD5 encryption with a 12-char SALT starting with + $1$ +

  • CRYPT_BLOWFISH - Extended DES encryption with a 16-char SALT + starting with $2$ +

There is no decrypt function, since crypt() + uses a one-way algorithm. +

See also: md5(). +


PrevHomeNext
crc32Upecho
\ No newline at end of file diff --git a/function.curl-close.html b/function.curl-close.html new file mode 100644 index 0000000..af389b8 --- /dev/null +++ b/function.curl-close.html @@ -0,0 +1,181 @@ +curl_close
PHP Manual
PrevNext

curl_close

(PHP4 >= 4.0.2)

curl_close -- Close a CURL session

Description

void + curl_close + (int + ch)

This functions closes a CURL session and frees all ressources. + The CURL handle, ch, is also deleted. +


PrevHomeNext
curl_execUpcurl_version
\ No newline at end of file diff --git a/function.curl-exec.html b/function.curl-exec.html new file mode 100644 index 0000000..fedfbad --- /dev/null +++ b/function.curl-exec.html @@ -0,0 +1,183 @@ +curl_exec
PHP Manual
PrevNext

curl_exec

(PHP4 >= 4.0.2)

curl_exec -- Perform a CURL session

Description

bool + curl_exec + (int + ch)

This function is should be called after you initialize a CURL + session and all the options for the session are set. Its purpose + is simply to execute the predefined CURL session (given by the + ch). +


PrevHomeNext
curl_setoptUpcurl_close
\ No newline at end of file diff --git a/function.curl-init.html b/function.curl-init.html new file mode 100644 index 0000000..71a78bb --- /dev/null +++ b/function.curl-init.html @@ -0,0 +1,276 @@ +curl_init
PHP Manual
PrevNext

curl_init

(PHP4 >= 4.0.2)

curl_init -- Initialize a CURL session

Description

int + curl_init + ([string + url])

The curl_init() will initialize a new session + and return a CURL handle for use with the + curl_setopt(), curl_exec(), + and curl_close() functions. If the optional + url parameter is supplied then the + CURLOPT_URL option will be set to the value of the parameter. + You can manually set this using the + curl_setopt() function. +

Example 1. + Initializing a new CURL session and fetching a webpage +


<?php
+$ch = curl_init();
+
+curl_setopt ($ch, CURLOPT_URL, "http://www.zend.com/");
+curl_setopt ($ch, CURLOPT_HEADER, 0);
+
+curl_exec ($ch);
+
+curl_close ($ch);
+?>
+      
+

See also: curl_close(), + curl_setopt() +


PrevHomeNext
CURL, Client URL Library FunctionsUpcurl_setopt
\ No newline at end of file diff --git a/function.curl-setopt.html b/function.curl-setopt.html new file mode 100644 index 0000000..1de6d9a --- /dev/null +++ b/function.curl-setopt.html @@ -0,0 +1,761 @@ +curl_setopt
PHP Manual
PrevNext

curl_setopt

(PHP4 >= 4.0.2)

curl_setopt -- Set an option for a CURL transfer

Description

bool + curl_setopt + (int + ch, string + option, mixed + value)

The curl_setopt() function will set options + for a CURL session identified by the ch + parameter. The option parameter is the + option you want to set, and the value is + the value of the option given by the + option. +

The value should be a long for the + following options (specified in the option + parameter): +

  • CURLOPT_INFILESIZE: When you are + uploading a file to a remote site, this option should be used + to tell PHP what the expected size of the infile will be. +

  • CURLOPT_VERBOSE: Set this option to a + non-zero value if you want CURL to report everything that is + happening. +

  • CURLOPT_HEADER: Set this option to a + non-zero value if you want the header to be included in the + output. +

  • CURLOPT_NOPROGRESS: Set this option to + a non-zero value if you don't want PHP to display a progress + meter for CURL transfers +

    Note: + PHP automatically sets this option to a non-zero parameter, + this should only be changed for debugging purposes. +

    +

  • CURLOPT_NOBODY: Set this option to a + non-zero value if you don't want the body included with the + output. +

  • CURLOPT_FAILONERROR: Set this option to + a non-zero value if you want PHP to fail silently if the HTTP + code returned is greater than 300. The default behaviour is + to return the page normally, ignoring the code. +

  • CURLOPT_UPLOAD: Set this option to a + non-zero value if you want PHP to prepare for an upload. +

  • CURLOPT_POST: Set this option to a + non-zero value if you want PHP to do a regular HTTP POST. + This POST is a normal application/x-www-from-urlencoded kind, + most commonly used by HTML forms. +

  • CURLOPT_FTPLISTONLY: Set this option to + a non-zero value and PHP will just list the names of an FTP + directory. +

  • CURLOPT_FTPAPPEND: Set this option to a + non-zero value and PHP will append to the remote file instead + of overwriting it. +

  • CURLOPT_NETRC: Set this option to a + non-zero value and PHP will scan your ~./netrc file to find + your username and password for the remote site that you're + establishing a connection with. +

  • CURLOPT_FOLLOWLOCATION: Set this option + to a non-zero value to follow any "Location: " header that the + server sends as a part of the HTTP header (note this is + recursive, PHP will follow as many "Location: " headers that + it is sent.) +

  • CURLOPT_PUT: Set this option a non-zero + value to HTTP PUT a file. The file to PUT must be set with + the CURLOPT_INFILE and CURLOPT_INFILESIZE. +

  • CURLOPT_MUTE: Set this option to a + non-zero value and PHP will be completely silent with regards + to the CURL functions. +

  • CURLOPT_TIMEOUT: Pass a long as a + parameter that contains the maximum time, in seconds, that + you'll allow the curl functions to take. +

  • CURLOPT_LOW_SPEED_LIMIT: Pass a long as + a parameter that contains the transfer speed in bytes per + second that the transfer should be below during + CURLOPT_LOW_SPEED_TIME seconds for PHP to consider it too slow + and abort. +

  • CURLOPT_LOW_SPEED_TIME: Pass a long as + a parameter that contains the time in seconds that the + transfer should be below the CURLOPT_LOW_SPEED_LIMIT for PHP + to consider it too slow and abort. +

  • CURLOPT_RESUME_FROM: Pass a long as a + parameter that contains the offset, in bytes, that you want + the transfer to start from. +

  • CURLOPT_SSLVERSION: Pass a long as a + parameter that contains the SSL version (2 or 3) to use. By + default PHP will try and determine this by itself, although, + in some cases you must set this manually. +

  • CURLOPT_TIMECONDITION: Pass a long as a + parameter that defines how the CURLOPT_TIMEVALUE is treated. + You can set this parameter to TIMECOND_IFMODSINCE or + TIMECOND_ISUNMODSINCE. This is a HTTP-only feature. +

  • CURLOPT_TIMEVALUE: Pass a long as a + parameter that is the time in seconds since January 1st, 1970. + The time will be used as specified by the CURLOPT_TIMEVALUE + option, or by default the TIMECOND_IFMODSINCE will be used. +

+

The value parameter should be a string for + the following values of the option + parameter: +

  • CURLOPT_URL: This is the URL that you + want PHP to fetch. You can also set this option when + initializing a session with the curl_init() + function. +

  • CURLOPT_USERPWD: Pass a string + formatted in the [username]:[password] manner, for PHP to use + for the connection. connection. +

  • CURLOPT_PROXYUSERPWD: Pass a string + formatted in the [username]:[password] format for connection + to the HTTP proxy. +

  • CURLOPT_RANGE: Pass the specified range + you want. It should be in the "X-Y" format, where X or Y may + be left out. The HTTP transfers also support several + intervals, seperated with commas as in X-Y,N-M. +

  • CURLOPT_POSTFIELDS: Pass a string + containing the full data to post in an HTTP "POST" operation. +

  • CURLOPT_REFERER: Pass a string + containing the "referer" header to be used in an HTTP request. +

  • CURLOPT_USERAGENT: Pass a string + containing the "user-agent" header to be used in an HTTP + request. +

  • CURLOPT_FTPPORT: Pass a string + containing the which will be used to get the IP address to use + for the ftp "PORT" instruction. The POST instruction tells + the remote server to connect to our specified IP address. The + string may be a plain IP address, a hostname, a network + interface name (under UNIX), or just a plain '-' to use the + systems default IP address. +

  • CURLOPT_COOKIE: Pass a string + containing the content of the cookie to be set in the HTTP + header. +

  • CURLOPT_SSLCERT: Pass a string + containing the filename of PEM formatted certificate. +

  • CURLOPT_SSLCERTPASSWD: Pass a string + containing the password required to use the CURLOPT_SSLCERT + certificate. +

  • CURLOPT_COOKIEFILE: Pass a string + containing the name of the file containing the cookiee data. + The cookie file can be in Netscape format, or just plain + HTTP-style headers dumped into a file. +

  • CURLOPT_CUSTOMREQUEST: Pass a string to + be used instead of GET or HEAD when doing an HTTP request. + This is useful for doing DELETE or another, more obscure, HTTP + request. +

    Note: + Don't do this without making sure your server supports the + command first. +

    +

+

The following options expect a file descriptor that is obtained + by using the fopen() function: +

  • CURLOPT_FILE: The file where the output + of your transfer should be placed, the default is STDOUT. +

  • CURLOPT_INFILE: The file where the + input of your transfer comes from. +

  • CURLOPT_WRITEHEADER: The file to write + the header part of the output into. +

  • CURLOPT_STDERR: The file to write + errors to instead of stderr. +

+


PrevHomeNext
curl_initUpcurl_exec
\ No newline at end of file diff --git a/function.curl-version.html b/function.curl-version.html new file mode 100644 index 0000000..53b16be --- /dev/null +++ b/function.curl-version.html @@ -0,0 +1,178 @@ +curl_version
PHP Manual
PrevNext

curl_version

(PHP4 >= 4.0.2)

curl_version -- Return the current CURL version

Description

string + curl_version + (void);

The curl_version() function returns a string + containing the current CURL version. +


PrevHomeNext
curl_closeUpCybercash payment functions
\ No newline at end of file diff --git a/function.current.html b/function.current.html new file mode 100644 index 0000000..96fdf82 --- /dev/null +++ b/function.current.html @@ -0,0 +1,257 @@ +current
PHP Manual
PrevNext

current

(PHP3 , PHP4 )

current -- Return the current element in an array

Description

mixed current (array array)

Every array has an internal pointer to its "current" element, + which is initialized to the first element inserted into the + array. +

The current() function simply returns the + array element that's currently being pointed by the internal + pointer. It does not move the pointer in any way. If the + internal pointer points beyond the end of the elements list, + current() returns false. +

Warning

+ If the array contains empty elements (0 or "", the empty + string) then this function will return false for these elements + as well. This makes it impossible to determine if you are + really at the end of the list in such an array using + current(). To properly traverse an array + that may contain empty elements, use the + each() function. +

+

See also: end(), next(), + prev(), and reset(). +


PrevHomeNext
countUpeach
\ No newline at end of file diff --git a/function.cybercash-base64-decode.html b/function.cybercash-base64-decode.html new file mode 100644 index 0000000..c251b14 --- /dev/null +++ b/function.cybercash-base64-decode.html @@ -0,0 +1,173 @@ +cybercash_base64_decode
PHP Manual
PrevNext

cybercash_base64_decode

(PHP4 >= 4.0b4)

cybercash_base64_decode -- 

Description

string + cybercash_base64_decode + (string inbuff)


PrevHomeNext
cybercash_base64_encodeUpDatabase (dbm-style) abstraction layer functions
\ No newline at end of file diff --git a/function.cybercash-base64-encode.html b/function.cybercash-base64-encode.html new file mode 100644 index 0000000..6c479cc --- /dev/null +++ b/function.cybercash-base64-encode.html @@ -0,0 +1,173 @@ +cybercash_base64_encode
PHP Manual
PrevNext

cybercash_base64_encode

(PHP4 >= 4.0b4)

cybercash_base64_encode -- ???

Description

string + cybercash_base64_encode + (string inbuff)


PrevHomeNext
cybercash_decrUpcybercash_base64_decode
\ No newline at end of file diff --git a/function.cybercash-decr.html b/function.cybercash-decr.html new file mode 100644 index 0000000..5a4aceb --- /dev/null +++ b/function.cybercash-decr.html @@ -0,0 +1,174 @@ +cybercash_decr
PHP Manual
PrevNext

cybercash_decr

(PHP4 >= 4.0b4)

cybercash_decr -- ???

Description

array cybercash_decr (string wmk, string sk, string inbuff)

The function returns an associative array with the elements + "errcode" and, if "errcode" is false, "outbuff" (string), + "outLth" (long) and "macbuff" (string). +


PrevHomeNext
cybercash_encrUpcybercash_base64_encode
\ No newline at end of file diff --git a/function.cybercash-encr.html b/function.cybercash-encr.html new file mode 100644 index 0000000..ac28d19 --- /dev/null +++ b/function.cybercash-encr.html @@ -0,0 +1,174 @@ +cybercash_encr
PHP Manual
PrevNext

cybercash_encr

(PHP4 >= 4.0b4)

cybercash_encr -- ???

Description

array cybercash_encr (string wmk, string sk, string inbuff)

The function returns an associative array with the elements + "errcode" and, if "errcode" is false, "outbuff" (string), + "outLth" (long) and "macbuff" (string). +


PrevHomeNext
Cybercash payment functionsUpcybercash_decr
\ No newline at end of file diff --git a/function.date.html b/function.date.html new file mode 100644 index 0000000..a735c02 --- /dev/null +++ b/function.date.html @@ -0,0 +1,478 @@ +date
PHP Manual
PrevNext

date

(PHP3 , PHP4 )

date -- Format a local time/date

Description

string date (string format [, int + timestamp])

Returns a string formatted according to the given format string + using the given timestamp or the current + local time if no timestamp is given. +

The following characters are recognized in the format string: +

  • a - "am" or "pm" +

  • A - "AM" or "PM" +

  • B - Swatch Internet time +

  • d - day of the month, 2 digits with leading zeros; i.e. "01" + to "31" +

  • D - day of the week, textual, 3 letters; i.e. "Fri" +

  • F - month, textual, long; i.e. "January" +

  • g - hour, 12-hour format without leading zeros; i.e. "1" to + "12" +

  • G - hour, 24-hour format without leading zeros; i.e. "0" to + "23" +

  • h - hour, 12-hour format; i.e. "01" to "12" +

  • H - hour, 24-hour format; i.e. "00" to "23" +

  • i - minutes; i.e. "00" to "59" +

  • I (capital i) - "1" if Daylight Savings Time, "0" otherwise. +

  • j - day of the month without leading zeros; i.e. "1" to "31" +

  • l (lowercase 'L') - day of the week, textual, long; + i.e. "Friday" +

  • L - boolean for whether it is a leap year; i.e. "0" or "1" +

  • m - month; i.e. "01" to "12" +

  • M - month, textual, 3 letters; i.e. "Jan" +

  • n - month without leading zeros; i.e. "1" to "12" +

  • s - seconds; i.e. "00" to "59" +

  • S - English ordinal suffix, textual, 2 characters; i.e. "th", + "nd" +

  • t - number of days in the given month; i.e. "28" to "31" +

  • T - Timezone setting of this machine; i.e. "MDT" +

  • U - seconds since the epoch +

  • w - day of the week, numeric, i.e. "0" (Sunday) to "6" + (Saturday) +

  • Y - year, 4 digits; i.e. "1999" +

  • y - year, 2 digits; i.e. "99" +

  • z - day of the year; i.e. "0" to "365" +

  • Z - timezone offset in seconds (i.e. "-43200" to "43200") +

+ Unrecognized characters in the format string will be printed + as-is. The "Z" format will always return "0" when using + gmdate(). +

Example 1. Date() example


print (date ("l dS of F Y h:i:s A"));
+print ("July 1, 2000 is on a " . date ("l", mktime(0,0,0,7,1,2000)));
+      
+

It is possible to use date() and + mktime() together to find dates in the future + or the past. +

Example 2. + Date() and mktime() + example +


$tomorrow  = mktime (0,0,0,date("m")  ,date("d")+1,date("Y"));
+$lastmonth = mktime (0,0,0,date("m")-1,date("d"),  date("Y"));
+$nextyear  = mktime (0,0,0,date("m"),  date("d"),  date("Y")+1);
+      
+

To format dates in other languages, you should use the + setlocale() and strftime() + functions. +

See also gmdate() and + mktime(). +


PrevHomeNext
checkdateUpgetdate
\ No newline at end of file diff --git a/function.dba-close.html b/function.dba-close.html new file mode 100644 index 0000000..6672e7c --- /dev/null +++ b/function.dba-close.html @@ -0,0 +1,219 @@ +dba_close
PHP Manual
PrevNext

dba_close

(PHP3 >= 3.0.8, PHP4 >= 4.0b2)

dba_close -- Close database

Description

void dba_close (int handle)

Dba_close() closes the established database + and frees all resources specified by + handle. +

handle is a database handle returned by + dba_open(). +

Dba_close() does not return any value. +

See also: dba_open() and + dba_popen() +


PrevHomeNext
Database (dbm-style) abstraction layer functionsUpdba_delete
\ No newline at end of file diff --git a/function.dba-delete.html b/function.dba-delete.html new file mode 100644 index 0000000..100401f --- /dev/null +++ b/function.dba-delete.html @@ -0,0 +1,247 @@ +dba_delete
PHP Manual
PrevNext

dba_delete

(PHP3 >= 3.0.8, PHP4 >= 4.0b2)

dba_delete -- Delete entry specified by key

Description

string dba_delete (string key, int handle)

dba_delete() deletes the entry specified by + key from the database specified with + handle. +

key is the key of the entry which is + deleted. +

handle is a database handle returned by + dba_open(). +

dba_delete() returns true or false, if the entry is + deleted or not deleted, respectively. +

See also: dba_exists(), + dba_fetch(), dba_insert(), + and dba_replace(). +


PrevHomeNext
dba_closeUpdba_exists
\ No newline at end of file diff --git a/function.dba-exists.html b/function.dba-exists.html new file mode 100644 index 0000000..0dcf3e6 --- /dev/null +++ b/function.dba-exists.html @@ -0,0 +1,246 @@ +dba_exists
PHP Manual
PrevNext

dba_exists

(PHP3 >= 3.0.8, PHP4 >= 4.0b2)

dba_exists -- Check whether key exists

Description

bool dba_exists (string key, int handle)

Dba_exists() checks whether the specified + key exists in the database specified by + handle. +

Key is the key the check is performed for. +

Handle is a database handle returned by + dba_open(). +

Dba_exists() returns true or false, if the key is found + or not found, respectively. +

See also: dba_fetch(), + dba_delete(), dba_insert(), + and dba_replace(). +


PrevHomeNext
dba_deleteUpdba_fetch
\ No newline at end of file diff --git a/function.dba-fetch.html b/function.dba-fetch.html new file mode 100644 index 0000000..42b2e6f --- /dev/null +++ b/function.dba-fetch.html @@ -0,0 +1,246 @@ +dba_fetch
PHP Manual
PrevNext

dba_fetch

(PHP3 >= 3.0.8, PHP4 >= 4.0b2)

dba_fetch -- Fetch data specified by key

Description

string dba_fetch (string key, int handle)

Dba_fetch() fetches the data specified by + key from the database specified with + handle. +

Key is the key the data is specified by. +

Handle is a database handle returned by + dba_open(). +

Dba_fetch() returns the associated string or false, if + the key/data pair is found or not found, respectively. +

See also: dba_exists(), + dba_delete(), dba_insert(), + and dba_replace(). +


PrevHomeNext
dba_existsUpdba_firstkey
\ No newline at end of file diff --git a/function.dba-firstkey.html b/function.dba-firstkey.html new file mode 100644 index 0000000..9b354f4 --- /dev/null +++ b/function.dba-firstkey.html @@ -0,0 +1,212 @@ +dba_firstkey
PHP Manual
PrevNext

dba_firstkey

(PHP3 >= 3.0.8, PHP4 >= 4.0b2)

dba_firstkey -- Fetch first key

Description

string dba_firstkey (int handle)

Dba_firstkey() returns the first key of the + database specified by handle and resets + the internal key pointer. This permits a linear search through + the whole database. +

Handle is a database handle returned by + dba_open(). +

Dba_firstkey() returns the key or false + depending on whether it succeeds or fails, respectively. +

See also: + Dba_nextkey() +


PrevHomeNext
dba_fetchUpdba_insert
\ No newline at end of file diff --git a/function.dba-insert.html b/function.dba-insert.html new file mode 100644 index 0000000..28c7b39 --- /dev/null +++ b/function.dba-insert.html @@ -0,0 +1,267 @@ +dba_insert
PHP Manual
PrevNext

dba_insert

(PHP3 >= 3.0.8, PHP4 >= 4.0b2)

dba_insert -- Insert entry

Description

bool dba_insert (string key, string value, int handle)

dba_insert() inserts the entry described with + key and value into the + database specified by handle. It fails, if an entry + with the same key already exists. +

key is the key of the entry to be inserted. +

value is the value to be inserted. +

handle is a database handle returned by + dba_open(). +

dba_insert() returns true or false, depending on + whether it succeeds of fails, respectively. +

See also: + dba_exists() + dba_delete() + dba_fetch() + dba_replace() +


PrevHomeNext
dba_firstkeyUpdba_nextkey
\ No newline at end of file diff --git a/function.dba-nextkey.html b/function.dba-nextkey.html new file mode 100644 index 0000000..a93e076 --- /dev/null +++ b/function.dba-nextkey.html @@ -0,0 +1,214 @@ +dba_nextkey
PHP Manual
PrevNext

dba_nextkey

(PHP3 >= 3.0.8, PHP4 >= 4.0b2)

dba_nextkey -- Fetch next key

Description

string dba_nextkey (int handle)

dba_nextkey() returns the next key of the database + specified by handle and increments the internal + key pointer. +

handle is a database handle returned by + dba_open(). +

dba_nextkey() returns the key or false depending on + whether it succeeds or fails, respectively. +

See also: + dba_firstkey() +


PrevHomeNext
dba_insertUpdba_popen
\ No newline at end of file diff --git a/function.dba-open.html b/function.dba-open.html new file mode 100644 index 0000000..3f93d01 --- /dev/null +++ b/function.dba-open.html @@ -0,0 +1,254 @@ +dba_open
PHP Manual
PrevNext

dba_open

(PHP3 >= 3.0.8, PHP4 >= 4.0b2)

dba_open -- Open database

Description

int dba_open (string path, string mode, string handler [, ...])

dba_open() establishes a database instance for + path with mode using + handler. +

path is commonly a regular path in your filesystem. +

mode is "r" for read access, "w" for read/write + access to an already existing database, "c" for read/write access + and database creation if it doesn't currently exist, and "n" for + create, truncate and read/write access. +

handler is the name of the handler which shall be + used for accessing path. It is passed all optional + parameters given to dba_open() and can act on behalf of + them. +

dba_open() returns a positive handler id or false, in + the case the open is successful or fails, respectively. +

See also: + dba_popen() + dba_close() +


PrevHomeNext
dba_popenUpdba_optimize
\ No newline at end of file diff --git a/function.dba-optimize.html b/function.dba-optimize.html new file mode 100644 index 0000000..35dacc3 --- /dev/null +++ b/function.dba-optimize.html @@ -0,0 +1,213 @@ +dba_optimize
PHP Manual
PrevNext

dba_optimize

(PHP3 >= 3.0.8, PHP4 >= 4.0b2)

dba_optimize -- Optimize database

Description

bool dba_optimize (int handle)

dba_optimize() optimizes the underlying database + specified by handle. +

handle is a database handle returned by + dba_open(). +

dba_optimize() returns true or false, if the + optimization succeeds or fails, respectively. +

See also: + dba_sync() +


PrevHomeNext
dba_openUpdba_replace
\ No newline at end of file diff --git a/function.dba-popen.html b/function.dba-popen.html new file mode 100644 index 0000000..6a17bbf --- /dev/null +++ b/function.dba-popen.html @@ -0,0 +1,254 @@ +dba_popen
PHP Manual
PrevNext

dba_popen

(PHP3 >= 3.0.8, PHP4 >= 4.0b2)

dba_popen -- Open database persistently

Description

int dba_popen (string path, string mode, string handler [, ...])

dba_popen() establishes a persistent database instance + for path with mode using + handler. +

path is commonly a regular path in your filesystem. +

mode is "r" for read access, "w" for read/write + access to an already existing database, "c" for read/write access + and database creation if it doesn't currently exist, and "n" for + create, truncate and read/write access. +

handler is the name of the handler which shall be + used for accessing path. It is passed all optional + parameters given to dba_popen() and can act on behalf + of them. +

dba_popen() returns a positive handler id or false, in + the case the open is successful or fails, respectively. +

See also: + dba_open() + dba_close() +


PrevHomeNext
dba_nextkeyUpdba_open
\ No newline at end of file diff --git a/function.dba-replace.html b/function.dba-replace.html new file mode 100644 index 0000000..5e41b6c --- /dev/null +++ b/function.dba-replace.html @@ -0,0 +1,259 @@ +dba_replace
PHP Manual
PrevNext

dba_replace

(PHP3 >= 3.0.8, PHP4 >= 4.0b2)

dba_replace -- Replace or insert entry

Description

bool dba_replace (string key, string value, int handle)

dba_replace() replaces or inserts the entry described + with key and value into the + database specified by handle. +

key is the key of the entry to be inserted. +

value is the value to be inserted. +

handle is a database handle returned by + dba_open(). +

dba_replace() returns true or false, depending on + whether it succeeds of fails, respectively. +

See also: dba_exists(), + dba_delete(), dba_fetch(), + and dba_insert(). +


PrevHomeNext
dba_optimizeUpdba_sync
\ No newline at end of file diff --git a/function.dba-sync.html b/function.dba-sync.html new file mode 100644 index 0000000..2c803b9 --- /dev/null +++ b/function.dba-sync.html @@ -0,0 +1,213 @@ +dba_sync
PHP Manual
PrevNext

dba_sync

(PHP3 >= 3.0.8, PHP4 >= 4.0b2)

dba_sync -- Synchronize database

Description

bool dba_sync (int handle)

dba_sync() synchronizes the database specified by + handle. This will probably trigger a physical write + to disk, if supported. +

handle is a database handle returned by + dba_open(). +

dba_sync() returns true or false, if the + synchronization succeeds or fails, respectively. +

See also: dba_optimize() +


PrevHomeNext
dba_replaceUpDate and Time functions
\ No newline at end of file diff --git a/function.dbase-add-record.html b/function.dbase-add-record.html new file mode 100644 index 0000000..6cf460c --- /dev/null +++ b/function.dbase-add-record.html @@ -0,0 +1,180 @@ +dbase_add_record
PHP Manual
PrevNext

dbase_add_record

(PHP3 , PHP4 )

dbase_add_record -- Add a record to a dBase database

Description

bool dbase_add_record (int dbase_identifier, array record)

Adds the data in the record to the + database. If the number of items in the supplied record isn't + equal to the number of fields in the database, the operation will + fail and false will be returned. +


PrevHomeNext
dbase_packUpdbase_replace_record
\ No newline at end of file diff --git a/function.dbase-close.html b/function.dbase-close.html new file mode 100644 index 0000000..4fbfafc --- /dev/null +++ b/function.dbase-close.html @@ -0,0 +1,178 @@ +dbase_close
PHP Manual
PrevNext

dbase_close

(PHP3 , PHP4 )

dbase_close -- Close a dBase database

Description

bool dbase_close (int dbase_identifier)

Closes the database associated with + dbase_identifier. +


PrevHomeNext
dbase_openUpdbase_pack
\ No newline at end of file diff --git a/function.dbase-create.html b/function.dbase-create.html new file mode 100644 index 0000000..e3be412 --- /dev/null +++ b/function.dbase-create.html @@ -0,0 +1,283 @@ +dbase_create
PHP Manual
PrevNext

dbase_create

(PHP3 , PHP4 )

dbase_create -- Creates a dBase database

Description

int dbase_create (string filename, array fields)

The fields parameter is an array of + arrays, each array describing the format of one field in the + database. Each field consists of a name, a character indicating + the field type, a length, and a precision. +

The types of fields available are: +

L

Boolean. These do not have a length or precision. +

M

Memo. (Note that these aren't supported by PHP.) These do + not have a length or precision. +

D

Date (stored as YYYYMMDD). These do not have a length or + precision. +

N

Number. These have both a length and a precision (the number + of digits after the decimal point). +

C

String. +

+

If the database is successfully created, a dbase_identifier is + returned, otherwise false is returned. +

Example 1. Creating a dBase database file


// "database" name
+$dbname = "/tmp/test.dbf";
+
+// database "definition"
+$def =
+    array(
+        array("date",     "D"),
+        array("name",     "C",  50),
+        array("age",      "N",   3, 0),
+        array("email",    "C", 128),
+        array("ismember", "L")
+    );
+
+// creation
+if (!dbase_create($dbname, $def))
+    print "<strong>Error!</strong>";
+      
+


PrevHomeNext
dBase functionsUpdbase_open
\ No newline at end of file diff --git a/function.dbase-delete-record.html b/function.dbase-delete-record.html new file mode 100644 index 0000000..8371a50 --- /dev/null +++ b/function.dbase-delete-record.html @@ -0,0 +1,185 @@ +dbase_delete_record
PHP Manual
PrevNext

dbase_delete_record

(PHP3 , PHP4 )

dbase_delete_record -- Deletes a record from a dBase database

Description

bool dbase_delete_record (int dbase_identifier, int record)

Marks record to be deleted from the + database. To actually remove the record from the database, you + must also call dbase_pack(). +


PrevHomeNext
dbase_replace_recordUpdbase_get_record
\ No newline at end of file diff --git a/function.dbase-get-record-with-names.html b/function.dbase-get-record-with-names.html new file mode 100644 index 0000000..4879b48 --- /dev/null +++ b/function.dbase-get-record-with-names.html @@ -0,0 +1,194 @@ +dbase_get_record_with_names
PHP Manual
PrevNext

dbase_get_record_with_names

(PHP3 >= 3.0.4, PHP4 )

dbase_get_record_with_names --  + Gets a record from a dBase database as an associative array +

Description

array + dbase_get_record_with_names + (int dbase_identifier, int record)

Returns the data from record in an + associative array. The array also includes an associative member + named 'deleted' which is set to 1 if the record has been marked + for deletion (see dbase_delete_record(). +

Each field is converted to the appropriate PHP type. (Dates are + left as strings.) +


PrevHomeNext
dbase_get_recordUpdbase_numfields
\ No newline at end of file diff --git a/function.dbase-get-record.html b/function.dbase-get-record.html new file mode 100644 index 0000000..732fa94 --- /dev/null +++ b/function.dbase-get-record.html @@ -0,0 +1,191 @@ +dbase_get_record
PHP Manual
PrevNext

dbase_get_record

(PHP3 , PHP4 )

dbase_get_record -- Gets a record from a dBase database

Description

array dbase_get_record (int dbase_identifier, int record)

Returns the data from record in an + array. The array is indexed starting at 0, and includes an + associative member named 'deleted' which is set to 1 if the + record has been marked for deletion (see + dbase_delete_record(). +

Each field is converted to the appropriate PHP type. (Dates are + left as strings.) +


PrevHomeNext
dbase_delete_recordUpdbase_get_record_with_names
\ No newline at end of file diff --git a/function.dbase-numfields.html b/function.dbase-numfields.html new file mode 100644 index 0000000..f44aa41 --- /dev/null +++ b/function.dbase-numfields.html @@ -0,0 +1,218 @@ +dbase_numfields
PHP Manual
PrevNext

dbase_numfields

(PHP3 , PHP4 )

dbase_numfields --  + Find out how many fields are in a dBase database +

Description

int dbase_numfields (int dbase_identifier)

Returns the number of fields (columns) in the specified + database. Field numbers are between 0 and dbase_numfields($db)-1, + while record numbers are between 1 and dbase_numrecords($db). +

Example 1. Using dbase_numfields()


$rec = dbase_get_record($db, $recno);
+$nf  = dbase_numfields($db);
+for ($i=0; $i < $nf; $i++) {
+    print $rec[$i]."<br>\n";
+}
+      
+


PrevHomeNext
dbase_get_record_with_namesUpdbase_numrecords
\ No newline at end of file diff --git a/function.dbase-numrecords.html b/function.dbase-numrecords.html new file mode 100644 index 0000000..ecde5d4 --- /dev/null +++ b/function.dbase-numrecords.html @@ -0,0 +1,176 @@ +dbase_numrecords
PHP Manual
PrevNext

dbase_numrecords

(PHP3 , PHP4 )

dbase_numrecords --  + Find out how many records are in a dBase database +

Description

int dbase_numrecords (int dbase_identifier)

Returns the number of records (rows) in the specified + database. Record numbers are between 1 and dbase_numrecords($db), + while field numbers are between 0 and dbase_numfields($db)-1. +


PrevHomeNext
dbase_numfieldsUpDBM Functions
\ No newline at end of file diff --git a/function.dbase-open.html b/function.dbase-open.html new file mode 100644 index 0000000..24e3caa --- /dev/null +++ b/function.dbase-open.html @@ -0,0 +1,178 @@ +dbase_open
PHP Manual
PrevNext

dbase_open

(PHP3 , PHP4 )

dbase_open -- Opens a dBase database

Description

int dbase_open (string filename, int flags)

The flags correspond to those for the open() system call. + (Typically 0 means read-only, 1 means write-only, and 2 means + read and write.) +

Returns a dbase_identifier for the opened database, or false if + the database couldn't be opened. +


PrevHomeNext
dbase_createUpdbase_close
\ No newline at end of file diff --git a/function.dbase-pack.html b/function.dbase-pack.html new file mode 100644 index 0000000..e6c1139 --- /dev/null +++ b/function.dbase-pack.html @@ -0,0 +1,180 @@ +dbase_pack
PHP Manual
PrevNext

dbase_pack

(PHP3 , PHP4 )

dbase_pack -- Packs a dBase database

Description

bool dbase_pack (int dbase_identifier)

Packs the specified database (permanently deleting all records + marked for deletion using + dbase_delete_record(). +


PrevHomeNext
dbase_closeUpdbase_add_record
\ No newline at end of file diff --git a/function.dbase-replace-record.html b/function.dbase-replace-record.html new file mode 100644 index 0000000..def1015 --- /dev/null +++ b/function.dbase-replace-record.html @@ -0,0 +1,203 @@ +dbase_replace_record
PHP Manual
PrevNext

dbase_replace_record

(PHP3 >= 3.0.11, PHP4 )

dbase_replace_record -- Replace a record in a dBase database

Description

bool dbase_replace_record (int dbase_identifier, array record, int dbase_record_number)

Replaces the data associated with the record + record_number with the data in the + record in the database. If the number of + items in the supplied record is not equal to the number of fields + in the database, the operation will fail and false will be + returned. +

dbase_record_number is an integer which + spans from 1 to the number of records in the database (as + returned by dbase_numrecords()). +


PrevHomeNext
dbase_add_recordUpdbase_delete_record
\ No newline at end of file diff --git a/function.dblist.html b/function.dblist.html new file mode 100644 index 0000000..b5a46ed --- /dev/null +++ b/function.dblist.html @@ -0,0 +1,171 @@ +dblist
PHP Manual
PrevNext

dblist

(PHP3 , PHP4 )

dblist --  + Describes the DBM-compatible library being used +

Description

string dblist (void)


PrevHomeNext
dbmnextkeyUpDirectory functions
\ No newline at end of file diff --git a/function.dbmclose.html b/function.dbmclose.html new file mode 100644 index 0000000..63ff4ec --- /dev/null +++ b/function.dbmclose.html @@ -0,0 +1,172 @@ +dbmclose
PHP Manual
PrevNext

dbmclose

(PHP3 , PHP4 )

dbmclose -- Closes a dbm database

Description

bool dbmclose (int dbm_identifier)

Unlocks and closes the specified database. +


PrevHomeNext
dbmopenUpdbmexists
\ No newline at end of file diff --git a/function.dbmdelete.html b/function.dbmdelete.html new file mode 100644 index 0000000..fe74be8 --- /dev/null +++ b/function.dbmdelete.html @@ -0,0 +1,182 @@ +dbmdelete
PHP Manual
PrevNext

dbmdelete

(PHP3 , PHP4 )

dbmdelete --  + Deletes the value for a key from a DBM database +

Description

bool dbmdelete (int dbm_identifier, string key)

Deletes the value for key in the database. +

Returns false if the key didn't exist in the database. +


PrevHomeNext
dbmreplaceUpdbmfirstkey
\ No newline at end of file diff --git a/function.dbmexists.html b/function.dbmexists.html new file mode 100644 index 0000000..7b28bee --- /dev/null +++ b/function.dbmexists.html @@ -0,0 +1,180 @@ +dbmexists
PHP Manual
PrevNext

dbmexists

(PHP3 , PHP4 )

dbmexists --  + Tells if a value exists for a key in a DBM database +

Description

bool dbmexists (int dbm_identifier, string key)

Returns TRUE if there is a value associated with the + key. +


PrevHomeNext
dbmcloseUpdbmfetch
\ No newline at end of file diff --git a/function.dbmfetch.html b/function.dbmfetch.html new file mode 100644 index 0000000..d62dcd7 --- /dev/null +++ b/function.dbmfetch.html @@ -0,0 +1,179 @@ +dbmfetch
PHP Manual
PrevNext

dbmfetch

(PHP3 , PHP4 )

dbmfetch --  + Fetches a value for a key from a DBM database +

Description

string dbmfetch (int dbm_identifier, string key)

Returns the value associated with key. +


PrevHomeNext
dbmexistsUpdbminsert
\ No newline at end of file diff --git a/function.dbmfirstkey.html b/function.dbmfirstkey.html new file mode 100644 index 0000000..715cfc7 --- /dev/null +++ b/function.dbmfirstkey.html @@ -0,0 +1,176 @@ +dbmfirstkey
PHP Manual
PrevNext

dbmfirstkey

(PHP3 , PHP4 )

dbmfirstkey --  + Retrieves the first key from a DBM database +

Description

string dbmfirstkey (int dbm_identifier)

Returns the first key in the database. Note that no particular order + is guaranteed since the database may be built using a hash-table, + which doesn't guarantee any ordering. +


PrevHomeNext
dbmdeleteUpdbmnextkey
\ No newline at end of file diff --git a/function.dbminsert.html b/function.dbminsert.html new file mode 100644 index 0000000..610b902 --- /dev/null +++ b/function.dbminsert.html @@ -0,0 +1,185 @@ +dbminsert
PHP Manual
PrevNext

dbminsert

(PHP3 , PHP4 )

dbminsert --  + Inserts a value for a key in a DBM database +

Description

int dbminsert (int dbm_identifier, string key, string value)

Adds the value to the database with the specified key. +

Returns -1 if the database was opened read-only, 0 if the insert + was successful, and 1 if the specified key already exists. (To + replace the value, use dbmreplace().) +


PrevHomeNext
dbmfetchUpdbmreplace
\ No newline at end of file diff --git a/function.dbmnextkey.html b/function.dbmnextkey.html new file mode 100644 index 0000000..81d05ac --- /dev/null +++ b/function.dbmnextkey.html @@ -0,0 +1,229 @@ +dbmnextkey
PHP Manual
PrevNext

dbmnextkey

(PHP3 , PHP4 )

dbmnextkey --  + Retrieves the next key from a DBM database

Description

string dbmnextkey (int dbm_identifier, string key)

Returns the next key after key. By calling + dbmfirstkey() followed by successive + calls to dbmnextkey() it is possible to + visit every key/value pair in the dbm database. For example: +

Example 1. Visiting every key/value pair in a DBM database


$key = dbmfirstkey ($dbm_id);
+while ($key) {
+    echo "$key = " . dbmfetch ($dbm_id, $key) . "\n";
+    $key = dbmnextkey ($dbm_id, $key);
+}
+     
+


PrevHomeNext
dbmfirstkeyUpdblist
\ No newline at end of file diff --git a/function.dbmopen.html b/function.dbmopen.html new file mode 100644 index 0000000..c036a8e --- /dev/null +++ b/function.dbmopen.html @@ -0,0 +1,204 @@ +dbmopen
PHP Manual
PrevNext

dbmopen

(PHP3 , PHP4 )

dbmopen -- Opens a DBM database

Description

int dbmopen (string filename, string flags)

The first argument is the full-path filename of the DBM file to + be opened and the second is the file open mode which is one of + "r", "n", "c" or "w" for read-only, new (implies read-write, and + most likely will truncate an already-existing database of the + same name), create (implies read-write, and will not truncate an + already-existing database of the same name) and read-write + respectively. +

Returns an identifer to be passed to the other DBM functions on + success, or false on failure. +

If NDBM support is used, NDBM will actually create filename.dir + and filename.pag files. GDBM only uses one file, as does the + internal flat-file support, and Berkeley DB creates a + filename.db file. Note that PHP does its own + file locking in addition to any file locking that may be done by + the DBM library itself. PHP does not delete the + .lck files it creates. It uses these files + simply as fixed inodes on which to do the file locking. For more + information on DBM files, see your Unix man pages, or obtain + GNU's GDBM. +


PrevHomeNext
DBM FunctionsUpdbmclose
\ No newline at end of file diff --git a/function.dbmreplace.html b/function.dbmreplace.html new file mode 100644 index 0000000..c6e0a63 --- /dev/null +++ b/function.dbmreplace.html @@ -0,0 +1,178 @@ +dbmreplace
PHP Manual
PrevNext

dbmreplace

(PHP3 , PHP4 )

dbmreplace --  + Replaces the value for a key in a DBM database +

Description

bool dbmreplace (int dbm_identifier, string key, string value)

Replaces the value for the specified key in the database. +

This will also add the key to the database if it didn't already + exist. +


PrevHomeNext
dbminsertUpdbmdelete
\ No newline at end of file diff --git a/function.dcgettext.html b/function.dcgettext.html new file mode 100644 index 0000000..5b750e8 --- /dev/null +++ b/function.dcgettext.html @@ -0,0 +1,173 @@ +dcgettext
PHP Manual
PrevNext

dcgettext

(PHP3 >= 3.0.7, PHP4 )

dcgettext -- Overrides the domain for a single lookup

Description

string dcgettext (string domain, string message, int category)

This function allows you to override the current domain for a + single message lookup. It also allows you to specify a category. +


PrevHomeNext
bindtextdomainUpdgettext
\ No newline at end of file diff --git a/function.debugger-off.html b/function.debugger-off.html new file mode 100644 index 0000000..ee35423 --- /dev/null +++ b/function.debugger-off.html @@ -0,0 +1,173 @@ +debugger_off
PHP Manual
PrevNext

debugger_off

(PHP3 )

debugger_off -- Disable internal PHP debugger

Description

int debugger_off(void);

Disables the internal PHP debugger. The debugger is still under + development. +


PrevHomeNext
closelogUpdebugger_on
\ No newline at end of file diff --git a/function.debugger-on.html b/function.debugger-on.html new file mode 100644 index 0000000..e721743 --- /dev/null +++ b/function.debugger-on.html @@ -0,0 +1,179 @@ +debugger_on
PHP Manual
PrevNext

debugger_on

(PHP3 )

debugger_on -- Enable internal PHP debugger

Description

int debugger_on (string address)

Enables the internal PHP debugger, connecting it to + address. The debugger is still under + development. +


PrevHomeNext
debugger_offUpdefine_syslog_variables
\ No newline at end of file diff --git a/function.decbin.html b/function.decbin.html new file mode 100644 index 0000000..363569d --- /dev/null +++ b/function.decbin.html @@ -0,0 +1,183 @@ +decbin
PHP Manual
PrevNext

decbin

(PHP3 , PHP4 )

decbin -- Decimal to binary

Description

string decbin (int number)

Returns a string containing a binary representation of the given + number argument. The largest number that can be converted is + 2147483647 in decimal resulting to a string of 31 1's. +

See also the bindec() function. +


PrevHomeNext
cosUpdechex
\ No newline at end of file diff --git a/function.dechex.html b/function.dechex.html new file mode 100644 index 0000000..c4a0ea4 --- /dev/null +++ b/function.dechex.html @@ -0,0 +1,183 @@ +dechex
PHP Manual
PrevNext

dechex

(PHP3 , PHP4 )

dechex -- Decimal to hexadecimal

Description

string dechex (int number)

Returns a string containing a hexadecimal representation of the + given number argument. The largest number that can + be converted is 2147483647 in decimal resulting to "7fffffff". +

See also the hexdec() function. +


PrevHomeNext
decbinUpdecoct
\ No newline at end of file diff --git a/function.decoct.html b/function.decoct.html new file mode 100644 index 0000000..81fc40d --- /dev/null +++ b/function.decoct.html @@ -0,0 +1,183 @@ +decoct
PHP Manual
PrevNext

decoct

(PHP3 , PHP4 )

decoct -- Decimal to octal

Description

string decoct (int number)

Returns a string containing an octal representation of the given + number argument. The largest number that can be converted is + 2147483647 in decimal resulting to "17777777777". +

See also octdec(). +


PrevHomeNext
dechexUpdeg2rad
\ No newline at end of file diff --git a/function.define-syslog-variables.html b/function.define-syslog-variables.html new file mode 100644 index 0000000..9b38455 --- /dev/null +++ b/function.define-syslog-variables.html @@ -0,0 +1,195 @@ +define_syslog_variables
PHP Manual
PrevNext

define_syslog_variables

(PHP3 , PHP4 )

define_syslog_variables -- Initializes all syslog related constants

Description

void define_syslog_varaibles (void)

Initializes all constants used in the syslog functions. +

See also openlog(), + syslog() and + closelog(). +


PrevHomeNext
debugger_onUpfsockopen
\ No newline at end of file diff --git a/function.define.html b/function.define.html new file mode 100644 index 0000000..00502ee --- /dev/null +++ b/function.define.html @@ -0,0 +1,289 @@ +define
PHP Manual
PrevNext

define

(PHP3 , PHP4 )

define -- Defines a named constant.

Description

int define (string name, mixed value [, int + case_insensitive])

Defines a named constant, which is similar to a variable except: +

  • Constants do not have a dollar sign '$' before them; +

  • Constants may be accessed anywhere without regard to variable + scoping rules; +

  • Constants may not be redefined or undefined once they have + been set; and +

  • Constants may only evaluate to scalar values. +

+

The name of the constant is given by name; + the value is given by value. +

The optional third parameter + case_insensitive is also available. If the + value 1 is given, then the constant will be + defined case-insensitive. The default behaviour is + case-sensitive; i.e. CONSTANT and Constant represent different + values. +

Example 1. Defining Constants


<?php
+define ("CONSTANT", "Hello world.");
+echo CONSTANT; // outputs "Hello world."
+?>
+      
+

Define() returns TRUE on success and FALSE if + an error occurs. +

See also defined() and the section on Constants. +


PrevHomeNext
connection_timeoutUpdefined
\ No newline at end of file diff --git a/function.defined.html b/function.defined.html new file mode 100644 index 0000000..8221417 --- /dev/null +++ b/function.defined.html @@ -0,0 +1,192 @@ +defined
PHP Manual
PrevNext

defined

(PHP3 , PHP4 )

defined --  + Checks whether a given named constant exists +

Description

int defined (string name)

Returns true if the named constant given by + name has been defined, false otherwise. +

See also define() and the section on Constants. +


PrevHomeNext
defineUpdie
\ No newline at end of file diff --git a/function.deg2rad.html b/function.deg2rad.html new file mode 100644 index 0000000..8c83612 --- /dev/null +++ b/function.deg2rad.html @@ -0,0 +1,189 @@ +deg2rad
PHP Manual
PrevNext

deg2rad

(PHP3 >= 3.0.4, PHP4 )

deg2rad --  + Converts the number in degrees to the radian equivalent +

Description

double deg2rad (double number)

This function converts number from degrees + to the radian equivalent. +

See also rad2deg(). +


PrevHomeNext
decoctUpexp
\ No newline at end of file diff --git a/function.delete.html b/function.delete.html new file mode 100644 index 0000000..16277ef --- /dev/null +++ b/function.delete.html @@ -0,0 +1,202 @@ +delete
PHP Manual
PrevNext

delete

(unknown)

delete -- A dummy manual entry

Description

void delete (string file)

This is a dummy manual entry to satisfy those people who are + looking for unlink() or + unset() in the wrong place. +

See also: unlink() to delete files, + unset() to delete variables. +


PrevHomeNext
copyUpdirname
\ No newline at end of file diff --git a/function.dgettext.html b/function.dgettext.html new file mode 100644 index 0000000..a10d57f --- /dev/null +++ b/function.dgettext.html @@ -0,0 +1,176 @@ +dgettext
PHP Manual
PrevNext

dgettext

(PHP3 >= 3.0.7, PHP4 )

dgettext -- Override the current domain

Description

string dgettext (string domain, string message)

The dgettext() function allows you to override + the current domain for a single message lookup. +


PrevHomeNext
dcgettextUpgettext
\ No newline at end of file diff --git a/function.die.html b/function.die.html new file mode 100644 index 0000000..09951b0 --- /dev/null +++ b/function.die.html @@ -0,0 +1,225 @@ +die
PHP Manual
PrevNext

die

(unknown)

die --  + Output a message and terminate the current script +

Description

void die (string message)

This language construct outputs a message and terminates parsing + of the script. It does not return anything. +

Example 1. die example


<?php
+$filename = '/path/to/data-file';
+$file = fopen ($filename, 'r')
+    or die("unable to open file ($filename)");
+?>
+      
+

See also exit(). +


PrevHomeNext
definedUpeval
\ No newline at end of file diff --git a/function.dirname.html b/function.dirname.html new file mode 100644 index 0000000..7873001 --- /dev/null +++ b/function.dirname.html @@ -0,0 +1,236 @@ +dirname
PHP Manual
PrevNext

dirname

(PHP3 , PHP4 )

dirname -- Returns directory name component of path

Description

string dirname (string path)

Given a string containing a path to a file, this function will + return the name of the directory.

On Windows, both slash (/) and backslash + (\) are used as path separator character. In + other environments, it is the forward slash + (/).

Example 1. Dirname() example


$path = "/etc/passwd";
+$file = dirname ($path); // $file is set to "/etc"
+      
+

See also: basename() +


PrevHomeNext
deleteUpdiskfreespace
\ No newline at end of file diff --git a/function.diskfreespace.html b/function.diskfreespace.html new file mode 100644 index 0000000..33325ee --- /dev/null +++ b/function.diskfreespace.html @@ -0,0 +1,215 @@ +diskfreespace
PHP Manual
PrevNext

diskfreespace

(PHP3 >= 3.0.7, PHP4 >= 4.0b4)

diskfreespace -- Returns available space in directory

Description

float diskfreespace (string directory)

Given a string containing a directory, this function will return + the number of bytes available on the corresponding filesystem or + disk partition. +

Example 1. diskfreespace() example


$df = diskfreespace("/"); // $df contains the number of bytes 
+                          // available on "/"
+      
+


PrevHomeNext
dirnameUpfclose
\ No newline at end of file diff --git a/function.dl.html b/function.dl.html new file mode 100644 index 0000000..0f7b3d0 --- /dev/null +++ b/function.dl.html @@ -0,0 +1,182 @@ +dl
PHP Manual
PrevNext

dl

(PHP3 , PHP4 )

dl -- load a PHP extension at runtime

Description

int dl (string library)

Loads the PHP extension defined in + library. See also the extension_dir configuration + directive. +


PrevHomeNext
extension_loadedUpgetenv
\ No newline at end of file diff --git a/function.doubleval.html b/function.doubleval.html new file mode 100644 index 0000000..52c94ec --- /dev/null +++ b/function.doubleval.html @@ -0,0 +1,243 @@ +doubleval
PHP Manual
PrevNext

doubleval

(PHP3 , PHP4 )

doubleval -- Get double value of a variable

Description

double doubleval (mixed var)

Returns the double (floating point) value of + var. +

Var may be any scalar type. You cannot use + doubleval() on arrays or objects. +


$var = '122.34343The';
+$double_value_of_var = doubleval ($var);
+print $double_value_of_var; // prints 122.34343
+      

+

See also intval(), + strval(), settype() and + Type + juggling. +


PrevHomeNext
Variable FunctionsUpempty
\ No newline at end of file diff --git a/function.each.html b/function.each.html new file mode 100644 index 0000000..c84ef18 --- /dev/null +++ b/function.each.html @@ -0,0 +1,446 @@ +each
PHP Manual
PrevNext

each

(PHP3 , PHP4 )

each --  + Return the next key and value pair from an array +

Description

array each (array array)

Returns the current key and value pair from the array + array and advances the array cursor. This + pair is returned in a four-element array, with the keys + 0, 1, + key, and + value. Elements 0 and + key contain the key name of the array + element, and 1 and + value contain the data. +

If the internal pointer for the array points past the end of the + array contents, each() returns false. +

Example 1. Each() examples


$foo = array ("bob", "fred", "jussi", "jouni", "egon", "marliese");
+$bar = each ($foo);
+      

$bar now contains the following key/value + pairs: +

  • 0 => 0
  • 1 => 'bob'
  • key => 0
  • value => 'bob'
+

$foo = array ("Robert" => "Bob", "Seppo" => "Sepi");
+$bar = each ($foo);
+       
+

$bar now contains the following key/value + pairs: +

  • 0 => 'Robert'
  • 1 => 'Bob'
  • key => 'Robert'
  • value => 'Bob'
+

+

Each() is typically used in conjunction with + list() to traverse an array; for instance, + $HTTP_POST_VARS: +

Example 2. + Traversing $HTTP_POST_VARS with + each() +


echo "Values submitted via POST method:<br>";
+reset ($HTTP_POST_VARS);
+while (list ($key, $val) = each ($HTTP_POST_VARS)) {
+    echo "$key => $val<br>";
+}
+      
+

After each() has executed, the array cursor + will be left on the next element of the array, or on the last + element if it hits the end of the array. +

See also key(), list(), + current(), reset(), + next(), and prev(). +


PrevHomeNext
currentUpend
\ No newline at end of file diff --git a/function.easter-date.html b/function.easter-date.html new file mode 100644 index 0000000..a06047b --- /dev/null +++ b/function.easter-date.html @@ -0,0 +1,253 @@ +easter_date
PHP Manual
PrevNext

easter_date

(PHP3 >= 3.0.9, PHP4 >= 4.0RC2)

easter_date --  + Get UNIX timestamp for midnight on Easter of a given year +

Description

int easter_date (int year)

Returns the UNIX timestamp corresponding to midnight on Easter of + the given year. If no year is specified, the current year is + assumed. +

Warning: This function will generate + a warning if the year is outside of the range for UNIX + timestamps (i.e. before 1970 or after 2037). +

Example 1. easter_date() example


echo date ("M-d-Y", easter_date(1999));        /* "Apr-04-1999" */
+echo date ("M-d-Y", easter_date(2000));        /* "Apr-23-2000" */
+echo date ("M-d-Y", easter_date(2001));        /* "Apr-15-2001" */
+      
+

The date of Easter Day was defined by the Council of Nicaea in + AD325 as the Sunday after the first full moon which falls on or + after the Spring Equinox. The Equinox is assumed to always fall + on 21st March, so the calculation reduces to determining the date + of the full moon and the date of the following Sunday. The + algorithm used here was introduced around the year 532 by + Dionysius Exiguus. Under the Julian Calendar (for years before + 1753) a simple 19-year cycle is used to track the phases of the + Moon. Under the Gregorian Calendar (for years after 1753 - + devised by Clavius and Lilius, and introduced by Pope Gregory + XIII in October 1582, and into Britain and its then colonies in + September 1752) two correction factors are added to make the + cycle more accurate. +

(The code is based on a C program by Simon Kershaw, + <webmaster@ely.anglican.org>) +

See easter_days() for calculating Easter + before 1970 or after 2037. +


PrevHomeNext
JDDayOfWeekUpeaster_days
\ No newline at end of file diff --git a/function.easter-days.html b/function.easter-days.html new file mode 100644 index 0000000..a79d436 --- /dev/null +++ b/function.easter-days.html @@ -0,0 +1,257 @@ +easter_days
PHP Manual
PrevNext

easter_days

(PHP3 >= 3.0.9, PHP4 >= 4.0RC2)

easter_days --  + Get number of days after March 21 on which Easter falls for a + given year +

Description

int easter_days (int year)

Returns the number of days after March 21 on which Easter falls + for a given year. If no year is specified, the current year is + assumed. +

This function can be used instead of + easter_date() to calculate Easter for years + which fall outside the range of UNIX timestamps (i.e. before 1970 + or after 2037). +

Example 1. Easter_date() example


echo easter_days (1999);        /* 14, i.e. April 4   */
+echo easter_days (1492);        /* 32, i.e. April 22  */
+echo easter_days (1913);        /*  2, i.e. March 23  */
+      
+

The date of Easter Day was defined by the Council of Nicaea in + AD325 as the Sunday after the first full moon which falls on or + after the Spring Equinox. The Equinox is assumed to always fall + on 21st March, so the calculation reduces to determining the date + of the full moon and the date of the following Sunday. The + algorithm used here was introduced around the year 532 by + Dionysius Exiguus. Under the Julian Calendar (for years before + 1753) a simple 19-year cycle is used to track the phases of the + Moon. Under the Gregorian Calendar (for years after 1753 - + devised by Clavius and Lilius, and introduced by Pope Gregory + XIII in October 1582, and into Britain and its then colonies in + September 1752) two correction factors are added to make the + cycle more accurate. +

(The code is based on a C program by Simon Kershaw, + <webmaster@ely.anglican.org>) +

See also easter_date(). +


PrevHomeNext
easter_dateUpunixtojd
\ No newline at end of file diff --git a/function.echo.html b/function.echo.html new file mode 100644 index 0000000..23d0cff --- /dev/null +++ b/function.echo.html @@ -0,0 +1,262 @@ +echo
PHP Manual
PrevNext

echo

(unknown)

echo -- Output one or more strings

Description

echo (string arg1, string + [argn]...)

Outputs all parameters. +

Echo() is not actually a function (it is a + language construct) so you are not required to use parantheses + with it. +

Example 1. Echo() example


echo "Hello World";
+
+echo "This spans
+multiple lines. The newlines will be 
+output as well";
+
+echo "This spans\nmultiple lines. The newlines will be\noutput as well.";
+      
+

Note: + In fact, if you want to pass more than one parameter to echo, + you must not enclose the parameters within parentheses. +

See also: + print(), + printf(), and + flush(). +


PrevHomeNext
cryptUpexplode
\ No newline at end of file diff --git a/function.empty.html b/function.empty.html new file mode 100644 index 0000000..7f1fdb9 --- /dev/null +++ b/function.empty.html @@ -0,0 +1,235 @@ +empty
PHP Manual
PrevNext

empty

(unknown)

empty -- Determine whether a variable is set

Description

int empty (mixed var)

Returns false if var is set and has a + non-empty or non-zero value; true otherwise. +


$var = 0;
+
+if (empty($var)) {  // evaluates true
+    echo '$var is either 0 or not set at all';
+}
+
+if (!isset($var)) { // evaluates false
+    echo '$var is not set at all';
+}
+      

+

Note that this is meaningless when used on anything which isn't a + variable; i.e. empty (addslashes ($name)) has + no meaning since it would be checking whether something which + isn't a variable is a variable with a false value. +

See also isset() and + unset(). +


PrevHomeNext
doublevalUpgettype
\ No newline at end of file diff --git a/function.end.html b/function.end.html new file mode 100644 index 0000000..c8a77a9 --- /dev/null +++ b/function.end.html @@ -0,0 +1,215 @@ +end
PHP Manual
PrevNext

end

(PHP3 , PHP4 )

end --  + Set the internal pointer of an array to its last element +

Description

mixed end (array array)

End() advances array's + internal pointer to the last element, and returns that element. +

See also: current(), + each(), end(), + next(), and reset(). +


PrevHomeNext
eachUpextract
\ No newline at end of file diff --git a/function.ereg-replace.html b/function.ereg-replace.html new file mode 100644 index 0000000..f400a93 --- /dev/null +++ b/function.ereg-replace.html @@ -0,0 +1,372 @@ +ereg_replace
PHP Manual
PrevNext

ereg_replace

(PHP3 , PHP4 )

ereg_replace -- Replace regular expression

Description

string ereg_replace (string pattern, string replacement, string string)

This function scans string for matches to + pattern, then replaces the matched text + with replacement. +

The modified string is returned. (Which may mean that the + original string is returned if there are no matches to be + replaced.) +

If pattern contains parenthesized + substrings, replacement may contain + substrings of the form + \\digit, which will + be replaced by the text matching the digit'th parenthesized + substring; \\0 will produce the entire + contents of string. Up to nine substrings may be used. + Parentheses may be nested, in which case they are counted by the + opening parenthesis. +

If no matches are found in string, then + string will be returned unchanged. +

For example, the following code snippet prints "This was a test" + three times: +

Example 1. Ereg_replace() Example


$string = "This is a test";
+echo ereg_replace (" is", " was", $string);
+echo ereg_replace ("( )is", "\\1was", $string);
+echo ereg_replace ("(( )is)", "\\2was", $string);
+      
+

One thing to take note of is that if you use an integer value as + the replacement parameter, you may not get + the results you expect. This is because + ereg_replace() will interpret the number as + the ordinal value of a character, and apply that. For instance: +

Example 2. ereg_replace() Example


<?php
+/* This will not work as expected. */
+$num = 4;
+$string = "This string has four words.";
+$string = ereg_replace('four', $num, $string);
+echo $string;   /* Output: 'This string has   words.' */
+
+/* This will work. */
+$num = '4';
+$string = "This string has four words.";
+$string = ereg_replace('four', $num, $string);
+echo $string;   /* Output: 'This string has 4 words.' */
+?>
+      
+

See also ereg(), eregi(), + and eregi_replace(). +


PrevHomeNext
eregUperegi
\ No newline at end of file diff --git a/function.ereg.html b/function.ereg.html new file mode 100644 index 0000000..85c8466 --- /dev/null +++ b/function.ereg.html @@ -0,0 +1,318 @@ +ereg
PHP Manual
PrevNext

ereg

(PHP3 , PHP4 )

ereg -- Regular expression match

Description

int ereg (string pattern, string string [, array + regs])

Searches a string for matches to the regular + expression given in pattern. +

If matches are found for parenthesized substrings of + pattern and the function is called with + the third argument regs, the matches will + be stored in the elements of the array + regs. $regs[1] will contain the substring + which starts at the first left parenthesis; $regs[2] will contain + the substring starting at the second, and so on. $regs[0] will + contain a copy of string. +

If ereg() finds any matches at all, $regs will + be filled with exactly ten elements, even though more or fewer + than ten parenthesized substrings may actually have matched. + This has no effect on ereg()'s ability to + match more substrings. If no matches are found, $regs will not be + altered by ereg(). +

Searching is case sensitive. +

Returns true if a match for pattern was + found in string, or false if no matches + were found or an error occurred. +

The following code snippet takes a date in ISO format + (YYYY-MM-DD) and prints it in DD.MM.YYYY format: +

Example 1. Ereg() Example


if (ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})", $date, $regs)) {
+    echo "$regs[3].$regs[2].$regs[1]";
+} else {
+    echo "Invalid date format: $date";
+}
+      
+

See also eregi(), + ereg_replace(), and + eregi_replace(). +


PrevHomeNext
Regular Expression Functions (POSIX Extended)Upereg_replace
\ No newline at end of file diff --git a/function.eregi-replace.html b/function.eregi-replace.html new file mode 100644 index 0000000..692e09d --- /dev/null +++ b/function.eregi-replace.html @@ -0,0 +1,202 @@ +eregi_replace
PHP Manual
PrevNext

eregi_replace

(PHP3 , PHP4 )

eregi_replace -- replace regular expression case insensitive

Description

string eregi_replace (string pattern, string replacement, string string)

This function is identical to ereg_replace() + except that this ignores case distinction when matching + alphabetic characters. +

See also ereg(), eregi(), + and ereg_replace(). +


PrevHomeNext
eregiUpsplit
\ No newline at end of file diff --git a/function.eregi.html b/function.eregi.html new file mode 100644 index 0000000..88e9510 --- /dev/null +++ b/function.eregi.html @@ -0,0 +1,204 @@ +eregi
PHP Manual
PrevNext

eregi

(PHP3 , PHP4 )

eregi -- case insensitive regular expression match

Description

int eregi (string pattern, string string [, array + regs])

This function is identical to ereg() except + that this ignores case distinction when matching alphabetic + characters. +

See also ereg(), + ereg_replace(), and + eregi_replace(). +


PrevHomeNext
ereg_replaceUperegi_replace
\ No newline at end of file diff --git a/function.error-log.html b/function.error-log.html new file mode 100644 index 0000000..afc6a6c --- /dev/null +++ b/function.error-log.html @@ -0,0 +1,374 @@ +error_log
PHP Manual
PrevNext

error_log

(PHP3 , PHP4 )

error_log -- send an error message somewhere

Description

int error_log (string message, int message_type [, string + destination [, string + extra_headers]])

Sends an error message to the web server's error log, a + TCP port or to a file. The first parameter, + message, is the error message that should + be logged. The second parameter, + message_type says where the message should + go: +

Table 1. error_log() log types

0 message is sent to PHP's system + logger, using the Operating System's system logging + mechanism or a file, depending on what the error_log configuration + directive is set to. +
1 message is sent by email to the + address in the destination parameter. + This is the only message type where the fourth parameter, + extra_headers is used. This message + type uses the same internal function as + Mail() does. +
2 message is sent through the PHP debugging + connection. This option is only available if remote debugging has + been enabled. In this case, the + destination parameter specifies the host + name or IP address and optionally, port number, of the socket + receiving the debug information. +
3 message is appended to the file + destination. +
+

Example 1. error_log() examples


// Send notification through the server log if we can not
+// connect to the database.
+if (!Ora_Logon ($username, $password)) {
+    error_log ("Oracle database not available!", 0);
+}
+
+// Notify administrator by email if we run out of FOO
+if (!($foo = allocate_new_foo()) {
+    error_log ("Big trouble, we're all out of FOOs!", 1,
+               "operator@mydomain.com");
+}
+
+// other ways of calling error_log():
+error_log ("You messed up!", 2, "127.0.0.1:7000");
+error_log ("You messed up!", 2, "loghost");
+error_log ("You messed up!", 3, "/var/tmp/my-errors.log");
+      
+


PrevHomeNext
Error Handling and Logging FunctionsUperror_reporting
\ No newline at end of file diff --git a/function.error-reporting.html b/function.error-reporting.html new file mode 100644 index 0000000..8a68166 --- /dev/null +++ b/function.error-reporting.html @@ -0,0 +1,460 @@ +error_reporting
PHP Manual
PrevNext

error_reporting

(PHP3 , PHP4 )

error_reporting -- set which PHP errors are reported

Description

int error_reporting ([int + level])

Sets PHP's error reporting level and returns the old level. The + error reporting level is either a bitmask, or named constant. Using + named constants is strongly encouraged to ensure compatibility for + future versions. As error levels are added, the range of integers + increases, so older integer-based error levels will not always + behave as expected. +

Example 1. Error Integer changes


error_reporting (55);   // PHP 3 equivalent to E_ALL ^ E_NOTICE
+
+/* ...in PHP 4, '55' would mean (E_ERROR | E_WARNING | E_PARSE |
+E_CORE_ERROR | E_CORE_WARNING) */
+
+error_reporting (2039); // PHP 4 equivalent to E_ALL ^ E_NOTICE
+
+error_reporting (E_ALL ^ E_NOTICE); // The same in both PHP 3 and 4
+      
+ Follow the links for the internal values to get their meanings: +

Table 1. error_reporting() bit values

constantvalue
1 E_ERROR +
2 E_WARNING +
4 E_PARSE +
8 E_NOTICE +
16 E_CORE_ERROR +
32 E_CORE_WARNING +
64 E_COMPILE_ERROR +
128 E_COMPILE_WARNING +
256 E_USER_ERROR +
512 E_USER_WARNING +
1024 E_USER_NOTICE +
+

Example 2. error_reporting() examples


error_reporting(0);
+/* Turn off all reporting */
+
+error_reporting (7); // Old syntax, PHP 2/3
+error_reporting  (E_ERROR | E_WARNING | E_PARSE); // New syntax for PHP 3/4
+/* Good to use for simple running errors  */
+
+error_reporting  (15); // Old syntax, PHP 2/3
+error_reporting (E_ERROR | E_WARNING | E_PARSE | E_NOTICE); // New syntax for PHP 3/4
+/*  good for code authoring to report uninitialized or (possibly mis-spelled) variables */
+
+error_reporting (63); // Old syntax, PHP 2/3
+error_reporting (E_ALL); // New syntax for PHP 3/4
+/* report all PHP errors */
+      
+


PrevHomeNext
error_logUprestore_error_handler
\ No newline at end of file diff --git a/function.escapeshellarg.html b/function.escapeshellarg.html new file mode 100644 index 0000000..7cbd763 --- /dev/null +++ b/function.escapeshellarg.html @@ -0,0 +1,247 @@ +escapeshellarg
PHP Manual
PrevNext

escapeshellarg

(PHP4 CVS only)

escapeshellarg -- escape a string to be used as a shell argument

Description

string escapeshellarg (string arg)

EscapeShellArg() adds single quotes around a string + and quotes/escapes any existing single quotes allowing you to pass a + string directly to a shell function and having it be treated as a single + safe argument. This function should be used to escape individual + arguments to shell functions coming from user input. The shell functions + include exec(), system() and the + backtick operator. + A standard use would be:


system("ls ".EscapeShellArg($dir))
+      

+

See also exec(), popen(), + system(), and the backtick operator. +


PrevHomeNext
Program Execution functionsUpescapeshellcmd
\ No newline at end of file diff --git a/function.escapeshellcmd.html b/function.escapeshellcmd.html new file mode 100644 index 0000000..1035aad --- /dev/null +++ b/function.escapeshellcmd.html @@ -0,0 +1,255 @@ +escapeshellcmd
PHP Manual
PrevNext

escapeshellcmd

(PHP3 , PHP4 )

escapeshellcmd -- escape shell metacharacters

Description

string escapeshellcmd (string command)

EscapeShellCmd() escapes any characters in a + string that might be used to trick a shell command into executing + arbitrary commands. This function should be used to make sure + that any data coming from user input is escaped before this data + is passed to the exec() or + system() functions, or to the backtick + operator. A standard use would be:


$e = EscapeShellCmd($userinput);
+system("echo $e"); // here we don't care if $e has spaces
+$f = EscapeShellCmd($filename);
+system("touch \"/tmp/$f\"; ls -l \"/tmp/$f\""); // and here we do, so we use quotes
+      

+

See also escapeshellarg(), exec(), + popen(), system(), and the backtick operator. +


PrevHomeNext
escapeshellargUpexec
\ No newline at end of file diff --git a/function.eval.html b/function.eval.html new file mode 100644 index 0000000..d268c02 --- /dev/null +++ b/function.eval.html @@ -0,0 +1,300 @@ +eval
PHP Manual
PrevNext

eval

(unknown)

eval -- Evaluate a string as PHP code

Description

mixed eval (string code_str)

eval() evaluates the string given in + code_str as PHP code. Among other things, + this can be useful for storing code in a database text field for + later execution. +

There are some factors to keep in mind when using + eval(). Remember that the string passed must + be valid PHP code, including things like terminating statements + with a semicolon so the parser doesn't die on the line after the + eval(), and properly escaping things in + code_str. +

Also remember that variables given values under + eval() will retain these values in the main + script afterwards. +

A return statement will terminate the evaluation of + the string immediatley. In PHP 4 you may use return + to return a value that will become the result of the + eval() function while in PHP 3 + eval() was of type void and did + never return anything. +

Example 1. + Eval() example - simple text merge +


<?php
+$string = 'cup';
+$name = 'coffee';
+$str = 'This is a $string with my $name in it.<br>';
+echo $str;
+eval ("\$str = \"$str\";");
+echo $str;
+?>
+      
+

The above example will show: +

This is a $string with my $name in it.
+This is a cup with my coffee in it.
+     
+


PrevHomeNext
dieUpexit
\ No newline at end of file diff --git a/function.exec.html b/function.exec.html new file mode 100644 index 0000000..cd9306c --- /dev/null +++ b/function.exec.html @@ -0,0 +1,274 @@ +exec
PHP Manual
PrevNext

exec

(PHP3 , PHP4 )

exec -- Execute an external program

Description

string exec (string command [, string + array [, int + return_var]])

exec() executes the given + command, however it does not output + anything. It simply returns the last line from the result of the + command. If you need to execute a command and have all the data + from the command passed directly back without any interference, + use the PassThru() function. +

If the array argument is present, then the + specified array will be filled with every line of output from the + command. Note that if the array already contains some elements, + exec() will append to the end of the array. + If you do not want the function to append elements, call + unset() on the array before passing it to + exec(). +

If the return_var argument is present + along with the array argument, then the + return status of the executed command will be written to this + variable. +

Note that if you are going to allow data coming from user input + to be passed to this function, then you should be using + EscapeShellCmd() to make sure that users + cannot trick the system into executing arbitrary commands. +

Note also that if you start a program using this function and + want to leave it running in the background, you have to make + sure that the output of that program is redirected to a file or + some other output stream or else PHP will hang until the + execution of the program ends. +

See also system(), + PassThru(), popen(), + EscapeShellCmd(), and the backtick operator. +


PrevHomeNext
escapeshellcmdUppassthru
\ No newline at end of file diff --git a/function.exit.html b/function.exit.html new file mode 100644 index 0000000..ec28358 --- /dev/null +++ b/function.exit.html @@ -0,0 +1,182 @@ +exit
PHP Manual
PrevNext

exit

(unknown)

exit -- Terminate current script

Description

void exit(void);

This language construct terminates parsing of the script. It + does not return. +

See also die(). +


PrevHomeNext
evalUpget_browser
\ No newline at end of file diff --git a/function.exp.html b/function.exp.html new file mode 100644 index 0000000..c03276d --- /dev/null +++ b/function.exp.html @@ -0,0 +1,186 @@ +exp
PHP Manual
PrevNext

exp

(PHP3 , PHP4 )

exp -- e to the power of ...

Description

float exp (float arg)

Returns e raised to the power of arg. +

See also pow(). +


PrevHomeNext
deg2radUpfloor
\ No newline at end of file diff --git a/function.explode.html b/function.explode.html new file mode 100644 index 0000000..add29f7 --- /dev/null +++ b/function.explode.html @@ -0,0 +1,260 @@ +explode
PHP Manual
PrevNext

explode

(PHP3 , PHP4 )

explode -- Split a string by string

Description

array explode (string separator, string string [, int + limit])

Returns an array of strings, each of which is a substring of + string formed by splitting it on boundaries formed + by the string delim. + If limit is set, the returned array will contaion + a maximum of limit elements with the last element + containing the whole rest of string. +

Example 1. Explode() example


$pizza = "piece1 piece2 piece3 piece4 piece5 piece6";
+$pieces = explode (" ", $pizza);
+      
+

See also split() and + implode(). +


PrevHomeNext
echoUpget_html_translation_table
\ No newline at end of file diff --git a/function.extension-loaded.html b/function.extension-loaded.html new file mode 100644 index 0000000..91c9135 --- /dev/null +++ b/function.extension-loaded.html @@ -0,0 +1,207 @@ +extension_loaded
PHP Manual
PrevNext

extension_loaded

(PHP3 >= 3.0.10, PHP4 >= 4.0b4)

extension_loaded -- find out whether an extension is loaded

Description

bool extension_loaded (string name)

Returns true if the extension identified by + name is loaded. You can see the names of + various extensions by using phpinfo(). +

See also phpinfo(). +

Note: + This function was added in 3.0.10. +

+


PrevHomeNext
assert_optionsUpdl
\ No newline at end of file diff --git a/function.extract.html b/function.extract.html new file mode 100644 index 0000000..fa6a272 --- /dev/null +++ b/function.extract.html @@ -0,0 +1,401 @@ +extract
PHP Manual
PrevNext

extract

(PHP3 >= 3.0.7, PHP4 )

extract --  + Import variables into the symbol table from an array +

Description

void extract (array var_array [, int + extract_type [, string + prefix]])

This function is used to import variables from an array into the + current symbol table. It takes associative array + var_array and treats keys as variable + names and values as variable values. For each key/value pair it + will create a variable in the current symbol table, subject to + extract_type and + prefix parameters. +

Extract() checks for colissions with existing + variables. The way collisions are treated is determined by + extract_type. It can be one of the + following values: +

EXTR_OVERWRITE

If there is a collision, overwrite the existing variable. +

EXTR_SKIP

If there is a collision, don't overwrite the existing + variable. +

EXTR_PREFIX_SAME

If there is a collision, prefix the new variable with + prefix. +

EXTR_PREFIX_ALL

Prefix all variables with prefix. +

+

If extract_type is not specified, it is + assumed to be EXTR_OVERWRITE. +

Note that prefix is only required if + extract_type is EXTR_PREFIX_SAME or + EXTR_PREFIX_ALL. +

Extract() checks each key to see if it + constitues a valid variable name, and if it does only then does + it proceed to import it. +

A possible use for extract is to import into symbol table + variables contained in an associative array returned by + wddx_deserialize(). +

Example 1. Extract() example


<php?
+
+/* Suppose that $var_array is an array returned from
+   wddx_deserialize */
+
+$size = "large";
+$var_array = array ("color" => "blue",
+                    "size"  => "medium",
+                    "shape" => "sphere");
+extract ($var_array, EXTR_PREFIX_SAME, "wddx");
+
+print "$color, $size, $shape, $wddx_size\n";
+
+?>
+      
+

The above example will produce: +

blue, large, sphere, medium
+     
+

The $size wasn't overwritten, becaus we + specified EXTR_PREFIX_SAME, which resulted in + $wddx_size being created. If EXTR_SKIP was + specified, then $wddx_size wouldn't even have been created. + EXTR_OVERWRITE would have cause $size to have + value "medium", and EXTR_PREFIX_ALL would result in new variables + being named $wddx_color, + $wddx_size, and + $wddx_shape. +


PrevHomeNext
endUpin_array
\ No newline at end of file diff --git a/function.ezmlm-hash.html b/function.ezmlm-hash.html new file mode 100644 index 0000000..c571826 --- /dev/null +++ b/function.ezmlm-hash.html @@ -0,0 +1,216 @@ +ezmlm_hash
PHP Manual
PrevNext

ezmlm_hash

(PHP3 CVS only, PHP4 >= 4.0.2)

ezmlm_hash -- Calculate the hash value needed by EZMLM

Description

int ezmlm_hash (string addr)

ezmlm_hash() calculates the hash value needed + when keeping EZMLM mailing lists in a MySQL database. +

Example 1. Calculating the hash and subscribing a user


$user = "kris@koehntopp.de";
+$hash = ezmlm_hash ($user);
+$query = sprintf ("INSERT INTO sample VALUES (%s, '%s')", $hash, $user);
+$db->query($query); // using PHPLIB db interface
+      
+


PrevHomeNext
mailUpMathematical Functions
\ No newline at end of file diff --git a/function.fclose.html b/function.fclose.html new file mode 100644 index 0000000..e6fd7ed --- /dev/null +++ b/function.fclose.html @@ -0,0 +1,192 @@ +fclose
PHP Manual
PrevNext

fclose

(PHP3 , PHP4 )

fclose -- Closes an open file pointer

Description

int fclose (int fp)

The file pointed to by fp is closed. +

Returns true on success and false on failure. +

The file pointer must be valid, and must point to a file + successfully opened by fopen() or + fsockopen(). +


PrevHomeNext
diskfreespaceUpfeof
\ No newline at end of file diff --git a/function.fdf-close.html b/function.fdf-close.html new file mode 100644 index 0000000..08c8f26 --- /dev/null +++ b/function.fdf-close.html @@ -0,0 +1,182 @@ +fdf_close
PHP Manual
PrevNext

fdf_close

(PHP3 >= 3.0.6, PHP4 )

fdf_close -- Close an FDF document

Description

void fdf_close (int fdf_document)

The fdf_close() function closes the FDF document.

See also fdf_open().


PrevHomeNext
fdf_openUpfdf_create
\ No newline at end of file diff --git a/function.fdf-create.html b/function.fdf-create.html new file mode 100644 index 0000000..5713221 --- /dev/null +++ b/function.fdf-create.html @@ -0,0 +1,245 @@ +fdf_create
PHP Manual
PrevNext

fdf_create

(PHP3 >= 3.0.6, PHP4 )

fdf_create -- Create a new FDF document

Description

int fdf_create (void )

The fdf_create() creates a new + FDF document. This function is needed if one would like to + populate input fields in a PDF document with data.

Example 1. Populating a PDF document


<?php
+$outfdf = fdf_create();
+fdf_set_value($outfdf, "volume", $volume, 0);
+
+fdf_set_file($outfdf, "http:/testfdf/resultlabel.pdf");
+fdf_save($outfdf, "outtest.fdf");
+fdf_close($outfdf);
+Header("Content-type: application/vnd.fdf");
+$fp = fopen("outtest.fdf", "r");
+fpassthru($fp);
+unlink("outtest.fdf");
+?>
+     

See also fdf_close(), + fdf_save(), + fdf_open().


PrevHomeNext
fdf_closeUpfdf_save
\ No newline at end of file diff --git a/function.fdf-get-file.html b/function.fdf-get-file.html new file mode 100644 index 0000000..935f8a9 --- /dev/null +++ b/function.fdf-get-file.html @@ -0,0 +1,186 @@ +fdf_get_file
PHP Manual
PrevNext

fdf_get_file

(PHP3 >= 3.0.6, PHP4 )

fdf_get_file -- Get the value of the /F key

Description

string fdf_get_file (int fdf_document)

The fdf_set_file() returns the value + of the /F key.

See also fdf_set_file().


PrevHomeNext
fdf_set_fileUpfdf_set_flags
\ No newline at end of file diff --git a/function.fdf-get-status.html b/function.fdf-get-status.html new file mode 100644 index 0000000..934d693 --- /dev/null +++ b/function.fdf-get-status.html @@ -0,0 +1,183 @@ +fdf_get_status
PHP Manual
PrevNext

fdf_get_status

(PHP3 >= 3.0.6, PHP4 )

fdf_get_status -- Get the value of the /STATUS key

Description

string fdf_get_status (int fdf_document)

The fdf_get_status() returns the value + of the /STATUS key.

See also fdf_set_status().


PrevHomeNext
fdf_set_statusUpfdf_set_file
\ No newline at end of file diff --git a/function.fdf-get-value.html b/function.fdf-get-value.html new file mode 100644 index 0000000..10824bf --- /dev/null +++ b/function.fdf-get-value.html @@ -0,0 +1,183 @@ +fdf_get_value
PHP Manual
PrevNext

fdf_get_value

(PHP3 >= 3.0.6, PHP4 )

fdf_get_value -- Get the value of a field

Description

string fdf_get_value (int fdf_document, string fieldname)

The fdf_get_value() function returns the + value of a field.

See also fdf_set_value().


PrevHomeNext
fdf_saveUpfdf_set_value
\ No newline at end of file diff --git a/function.fdf-next-field-name.html b/function.fdf-next-field-name.html new file mode 100644 index 0000000..4c8770f --- /dev/null +++ b/function.fdf-next-field-name.html @@ -0,0 +1,191 @@ +fdf_next_field_name
PHP Manual
PrevNext

fdf_next_field_name

(PHP3 >= 3.0.6, PHP4 )

fdf_next_field_name -- Get the next field name

Description

string fdf_next_field_name (int fdf_document, string fieldname)

The fdf_next_field_name() function returns the + name of the field after the field in + fieldname or the field name of the first field + if the second paramter is NULL.

See also fdf_set_field(), + fdf_get_field().


PrevHomeNext
fdf_set_valueUpfdf_set_ap
\ No newline at end of file diff --git a/function.fdf-open.html b/function.fdf-open.html new file mode 100644 index 0000000..83d6e3d --- /dev/null +++ b/function.fdf-open.html @@ -0,0 +1,246 @@ +fdf_open
PHP Manual
PrevNext

fdf_open

(PHP3 >= 3.0.6, PHP4 )

fdf_open -- Open a FDF document

Description

int fdf_open (string filename)

The fdf_open() function opens + a file with form data. This file must contain the data as returned + from a PDF form. Currently, the file has to be created 'manually' + by using fopen() and writing the content + of HTTP_FDF_DATA with fwrite() into it. + A mechanism like for HTML form data where for each input + field a variable is created does not exist.

Example 1. Accessing the form data


<?php
+// Save the FDF data into a temp file
+$fdffp = fopen("test.fdf", "w");
+fwrite($fdffp, $HTTP_FDF_DATA, strlen($HTTP_FDF_DATA));
+fclose($fdffp);
+
+// Open temp file and evaluate data
+$fdf = fdf_open("test.fdf");
+...
+fdf_close($fdf);
+?>
+     

See also fdf_close().


PrevHomeNext
Forms Data Format functionsUpfdf_close
\ No newline at end of file diff --git a/function.fdf-save.html b/function.fdf-save.html new file mode 100644 index 0000000..40a6067 --- /dev/null +++ b/function.fdf-save.html @@ -0,0 +1,206 @@ +fdf_save
PHP Manual
PrevNext

fdf_save

(PHP3 >= 3.0.6, PHP4 )

fdf_save -- Save a FDF document

Description

int fdf_save (string filename)

The fdf_save() function saves + a FDF document. + The FDF Toolkit provides a way to output the document to stdout if + the parameter filename + is '.'. This does not work if PHP is used as an apache module. + In such a case one will have to write to a file and use e.g. + fpassthru(). to output it.

See also fdf_close() and example for + fdf_create().


PrevHomeNext
fdf_createUpfdf_get_value
\ No newline at end of file diff --git a/function.fdf-set-ap.html b/function.fdf-set-ap.html new file mode 100644 index 0000000..80da39e --- /dev/null +++ b/function.fdf-set-ap.html @@ -0,0 +1,182 @@ +fdf_set_ap
PHP Manual
PrevNext

fdf_set_ap

(PHP3 >= 3.0.6, PHP4 )

fdf_set_ap -- Set the appearance of a field

Description

void fdf_set_ap (int fdf_document, string field_name, int face, string filename, int page_number)

The fdf_set_ap() function sets the + appearance of a field (i.e. the value of the /AP key). + The possible values of face + are 1=FDFNormalAP, 2=FDFRolloverAP, 3=FDFDownAP.


PrevHomeNext
fdf_next_field_nameUpfdf_set_status
\ No newline at end of file diff --git a/function.fdf-set-file.html b/function.fdf-set-file.html new file mode 100644 index 0000000..17b6ff5 --- /dev/null +++ b/function.fdf-set-file.html @@ -0,0 +1,192 @@ +fdf_set_file
PHP Manual
PrevNext

fdf_set_file

(PHP3 >= 3.0.6, PHP4 )

fdf_set_file -- Set the value of the /F key

Description

void fdf_set_file (int fdf_document, string filename)

The fdf_set_file() sets the value + of the /F key. The /F key is just a reference to a PDF form + which is to be populated with data. + In a web environment it is a URL (e.g. http:/testfdf/resultlabel.pdf).

See also fdf_get_file() and example for + fdf_create().


PrevHomeNext
fdf_get_statusUpfdf_get_file
\ No newline at end of file diff --git a/function.fdf-set-flags.html b/function.fdf-set-flags.html new file mode 100644 index 0000000..7861f88 --- /dev/null +++ b/function.fdf-set-flags.html @@ -0,0 +1,190 @@ +fdf_set_flags
PHP Manual
PrevNext

fdf_set_flags

(PHP4 >= 4.0.2)

fdf_set_flags -- Sets a flag of a field

Description

void fdf_set_flags (int fdf_document, string fieldname, int whichFlags, int newFlags)

The fdf_set_flags() sets certain flags + of the given field fieldname. +

See also fdf_set_opt(). +


PrevHomeNext
fdf_get_fileUpfdf_set_opt
\ No newline at end of file diff --git a/function.fdf-set-javascript-action.html b/function.fdf-set-javascript-action.html new file mode 100644 index 0000000..32eef6e --- /dev/null +++ b/function.fdf-set-javascript-action.html @@ -0,0 +1,190 @@ +fdf_set_javascript_action
PHP Manual
PrevNext

fdf_set_javascript_action

(PHP4 >= 4.0.2)

fdf_set_javascript_action -- Sets an javascript action of a field

Description

void fdf_set_javascript_action (int fdf_document, string fieldname, int trigger, string script)

The fdf_set_javascript_action() sets a javascript + action for the given field fieldname. +

See also fdf_set_submit_form_action(). +


PrevHomeNext
fdf_set_submit_form_actionUpFTP functions
\ No newline at end of file diff --git a/function.fdf-set-opt.html b/function.fdf-set-opt.html new file mode 100644 index 0000000..31e5faa --- /dev/null +++ b/function.fdf-set-opt.html @@ -0,0 +1,190 @@ +fdf_set_opt
PHP Manual
PrevNext

fdf_set_opt

(PHP4 >= 4.0.2)

fdf_set_opt -- Sets an option of a field

Description

void fdf_set_opt (int fdf_document, string fieldname, int element, string str1, string str2)

The fdf_set_opt() sets options + of the given field fieldname. +

See also fdf_set_flags(). +


PrevHomeNext
fdf_set_flagsUpfdf_set_submit_form_action
\ No newline at end of file diff --git a/function.fdf-set-status.html b/function.fdf-set-status.html new file mode 100644 index 0000000..3e417f3 --- /dev/null +++ b/function.fdf-set-status.html @@ -0,0 +1,183 @@ +fdf_set_status
PHP Manual
PrevNext

fdf_set_status

(PHP3 >= 3.0.6, PHP4 )

fdf_set_status -- Set the value of the /STATUS key

Description

void fdf_set_status (int fdf_document, string status)

The fdf_set_status() sets the value + of the /STATUS key.

See also fdf_get_status().


PrevHomeNext
fdf_set_apUpfdf_get_status
\ No newline at end of file diff --git a/function.fdf-set-submit-form-action.html b/function.fdf-set-submit-form-action.html new file mode 100644 index 0000000..e6a6194 --- /dev/null +++ b/function.fdf-set-submit-form-action.html @@ -0,0 +1,190 @@ +fdf_set_submit_form_action
PHP Manual
PrevNext

fdf_set_submit_form_action

(PHP4 >= 4.0.2)

fdf_set_submit_form_action -- Sets an javascript action of a field

Description

void fdf_set_submit_form_action (int fdf_document, string fieldname, int trigger, string script, int flags)

The fdf_set_submit_form_action() sets a submit form + action for the given field fieldname. +

See also fdf_set_javascript_action(). +


PrevHomeNext
fdf_set_optUpfdf_set_javascript_action
\ No newline at end of file diff --git a/function.fdf-set-value.html b/function.fdf-set-value.html new file mode 100644 index 0000000..91b70c8 --- /dev/null +++ b/function.fdf-set-value.html @@ -0,0 +1,195 @@ +fdf_set_value
PHP Manual
PrevNext

fdf_set_value

(PHP3 >= 3.0.6, PHP4 )

fdf_set_value -- Set the value of a field

Description

void fdf_set_value (int fdf_document, string fieldname, string value, int isName)

The fdf_set_value() function sets the + value of a field. The last parameter determines if the field value + is to be converted to a PDF Name (isName = 1) + or set to a PDF String (isName = 0).

See also fdf_get_value().


PrevHomeNext
fdf_get_valueUpfdf_next_field_name
\ No newline at end of file diff --git a/function.feof.html b/function.feof.html new file mode 100644 index 0000000..b2a0437 --- /dev/null +++ b/function.feof.html @@ -0,0 +1,196 @@ +feof
PHP Manual
PrevNext

feof

(PHP3 , PHP4 )

feof -- Tests for end-of-file on a file pointer

Description

int feof (int fp)

Returns true if the file pointer is at EOF or an error occurs; + otherwise returns false. +

The file pointer must be valid, and must point to a file + successfully opened by fopen(), + popen(), or fsockopen(). +


PrevHomeNext
fcloseUpfgetc
\ No newline at end of file diff --git a/function.fgetc.html b/function.fgetc.html new file mode 100644 index 0000000..6f97f47 --- /dev/null +++ b/function.fgetc.html @@ -0,0 +1,232 @@ +fgetc
PHP Manual
PrevNext

fgetc

(PHP3 , PHP4 )

fgetc -- Gets character from file pointer

Description

string fgetc (int fp)

Returns a string containing a single character read from the + file pointed to by fp. Returns FALSE on EOF. +

The file pointer must be valid, and must point to a file + successfully opened by fopen(), + popen(), or fsockopen(). +

+ See also fread(), fopen(), + popen(), fsockopen(), and + fgets(). +


PrevHomeNext
feofUpfgetcsv
\ No newline at end of file diff --git a/function.fgetcsv.html b/function.fgetcsv.html new file mode 100644 index 0000000..fff0eb0 --- /dev/null +++ b/function.fgetcsv.html @@ -0,0 +1,285 @@ +fgetcsv
PHP Manual
PrevNext

fgetcsv

(PHP3 >= 3.0.8, PHP4 )

fgetcsv --  + Gets line from file pointer and parse for CSV fields +

Description

array fgetcsv (int fp, int length [, string + delimiter])

Similar to fgets() except that + fgetcsv() parses the line it reads for fields + in CSV format and returns an array containing + the fields read. The field delimiter is a comma, unless you + specify another delimiter with the optional third parameter. +

Fp must be a valid file pointer to a file + successfully opened by fopen(), + popen(), or fsockopen() +

Length must be greater than the longest line to be found in the + CSV file (allowing for trailing line-end characters). +

Fgetcsv() returns false on error, including + end of file. +

N.B. A blank line in a CSV file will be returned as an array + comprising a single null field, and will not be treated as an + error. +

Example 1. + Fgetcsv() example - Read and print entire + contents of a CSV file +


$row = 1;
+$fp = fopen ("test.csv","r");
+while ($data = fgetcsv ($fp, 1000, ",")) {
+    $num = count ($data);
+    print "<p> $num fields in line $row: <br>";
+    $row++;
+    for ($c=0; $c<$num; $c++) {
+        print $data[$c] . "<br>";
+    }
+}
+fclose ($fp);
+     

PrevHomeNext
fgetcUpfgets
\ No newline at end of file diff --git a/function.fgets.html b/function.fgets.html new file mode 100644 index 0000000..7cd6cb2 --- /dev/null +++ b/function.fgets.html @@ -0,0 +1,295 @@ +fgets
PHP Manual
PrevNext

fgets

(PHP3 , PHP4 )

fgets -- Gets line from file pointer

Description

string fgets (int fp, int length)

Returns a string of up to length - 1 bytes read from the file + pointed to by fp. Reading ends when length - 1 bytes have been + read, on a newline (which is included in the return value), or on + EOF (whichever comes first). +

If an error occurs, returns false. +

Common Pitfalls: +

People used to the 'C' semantics of fgets should note the + difference in how EOF is returned. +

The file pointer must be valid, and must point to a file + successfully opened by fopen(), + popen(), or + fsockopen(). +

A simple example follows: +

Example 1. Reading a file line by line


$fd = fopen ("/tmp/inputfile.txt", "r");
+while (!feof ($fd)) {
+    $buffer = fgets($fd, 4096);
+    echo $buffer;
+}
+fclose ($fd);
+      
+

+ See also fread(), fopen(), + popen(), fgetc(), + fsockopen(), and + socket_set_timeout(). +


PrevHomeNext
fgetcsvUpfgetss
\ No newline at end of file diff --git a/function.fgetss.html b/function.fgetss.html new file mode 100644 index 0000000..3dd8287 --- /dev/null +++ b/function.fgetss.html @@ -0,0 +1,241 @@ +fgetss
PHP Manual
PrevNext

fgetss

(PHP3 , PHP4 )

fgetss --  + Gets line from file pointer and strip HTML tags +

Description

string fgetss (int fp, int length [, string + allowable_tags])

Identical to fgets(), except that fgetss + attempts to strip any HTML and PHP tags from the text it + reads. +

You can use the optional third parameter to specify tags which + should not be stripped. +

Note: + allowable_tags was added in PHP 3.0.13, + PHP4B3. +

+

See also fgets(), fopen(), + fsockopen(), popen(), and + strip_tags(). +


PrevHomeNext
fgetsUpfile
\ No newline at end of file diff --git a/function.file-exists.html b/function.file-exists.html new file mode 100644 index 0000000..257ba41 --- /dev/null +++ b/function.file-exists.html @@ -0,0 +1,196 @@ +file_exists
PHP Manual
PrevNext

file_exists

(PHP3 , PHP4 )

file_exists -- Checks whether a file exists

Description

bool file_exists (string filename)

Returns true if the file specified by + filename exists; false otherwise. +

file_exists() will not work on remote files; + the file to be examined must be accessible via the server's + filesystem. +

The results of this function are cached. See + clearstatcache() for more details. +


PrevHomeNext
fileUpfileatime
\ No newline at end of file diff --git a/function.file.html b/function.file.html new file mode 100644 index 0000000..c07ed19 --- /dev/null +++ b/function.file.html @@ -0,0 +1,258 @@ +file
PHP Manual
PrevNext

file

(PHP3 , PHP4 )

file -- Reads entire file into an array

Description

array file (string filename [, int + use_include_path])

+ Identical to readfile(), except that + file() returns the file in an array. Each + element of the array corresponds to a line in the file, with the + newline still attached. +

You can use the optional second parameter and set it to "1", if + you want to search for the file in the include_path, too. +


<?php
+// get a web page into an array and print it out
+$fcontents = file ('http://www.php.net');
+while (list ($line_num, $line) = each ($fcontents)) {
+    echo "<b>Line $line_num:</b> " . htmlspecialchars ($line) . "<br>\n";
+}
+
+// get a web page into a string
+$fcontents = join ('', file ('http://www.php.net'));
+?>
+      

+

+ See also readfile(), + fopen(), fsockopen(), and + popen(). +


PrevHomeNext
fgetssUpfile_exists
\ No newline at end of file diff --git a/function.fileatime.html b/function.fileatime.html new file mode 100644 index 0000000..f057645 --- /dev/null +++ b/function.fileatime.html @@ -0,0 +1,194 @@ +fileatime
PHP Manual
PrevNext

fileatime

(PHP3 , PHP4 )

fileatime -- Gets last access time of file

Description

int fileatime (string filename)

+ Returns the time the file was last accessed, or false in case of + an error. The time is returned as a Unix timestamp. +

The results of this function are cached. See + clearstatcache() for more details. +

Note: The atime of a file is supposed to change whenever + the data blocks of a file are being read. This can be + costly performancewise when an appliation regularly + accesses a very large number of files or directories. Some + Unix filesystems can be mounted with atime updates disabled + to increase the performance of such applications; USENET + news spools are a common example. On such filesystems + this function will be useless. +


PrevHomeNext
file_existsUpfilectime
\ No newline at end of file diff --git a/function.filectime.html b/function.filectime.html new file mode 100644 index 0000000..2848370 --- /dev/null +++ b/function.filectime.html @@ -0,0 +1,210 @@ +filectime
PHP Manual
PrevNext

filectime

(PHP3 , PHP4 )

filectime -- Gets inode change time of file

Description

int filectime (string filename)

Returns the time the file was last changed, or false in case of + an error. The time is returned as a Unix timestamp. +

The results of this function are cached. See + clearstatcache() for more details. +

Note: In most Unix filesystem, a file is considered + changed, when it's Inode data is changed, that is, when + the permissions, the owner, the group or other metadata + from the Inode is written to. See also + filemtime() (this is what you want to use + when you want to create "Last Modified" footers on web pages) and + fileatime(). +

Note: In some Unix texts the ctime of a file is being + referred to as the creation time of the file. This is wrong. + There is no creation time for Unix files in most Unix + filesystems. +


PrevHomeNext
fileatimeUpfilegroup
\ No newline at end of file diff --git a/function.filegroup.html b/function.filegroup.html new file mode 100644 index 0000000..88fb512 --- /dev/null +++ b/function.filegroup.html @@ -0,0 +1,203 @@ +filegroup
PHP Manual
PrevNext

filegroup

(PHP3 , PHP4 )

filegroup -- Gets file group

Description

int filegroup (string filename)

+ Returns the group ID of the owner of the file, or false in case + of an error. The group ID is returned in numerical format, use + posix_getgrgid() to resolve it to a group name. +

The results of this function are cached. See + clearstatcache() for more details. +

Note: + This function does not work on Windows systems +


PrevHomeNext
filectimeUpfileinode
\ No newline at end of file diff --git a/function.fileinode.html b/function.fileinode.html new file mode 100644 index 0000000..1659fcc --- /dev/null +++ b/function.fileinode.html @@ -0,0 +1,195 @@ +fileinode
PHP Manual
PrevNext

fileinode

(PHP3 , PHP4 )

fileinode -- Gets file inode

Description

int fileinode (string filename)

+ Returns the inode number of the file, or false in case of an + error.

The results of this function are cached. See + clearstatcache() for more details. +

Note: + This function does not work on Windows systems +


PrevHomeNext
filegroupUpfilemtime
\ No newline at end of file diff --git a/function.filemtime.html b/function.filemtime.html new file mode 100644 index 0000000..8b0e3cb --- /dev/null +++ b/function.filemtime.html @@ -0,0 +1,196 @@ +filemtime
PHP Manual
PrevNext

filemtime

(PHP3 , PHP4 )

filemtime -- Gets file modification time

Description

int filemtime (string filename)

Returns the time the file was last modified, or false in case of + an error. The time is returned as a Unix timestamp. +

The results of this function are cached. See + clearstatcache() for more details. +

Note: This function returns the time when the data + blocks of a file were being written to, that is, the time + when the content of the file was changed. Use + date() on the result of this function + to get a printable modification date for use in page footers. +


PrevHomeNext
fileinodeUpfileowner
\ No newline at end of file diff --git a/function.fileowner.html b/function.fileowner.html new file mode 100644 index 0000000..9ddc7e8 --- /dev/null +++ b/function.fileowner.html @@ -0,0 +1,203 @@ +fileowner
PHP Manual
PrevNext

fileowner

(PHP3 , PHP4 )

fileowner -- Gets file owner

Description

int fileowner (string filename)

+ Returns the user ID of the owner of the file, or false in case of + an error. The user ID is returned in numerical format, use + posix_getpwuid() to resolve it to a username. +

The results of this function are cached. See + clearstatcache() for more details. +

Note: + This function does not work on Windows systems +


PrevHomeNext
filemtimeUpfileperms
\ No newline at end of file diff --git a/function.fileperms.html b/function.fileperms.html new file mode 100644 index 0000000..eb3f991 --- /dev/null +++ b/function.fileperms.html @@ -0,0 +1,183 @@ +fileperms
PHP Manual
PrevNext

fileperms

(PHP3 , PHP4 )

fileperms -- Gets file permissions

Description

int fileperms (string filename)

+ Returns the permissions on the file, or false in case of an error. +

The results of this function are cached. See + clearstatcache() for more details. +


PrevHomeNext
fileownerUpfilesize
\ No newline at end of file diff --git a/function.filepro-fieldcount.html b/function.filepro-fieldcount.html new file mode 100644 index 0000000..f69a3a8 --- /dev/null +++ b/function.filepro-fieldcount.html @@ -0,0 +1,180 @@ +filepro_fieldcount
PHP Manual
PrevNext

filepro_fieldcount

(PHP3 , PHP4 )

filepro_fieldcount -- find out how many fields are in a filePro database

Description

int filepro_fieldcount(void);

Returns the number of fields (columns) in the opened filePro + database.

See also filepro().


PrevHomeNext
filepro_retrieveUpfilepro_rowcount
\ No newline at end of file diff --git a/function.filepro-fieldname.html b/function.filepro-fieldname.html new file mode 100644 index 0000000..18c539f --- /dev/null +++ b/function.filepro-fieldname.html @@ -0,0 +1,176 @@ +filepro_fieldname
PHP Manual
PrevNext

filepro_fieldname

(PHP3 , PHP4 )

filepro_fieldname -- gets the name of a field

Description

string filepro_fieldname (int field_number)

Returns the name of the field corresponding to field_number.


PrevHomeNext
fileproUpfilepro_fieldtype
\ No newline at end of file diff --git a/function.filepro-fieldtype.html b/function.filepro-fieldtype.html new file mode 100644 index 0000000..ff2f9d0 --- /dev/null +++ b/function.filepro-fieldtype.html @@ -0,0 +1,176 @@ +filepro_fieldtype
PHP Manual
PrevNext

filepro_fieldtype

(PHP3 , PHP4 )

filepro_fieldtype -- gets the type of a field

Description

string filepro_fieldtype (int field_number)

Returns the edit type of the field corresponding to field_number.


PrevHomeNext
filepro_fieldnameUpfilepro_fieldwidth
\ No newline at end of file diff --git a/function.filepro-fieldwidth.html b/function.filepro-fieldwidth.html new file mode 100644 index 0000000..cea79d6 --- /dev/null +++ b/function.filepro-fieldwidth.html @@ -0,0 +1,176 @@ +filepro_fieldwidth
PHP Manual
PrevNext

filepro_fieldwidth

(PHP3 , PHP4 )

filepro_fieldwidth -- gets the width of a field

Description

int filepro_fieldwidth (int field_number)

Returns the width of the field corresponding to field_number.


PrevHomeNext
filepro_fieldtypeUpfilepro_retrieve
\ No newline at end of file diff --git a/function.filepro-retrieve.html b/function.filepro-retrieve.html new file mode 100644 index 0000000..9021f82 --- /dev/null +++ b/function.filepro-retrieve.html @@ -0,0 +1,171 @@ +filepro_retrieve
PHP Manual
PrevNext

filepro_retrieve

(PHP3 , PHP4 )

filepro_retrieve -- retrieves data from a filePro database

Description

string filepro_retrieve (int row_number, int field_number)

Returns the data from the specified location in the database.


PrevHomeNext
filepro_fieldwidthUpfilepro_fieldcount
\ No newline at end of file diff --git a/function.filepro-rowcount.html b/function.filepro-rowcount.html new file mode 100644 index 0000000..f8d64a9 --- /dev/null +++ b/function.filepro-rowcount.html @@ -0,0 +1,179 @@ +filepro_rowcount
PHP Manual
PrevNext

filepro_rowcount

(PHP3 , PHP4 )

filepro_rowcount -- find out how many rows are in a filePro database

Description

int filepro_rowcount(void);

Returns the number of rows in the opened filePro database.

See also filepro().


PrevHomeNext
filepro_fieldcountUpFilesystem functions
\ No newline at end of file diff --git a/function.filepro.html b/function.filepro.html new file mode 100644 index 0000000..406a2d6 --- /dev/null +++ b/function.filepro.html @@ -0,0 +1,175 @@ +filepro
PHP Manual
PrevNext

filepro

(PHP3 , PHP4 )

filepro -- read and verify the map file

Description

bool filepro (string directory)

This reads and verifies the map file, storing the field count + and info.

No locking is done, so you should avoid modifying your filePro + database while it may be opened in PHP.


PrevHomeNext
filePro functionsUpfilepro_fieldname
\ No newline at end of file diff --git a/function.filesize.html b/function.filesize.html new file mode 100644 index 0000000..8671a41 --- /dev/null +++ b/function.filesize.html @@ -0,0 +1,183 @@ +filesize
PHP Manual
PrevNext

filesize

(PHP3 , PHP4 )

filesize -- Gets file size

Description

int filesize (string filename)

+ Returns the size of the file, or false in case of an error. +

The results of this function are cached. See + clearstatcache() for more details. +


PrevHomeNext
filepermsUpfiletype
\ No newline at end of file diff --git a/function.filetype.html b/function.filetype.html new file mode 100644 index 0000000..9b3385a --- /dev/null +++ b/function.filetype.html @@ -0,0 +1,187 @@ +filetype
PHP Manual
PrevNext

filetype

(PHP3 , PHP4 )

filetype -- Gets file type

Description

string filetype (string filename)

+ Returns the type of the file. Possible values are fifo, char, + dir, block, link, file, and unknown.

Returns false + if an error occurs. +

The results of this function are cached. See + clearstatcache() for more details. +


PrevHomeNext
filesizeUpflock
\ No newline at end of file diff --git a/function.flock.html b/function.flock.html new file mode 100644 index 0000000..e75382b --- /dev/null +++ b/function.flock.html @@ -0,0 +1,269 @@ +flock
PHP Manual
PrevNext

flock

(PHP3 >= 3.0.7, PHP4 )

flock -- Portable advisory file locking

Description

bool flock (int fp, int operation [, int + wouldblock])

PHP supports a portable way of locking complete files in an + advisory way (which means all accessing programs have to use the + same way of locking or it will not work). +

flock() operates on fp + which must be an open file + pointer. operation is one of the following + values: +

  • To acquire a shared lock (reader), set + operation to LOCK_SH (set to 1 prior to + PHP 4.0.1). +

  • To acquire an exclusive lock (writer), set + operation to LOCK_EX (set to 2 prior to + PHP 4.0.1). +

  • To release a lock (shared or exclusive), set + operation to LOCK_UN (set to 3 prior to + PHP 4.0.1). +

  • If you don't want flock() to block while + locking, add LOCK_NB (4 prior to PHP 4.0.1) to + operation. +

+

Flock() allows you to perform a simple + reader/writer model which can be used on virtually every platform + (including most Unices and even Windows). The optional 3rd + argument is set to true if the lock would block (EWOULDBLOCK + errno condition) +

Flock() returns true on success and false on + error (e.g. when a lock could not be acquired). +


PrevHomeNext
filetypeUpfopen
\ No newline at end of file diff --git a/function.floor.html b/function.floor.html new file mode 100644 index 0000000..5715891 --- /dev/null +++ b/function.floor.html @@ -0,0 +1,209 @@ +floor
PHP Manual
PrevNext

floor

(PHP3 , PHP4 )

floor -- Round fractions down

Description

int floor (float number)

Returns the next lowest integer value from + number. Using floor() + on integers is absolutely a waste of time. +

NOTE: PHP/FI 2's floor() returned a + float. Use: $new = (double)floor($number); to + get the old behaviour. +

See also ceil() and + round(). +


PrevHomeNext
expUpgetrandmax
\ No newline at end of file diff --git a/function.flush.html b/function.flush.html new file mode 100644 index 0000000..8cf6791 --- /dev/null +++ b/function.flush.html @@ -0,0 +1,174 @@ +flush
PHP Manual
PrevNext

flush

(PHP3 , PHP4 )

flush -- Flush the output buffer

Description

void flush(void);

Flushes the output buffers of PHP and whatever backend PHP is + using (CGI, a web server, etc.) This effectively tries to push + all the output so far to the user's browser. +


PrevHomeNext
Output Control FunctionsUpob_start
\ No newline at end of file diff --git a/function.fopen.html b/function.fopen.html new file mode 100644 index 0000000..ad57f67 --- /dev/null +++ b/function.fopen.html @@ -0,0 +1,401 @@ +fopen
PHP Manual
PrevNext

fopen

(PHP3 , PHP4 )

fopen -- Opens file or URL

Description

int fopen (string filename, string mode [, int + use_include_path])

If filename begins with "http://" (not + case sensitive), an HTTP 1.0 connection is opened to the + specified server and a file pointer is returned to the beginning + of the text of the response. A 'Host:' header is sent with the + request in order to handle name-based virtual hosts. +

Does not handle HTTP redirects, so you must include trailing + slashes on directories. +

If filename begins with "ftp://" (not case + sensitive), an ftp connection to the specified server is opened + and a pointer to the requested file is returned. If the server + does not support passive mode ftp, this will fail. You can open + files for either reading and writing via ftp (but not both + simultaneously). +

If filename is one of "php://stdin", + "php://stdout", or "php://stderr", the corresponding stdio + stream will be opened. (This was introduced in PHP 3.0.13; + in earlier versions, a filename such as "/dev/stdin" or + "/dev/fd/0" must be used to access the stdio streams.) +

If filename begins with anything else, the + file will be opened from the filesystem, and a file pointer to + the file opened is returned. +

If the open fails, the function returns false. +

mode may be any of the following: +

  • 'r' - Open for reading only; place the file pointer at the + beginning of the file. +

  • 'r+' - Open for reading and writing; place the file pointer at + the beginning of the file. +

  • 'w' - Open for writing only; place the file pointer at the + beginning of the file and truncate the file to zero length. + If the file does not exist, attempt to create it. +

  • 'w+' - Open for reading and writing; place the file pointer at + the beginning of the file and truncate the file to zero + length. If the file does not exist, attempt to create it. +

  • 'a' - Open for writing only; place the file pointer at the end + of the file. If the file does not exist, attempt to create + it. +

  • 'a+' - Open for reading and writing; place the file pointer at + the end of the file. If the file does not exist, attempt to + create it. +

+ The mode may contain the letter + 'b'. This is useful only on systems which differentiate between + binary and text files (i.e., it's useless on Unix). If not + needed, this will be ignored. +

You can use the optional third parameter and set it to "1", if + you want to search for the file in the include_path, too. +

Example 1. Fopen() example


$fp = fopen ("/home/rasmus/file.txt", "r");
+$fp = fopen ("/home/rasmus/file.gif", "wb");
+$fp = fopen ("http://www.php.net/", "r");
+$fp = fopen ("ftp://user:password@example.com/", "w");
+      
+

If you are experiencing problems with reading and writing to + files and you're using the server module version of PHP, remember + to make sure that the files and directories you're using are + accessible to the server process. +

On the Windows platform, be careful to escape any backslashes + used in the path to the file, or use forward slashes. +

 
+$fp = fopen ("c:\\data\\info.txt", "r");
+      

+

See also fclose(), + fsockopen(), + socket_set_timeout(), and + popen(). +


PrevHomeNext
flockUpfpassthru
\ No newline at end of file diff --git a/function.fpassthru.html b/function.fpassthru.html new file mode 100644 index 0000000..c762760 --- /dev/null +++ b/function.fpassthru.html @@ -0,0 +1,261 @@ +fpassthru
PHP Manual
PrevNext

fpassthru

(PHP3 , PHP4 )

fpassthru --  + Output all remaining data on a file pointer +

Description

int fpassthru (int fp)

Reads to EOF on the given file pointer and writes the results to + standard output. +

If an error occurs, fpassthru() returns + false. +

The file pointer must be valid, and must point to a file + successfully opened by fopen(), + popen(), or fsockopen(). + The file is closed when fpassthru() is done + reading it (leaving fp useless). +

If you just want to dump the contents of a file to stdout you may + want to use the readfile(), which saves you + the fopen() call. +

See also readfile(), + fopen(), popen(), and + fsockopen() +


PrevHomeNext
fopenUpfputs
\ No newline at end of file diff --git a/function.fputs.html b/function.fputs.html new file mode 100644 index 0000000..9c3f6fd --- /dev/null +++ b/function.fputs.html @@ -0,0 +1,190 @@ +fputs
PHP Manual
PrevNext

fputs

(PHP3 , PHP4 )

fputs -- Writes to a file pointer

Description

int fputs (int fp, string str [, int + length])

Fputs() is an alias to + fwrite(), and is identical in every way. Note + that the length parameter is optional and + if not specified the entire string will be written. +


PrevHomeNext
fpassthruUpfread
\ No newline at end of file diff --git a/function.fread.html b/function.fread.html new file mode 100644 index 0000000..5c78b50 --- /dev/null +++ b/function.fread.html @@ -0,0 +1,285 @@ +fread
PHP Manual
PrevNext

fread

(PHP3 , PHP4 )

fread -- Binary-safe file read

Description

string fread (int fp, int length)

Fread() reads up to + length bytes from the file pointer + referenced by fp. Reading stops when + length bytes have been read or EOF is + reached, whichever comes first. +


// get contents of a file into a string
+$filename = "/usr/local/something.txt";
+$fd = fopen ($filename, "r");
+$contents = fread ($fd, filesize ($filename));
+fclose ($fd);
+      

+

See also fwrite(), fopen(), + fsockopen(), popen(), + fgets(), fgetss(), + fscanf(), file(), and + fpassthru(). +


PrevHomeNext
fputsUpfscanf
\ No newline at end of file diff --git a/function.frenchtojd.html b/function.frenchtojd.html new file mode 100644 index 0000000..1f3482c --- /dev/null +++ b/function.frenchtojd.html @@ -0,0 +1,182 @@ +FrenchToJD
PHP Manual
PrevNext

FrenchToJD

(PHP3 , PHP4 )

FrenchToJD --  + Converts a date from the French Republican Calendar to a Julian + Day Count +

Description

int frenchtojd (int month, int day, int year)

Converts a date from the French Republican Calendar to a Julian + Day Count. +

These routines only convert dates in years 1 through 14 + (Gregorian dates 22 September 1792 through 22 September + 1806). This more than covers the period when the calendar was in + use. +


PrevHomeNext
JDToFrenchUpJDMonthName
\ No newline at end of file diff --git a/function.fscanf.html b/function.fscanf.html new file mode 100644 index 0000000..87ba440 --- /dev/null +++ b/function.fscanf.html @@ -0,0 +1,322 @@ +fscanf
PHP Manual
PrevNext

fscanf

(PHP4 >= 4.0.1)

fscanf -- Parses input from a file according to a format

Description

mixed fscanf (int handle, string format [, string + var1...])

The function fscanf() is similar to + sscanf(), but it takes its input from a file + associated with handle and interprets the + input according to the specified + format. If only two parameters were passed + to this function, the values parsed will be returned as an array. + Otherwise, if optional parameters are passed, the function will + return the number of assigned values. The optional parameters + must be passed by reference. +

Example 1. Fscanf() Example


$fp = fopen ("users.txt","r");
+while ($userinfo = fscanf ($fp, "%s\t%s\t%s\n")) {
+    list ($name, $profession, $countrycode) = $userinfo;
+    //... do something with the values
+}
+fclose($fp);
+      
+

Example 2. users.txt


javier  argonaut        pe
+hiroshi sculptor        jp
+robert  slacker us
+luigi   florist it
+      
+

See also fread(), fgets(), + fgetss(), sscanf(), + printf(), and sprintf(). +


PrevHomeNext
freadUpfseek
\ No newline at end of file diff --git a/function.fseek.html b/function.fseek.html new file mode 100644 index 0000000..f8aa738 --- /dev/null +++ b/function.fseek.html @@ -0,0 +1,292 @@ +fseek
PHP Manual
PrevNext

fseek

(PHP3 , PHP4 )

fseek -- Seeks on a file pointer

Description

int fseek (int fp, int offset [, int + whence])

Sets the file position indicator for the file referenced by + fp.The new position, measured in bytes + from the beginning of the file, is obtained by adding + offset to the position specified by + whence, whose values are defined as + follows: +

SEEK_SET - Set position equal to + offset bytes.
SEEK_CUR - + Set position to current location plus + offset.
SEEK_END - Set + position to end-of-file plus + offset.

+

If whence is not specified, it is assumed to be + SEEK_SET. +

Upon success, returns 0; otherwise, returns -1. Note that seeking + past EOF is not considered an error. +

May not be used on file pointers returned by + fopen() if they use the "http://" or "ftp://" + formats. +

Note: + The whence argument was added after PHP 4.0 RC1. +

See also ftell() and + rewind(). +


PrevHomeNext
fscanfUpfstat
\ No newline at end of file diff --git a/function.fsockopen.html b/function.fsockopen.html new file mode 100644 index 0000000..d4bcfa1 --- /dev/null +++ b/function.fsockopen.html @@ -0,0 +1,457 @@ +fsockopen
PHP Manual
PrevNext

fsockopen

(PHP3 , PHP4 )

fsockopen --  + Open Internet or Unix domain socket connection +

Description

int fsockopen (string [udp://]hostname, int port [, int + errno [, string + errstr [, double + timeout]]])

Initiates a stream connection in the Internet (AF_INET, using TCP + or UDP) or Unix (AF_UNIX) domain. For the Internet domain, it + will open a TCP socket connection to + hostname on port + port. hostname may + in this case be either a fully qualified domain name or an IP + address. For UDP connections, you need to explicitly specify the + protocol: udp://hostname. For the Unix + domain, hostname will be used as the path + to the socket, port must be set to 0 in + this case. The optional timeout can be + used to set a timeout in seconds for the connect system call. +

Fsockopen() returns a file pointer which may + be used together with the other file functions (such as + fgets(), fgetss(), + fputs(), fclose(), and + feof()). +

If the call fails, it will return false and if the optional + errno and errstr + arguments are present they will be set to indicate the actual + system level error that occurred on the system-level + connect() call. If the returned errno is 0 and + the function returned false, it is an indication that the error + occurred before the connect() call. This is + most likely due to a problem initializing the socket. Note that + the errno and + errstr arguments must be passed by + reference. +

Depending on the environment, the Unix domain or the optional + connect timeout may not be available. +

The socket will by default be opened in blocking mode. You can + switch it to non-blocking mode by using + socket_set_blocking(). +

Example 1. Fsockopen() Example


$fp = fsockopen ("www.php.net", 80, &$errno, &$errstr, 30);
+if (!$fp) {
+    echo "$errstr ($errno)<br>\n";
+} else {
+    fputs ($fp, "GET / HTTP/1.0\r\n\r\n");
+    while (!feof($fp)) {
+        echo fgets ($fp,128);
+    }
+    fclose ($fp);
+}
+      
+ The example below shows how to retrieve the day and time + from the UDP service "daytime" (port 13) in your own machine. +

Example 2. Using UDP connection


<?php
+$fp = fsockopen("udp://127.0.0.1", 13, &$errno, &$errstr);
+if (!$fp) {
+    echo "ERROR: $errno - $errstr<br>\n";
+} else {
+    fwrite($fp,"\n");
+    echo fread($fp, 26);
+    fclose($fp);
+}
+?>
+     
+ See also: pfsockopen(), + socket_set_blocking(), + socket_set_timeout(), fgets(), + fgetss(), fputs(), + fclose(), and feof()). +


PrevHomeNext
define_syslog_variablesUpgethostbyaddr
\ No newline at end of file diff --git a/function.fstat.html b/function.fstat.html new file mode 100644 index 0000000..6ce7241 --- /dev/null +++ b/function.fstat.html @@ -0,0 +1,252 @@ +fstat
PHP Manual
PrevNext

fstat

(PHP4 >= 4.0RC1)

fstat --  + Gets information about a file using an open file pointer +

Description

array fstat (int fp)

Gathers the statistics of the file opened by the file + pointer fp. This function is similar to the + stat() function except that it operates + on an open file pointer instead of a filename. +

Returns an array with the statistics of the file with the + following elements: +

  1. device

  2. inode

  3. number of links

  4. user id of owner

  5. group id owner

  6. device type if inode device *

  7. size in bytes

  8. time of last access

  9. time of last modification

  10. time of last change

  11. blocksize for filesystem I/O *

  12. number of blocks allocated

+ * - only valid on systems supporting the st_blksize type--other + systems (i.e. Windows) return -1

The results of this function are cached. See + clearstatcache() for more details. +


PrevHomeNext
fseekUpftell
\ No newline at end of file diff --git a/function.ftell.html b/function.ftell.html new file mode 100644 index 0000000..23edd42 --- /dev/null +++ b/function.ftell.html @@ -0,0 +1,222 @@ +ftell
PHP Manual
PrevNext

ftell

(PHP3 , PHP4 )

ftell -- Tells file pointer read/write position

Description

int ftell (int fp)

Returns the position of the file pointer referenced by fp; i.e., + its offset into the file stream. +

If an error occurs, returns false. +

The file pointer must be valid, and must point to a file + successfully opened by fopen() or + popen(). +

+ See also fopen(), popen(), + fseek() and rewind(). +


PrevHomeNext
fstatUpftruncate
\ No newline at end of file diff --git a/function.ftp-cdup.html b/function.ftp-cdup.html new file mode 100644 index 0000000..f136a4a --- /dev/null +++ b/function.ftp-cdup.html @@ -0,0 +1,174 @@ +ftp_cdup
PHP Manual
PrevNext

ftp_cdup

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

ftp_cdup -- Changes to the parent directory

Description

int ftp_cdup (int ftp_stream)

Returns true on success, false on error.

+ Changes to the parent directory.


PrevHomeNext
ftp_pwdUpftp_chdir
\ No newline at end of file diff --git a/function.ftp-chdir.html b/function.ftp-chdir.html new file mode 100644 index 0000000..01fcc20 --- /dev/null +++ b/function.ftp-chdir.html @@ -0,0 +1,179 @@ +ftp_chdir
PHP Manual
PrevNext

ftp_chdir

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

ftp_chdir -- Changes directories on a FTP server

Description

int ftp_chdir (int ftp_stream, string directory)

Returns true on success, false on error.

+ Changes to the specified directory.


PrevHomeNext
ftp_cdupUpftp_mkdir
\ No newline at end of file diff --git a/function.ftp-connect.html b/function.ftp-connect.html new file mode 100644 index 0000000..2a9cccb --- /dev/null +++ b/function.ftp-connect.html @@ -0,0 +1,189 @@ +ftp_connect
PHP Manual
PrevNext

ftp_connect

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

ftp_connect -- Opens up an FTP connection

Description

int ftp_connect (string host [, int port])

Returns a FTP stream on success, false on error.

ftp_connect() opens up a FTP connection to the + specified host. The port + parameter specifies an alternate port to connect to. If it is + omitted or zero, then the default FTP port, 21, will be used.


PrevHomeNext
FTP functionsUpftp_login
\ No newline at end of file diff --git a/function.ftp-delete.html b/function.ftp-delete.html new file mode 100644 index 0000000..088f3af --- /dev/null +++ b/function.ftp-delete.html @@ -0,0 +1,183 @@ +ftp_delete
PHP Manual
PrevNext

ftp_delete

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

ftp_delete -- Deletes a file on the ftp server.

Description

int ftp_delete (int ftp_stream, string path)

Returns true on success, false on error.

ftp_delete() deletes the file specified by + path from the FTP server. +


PrevHomeNext
ftp_renameUpftp_site
\ No newline at end of file diff --git a/function.ftp-fget.html b/function.ftp-fget.html new file mode 100644 index 0000000..0524a8c --- /dev/null +++ b/function.ftp-fget.html @@ -0,0 +1,195 @@ +ftp_fget
PHP Manual
PrevNext

ftp_fget

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

ftp_fget -- Downloads a file from the FTP server and saves to an + open file.

Description

int ftp_fget (int ftp_stream, int fp, string remote_file, int mode)

Returns true on success, false on error.

ftp_fget() retrieves remote_file + from the FTP server, and writes it to the given file pointer, + fp. The transfer mode + specified must be either FTP_ASCII or FTP_BINARY.


PrevHomeNext
ftp_getUpftp_put
\ No newline at end of file diff --git a/function.ftp-fput.html b/function.ftp-fput.html new file mode 100644 index 0000000..502580f --- /dev/null +++ b/function.ftp-fput.html @@ -0,0 +1,202 @@ +ftp_fput
PHP Manual
PrevNext

ftp_fput

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

ftp_fput -- Uploads from an open file to the FTP server.

Description

int ftp_fput (int ftp_stream, string remote_file, int fp, int mode)

Returns true on success, false on error.

ftp_fput() uploads the data from the file pointer + fp until end of file. The results are stored + in remote_file on the FTP server. The transfer + mode specified must be either + FTP_ASCII or FTP_BINARY +


PrevHomeNext
ftp_putUpftp_size
\ No newline at end of file diff --git a/function.ftp-get.html b/function.ftp-get.html new file mode 100644 index 0000000..a0b08e8 --- /dev/null +++ b/function.ftp-get.html @@ -0,0 +1,202 @@ +ftp_get
PHP Manual
PrevNext

ftp_get

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

ftp_get -- Downloads a file from the FTP server.

Description

int ftp_get (int ftp_stream, string local_file, string remote_file, int mode)

Returns true on success, false on error.

ftp_get() retrieves remote_file + from the FTP server, and saves it to local_file + locally. The transfer mode specified must + be either FTP_ASCII or + FTP_BINARY. +


PrevHomeNext
ftp_pasvUpftp_fget
\ No newline at end of file diff --git a/function.ftp-login.html b/function.ftp-login.html new file mode 100644 index 0000000..7229eba --- /dev/null +++ b/function.ftp-login.html @@ -0,0 +1,174 @@ +ftp_login
PHP Manual
PrevNext

ftp_login

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

ftp_login -- Logs in an FTP connection

Description

int ftp_login (int ftp_stream, string username, string password)

Returns true on success, false on error.

+ Logs in the given FTP stream.


PrevHomeNext
ftp_connectUpftp_pwd
\ No newline at end of file diff --git a/function.ftp-mdtm.html b/function.ftp-mdtm.html new file mode 100644 index 0000000..1801eeb --- /dev/null +++ b/function.ftp-mdtm.html @@ -0,0 +1,195 @@ +ftp_mdtm
PHP Manual
PrevNext

ftp_mdtm

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

ftp_mdtm -- Returns the last modified time of the given file.

Description

int ftp_mdtm (int ftp_stream, string remote_file)

Returns a UNIX timestamp on success, or -1 on error.

ftp_mdtm() checks the last-modified time for a + file, and returns it as a UNIX timestamp. If an error occurs, or + the file does not exist, -1 is returned. Note that not all servers + support this feature. +

Note: + ftp_mdtm() does not work with directories. +


PrevHomeNext
ftp_sizeUpftp_rename
\ No newline at end of file diff --git a/function.ftp-mkdir.html b/function.ftp-mkdir.html new file mode 100644 index 0000000..6698089 --- /dev/null +++ b/function.ftp-mkdir.html @@ -0,0 +1,179 @@ +ftp_mkdir
PHP Manual
PrevNext

ftp_mkdir

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

ftp_mkdir -- Creates a directory

Description

string ftp_mkdir (int ftp_stream, string directory)

Returns the newly created directory name on success, false on error.

+ Creates the specified directory.


PrevHomeNext
ftp_chdirUpftp_rmdir
\ No newline at end of file diff --git a/function.ftp-nlist.html b/function.ftp-nlist.html new file mode 100644 index 0000000..609621c --- /dev/null +++ b/function.ftp-nlist.html @@ -0,0 +1,171 @@ +ftp_nlist
PHP Manual
PrevNext

ftp_nlist

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

ftp_nlist -- Returns a list of files in the given directory.

Description

array ftp_nlist (int ftp_stream, string directory)

Returns an array of filenames on success, false on error.


PrevHomeNext
ftp_rmdirUpftp_rawlist
\ No newline at end of file diff --git a/function.ftp-pasv.html b/function.ftp-pasv.html new file mode 100644 index 0000000..1725239 --- /dev/null +++ b/function.ftp-pasv.html @@ -0,0 +1,190 @@ +ftp_pasv
PHP Manual
PrevNext

ftp_pasv

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

ftp_pasv -- Turns passive mode on or off.

Description

int ftp_pasv (int ftp_stream, int pasv)

Returns true on success, false on error.

ftp_pasv() turns on passive mode if the + pasv parameter is true (it turns off + passive mode if pasv is false.) In + passive mode, data connections are initiated by the client, + rather than by the server.


PrevHomeNext
ftp_systypeUpftp_get
\ No newline at end of file diff --git a/function.ftp-put.html b/function.ftp-put.html new file mode 100644 index 0000000..695a5bb --- /dev/null +++ b/function.ftp-put.html @@ -0,0 +1,241 @@ +ftp_put
PHP Manual
PrevNext

ftp_put

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

ftp_put -- Uploads a file to the FTP server.

Description

int ftp_put (int ftp_stream, string remote_file, string local_file, int mode)

Returns true on success, false on error.

ftp_put() stores local_file + on the FTP server, as remote_file. The transfer + mode specified must be either + FTP_ASCII or FTP_BINARY. +

Example 1. Ftp_put() example


$upload = ftp_put ($conn_id, "$destination_file", "$source_file", FTP_ASCII); 
+      
+


PrevHomeNext
ftp_fgetUpftp_fput
\ No newline at end of file diff --git a/function.ftp-pwd.html b/function.ftp-pwd.html new file mode 100644 index 0000000..5905c12 --- /dev/null +++ b/function.ftp-pwd.html @@ -0,0 +1,171 @@ +ftp_pwd
PHP Manual
PrevNext

ftp_pwd

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

ftp_pwd -- Returns the current directory name

Description

string ftp_pwd (int ftp_stream)

Returns the current directory, or false on error.


PrevHomeNext
ftp_loginUpftp_cdup
\ No newline at end of file diff --git a/function.ftp-quit.html b/function.ftp-quit.html new file mode 100644 index 0000000..4b73846 --- /dev/null +++ b/function.ftp-quit.html @@ -0,0 +1,183 @@ +ftp_quit
PHP Manual
PrevNext

ftp_quit

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

ftp_quit -- Closes an FTP connection

Description

int ftp_quit (int ftp_stream)

ftp_connect() closes ftp_stream. +


PrevHomeNext
ftp_siteUpFunction Handling functions
\ No newline at end of file diff --git a/function.ftp-rawlist.html b/function.ftp-rawlist.html new file mode 100644 index 0000000..a464d6f --- /dev/null +++ b/function.ftp-rawlist.html @@ -0,0 +1,186 @@ +ftp_rawlist
PHP Manual
PrevNext

ftp_rawlist

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

ftp_rawlist --  + Returns a detailed list of files in the given directory. +

Description

int ftp_rawlist (int ftp_stream, string directory)

ftp_rawlist() executes the FTP LIST command, + and returns the result as an array. Each array element corresponds + to one line of text. The output is not parsed in any way. The + system type identifier returned by ftp_systype() + can be used to determine how the results should be interpreted.


PrevHomeNext
ftp_nlistUpftp_systype
\ No newline at end of file diff --git a/function.ftp-rename.html b/function.ftp-rename.html new file mode 100644 index 0000000..b39f97a --- /dev/null +++ b/function.ftp-rename.html @@ -0,0 +1,189 @@ +ftp_rename
PHP Manual
PrevNext

ftp_rename

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

ftp_rename -- Renames a file on the ftp server.

Description

int ftp_rename (int ftp_stream, string from, string to)

Returns true on success, false on error.

ftp_rename() renames the file specified + by from to the new name + to +


PrevHomeNext
ftp_mdtmUpftp_delete
\ No newline at end of file diff --git a/function.ftp-rmdir.html b/function.ftp-rmdir.html new file mode 100644 index 0000000..a237607 --- /dev/null +++ b/function.ftp-rmdir.html @@ -0,0 +1,179 @@ +ftp_rmdir
PHP Manual
PrevNext

ftp_rmdir

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

ftp_rmdir -- Removes a directory

Description

int ftp_rmdir (int ftp_stream, string directory)

Returns true on success, false on error.

+ Removes the specified directory.


PrevHomeNext
ftp_mkdirUpftp_nlist
\ No newline at end of file diff --git a/function.ftp-site.html b/function.ftp-site.html new file mode 100644 index 0000000..34f6a73 --- /dev/null +++ b/function.ftp-site.html @@ -0,0 +1,185 @@ +ftp_site
PHP Manual
PrevNext

ftp_site

(PHP3 >= 3.0.15, PHP4 >= 4.0RC1)

ftp_site -- Sends a SITE command to the server.

Description

int ftp_site (int ftp_stream, string cmd)

Returns true on success, false on error.

ftp_site() sends the command specified by + cmd to the FTP server. SITE commands + are not standardized, and vary from server to server. They are + useful for handling such things as file permissions and group + membership.


PrevHomeNext
ftp_deleteUpftp_quit
\ No newline at end of file diff --git a/function.ftp-size.html b/function.ftp-size.html new file mode 100644 index 0000000..8b98b21 --- /dev/null +++ b/function.ftp-size.html @@ -0,0 +1,178 @@ +ftp_size
PHP Manual
PrevNext

ftp_size

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

ftp_size -- Returns the size of the given file.

Description

int ftp_size (int ftp_stream, string remote_file)

Returns the file size on success, or -1 on error.

ftp_size() returns the size of a file. If an + error occurs, of if the file does not exist, -1 is returned. Not + all servers support this feature.


PrevHomeNext
ftp_fputUpftp_mdtm
\ No newline at end of file diff --git a/function.ftp-systype.html b/function.ftp-systype.html new file mode 100644 index 0000000..e2d8d46 --- /dev/null +++ b/function.ftp-systype.html @@ -0,0 +1,173 @@ +ftp_systype
PHP Manual
PrevNext

ftp_systype

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

ftp_systype --  + Returns the system type identifier of the remote FTP server. +

Description

string ftp_systype (int ftp_stream)

Returns the remote system type, or false on error.


PrevHomeNext
ftp_rawlistUpftp_pasv
\ No newline at end of file diff --git a/function.ftruncate.html b/function.ftruncate.html new file mode 100644 index 0000000..7582bbb --- /dev/null +++ b/function.ftruncate.html @@ -0,0 +1,175 @@ +ftruncate
PHP Manual
PrevNext

ftruncate

(PHP4 >= 4.0RC1)

ftruncate --  + Truncates a file to a given length. +

Description

int ftruncate (int fp, int size)

Takes the filepointer, fp, and truncates the file to length, size. + This function returns true on success and false on failure. +


PrevHomeNext
ftellUpfwrite
\ No newline at end of file diff --git a/function.func-get-arg.html b/function.func-get-arg.html new file mode 100644 index 0000000..aae583b --- /dev/null +++ b/function.func-get-arg.html @@ -0,0 +1,266 @@ +func_get_arg
PHP Manual
PrevNext

func_get_arg

(PHP4 >= 4.0b4)

func_get_arg -- Return an item from the argument list

Description

mixed func_get_arg (int arg_num)

Returns the argument which is at the + arg_num'th offset into a user-defined + function's argument list. Function arguments are counted starting + from zero. Func_get_arg() will generate a + warning if called from outside of a function definition. +

If arg_num is greater than the number of + arguments actually passed, a warning will be generated and + func_get_arg() will return FALSE. +


<?php
+function foo() {
+     $numargs = func_num_args();
+     echo "Number of arguments: $numargs<br>\n";
+     if ($numargs >= 2) {
+     echo "Second argument is: " . func_get_arg (1) . "<br>\n";
+     }
+} 
+
+foo (1, 2, 3);
+?>
+      

+

Func_get_arg() may be used in conjunction with + func_num_args() and + func_get_args() to allow user-defined + functions to accept variable-length argument lists. +

Note: + This function was added in PHP 4. +


PrevHomeNext
create_functionUpfunc_get_args
\ No newline at end of file diff --git a/function.func-get-args.html b/function.func-get-args.html new file mode 100644 index 0000000..fc4ea76 --- /dev/null +++ b/function.func-get-args.html @@ -0,0 +1,253 @@ +func_get_args
PHP Manual
PrevNext

func_get_args

(PHP4 >= 4.0b4)

func_get_args --  + Returns an array comprising a function's argument list +

Description

array func_get_args (void )

Returns an array in which each element is the corresponding + member of the current user-defined function's argument + list. Func_get_args() will generate a warning + if called from outside of a function definition. +


<?php
+function foo() {
+    $numargs = func_num_args();
+    echo "Number of arguments: $numargs<br>\n";
+    if ($numargs >= 2) {
+    echo "Second argument is: " . func_get_arg (1) . "<br>\n";
+    }
+    $arg_list = func_get_args();
+    for ($i = 0; $i < $numargs; $i++) {
+    echo "Argument $i is: " . $arg_list[$i] . "<br>\n";
+    }
+} 
+
+foo (1, 2, 3);
+?>
+      

+

Func_get_args() may be used in conjunction + with func_num_args() and + func_get_arg() to allow user-defined functions + to accept variable-length argument lists. +

Note: + This function was added in PHP 4. +


PrevHomeNext
func_get_argUpfunc_num_args
\ No newline at end of file diff --git a/function.func-num-args.html b/function.func-num-args.html new file mode 100644 index 0000000..aa1d03a --- /dev/null +++ b/function.func-num-args.html @@ -0,0 +1,246 @@ +func_num_args
PHP Manual
PrevNext

func_num_args

(PHP4 >= 4.0b4)

func_num_args --  + Returns the number of arguments passed to the function +

Description

int func_num_args (void )

Returns the number of arguments passed into the current + user-defined function. Func_num_args() will + generate a warning if called from outside of a function + definition. +


<?php
+function foo() {
+    $numargs = func_num_args();
+    echo "Number of arguments: $numargs\n";
+} 
+
+foo (1, 2, 3);    // Prints 'Number of arguments: 3'
+?>
+      

+

Func_num_args() may be used in conjunction + with func_get_arg() and + func_get_args() to allow user-defined + functions to accept variable-length argument lists. +

Note: + This function was added in PHP 4. +


PrevHomeNext
func_get_argsUpfunction_exists
\ No newline at end of file diff --git a/function.function-exists.html b/function.function-exists.html new file mode 100644 index 0000000..a078bd7 --- /dev/null +++ b/function.function-exists.html @@ -0,0 +1,181 @@ +function_exists
PHP Manual
PrevNext

function_exists

(PHP3 >= 3.0.7, PHP4 )

function_exists --  + Return true if the given function has been defined +

Description

int function_exists (string function_name)

Checks the list of defined functions for + function_name. Returns true if the given + function name was found, false otherwise. +


PrevHomeNext
func_num_argsUpregister_shutdown_function
\ No newline at end of file diff --git a/function.fwrite.html b/function.fwrite.html new file mode 100644 index 0000000..2a1a707 --- /dev/null +++ b/function.fwrite.html @@ -0,0 +1,261 @@ +fwrite
PHP Manual
PrevNext

fwrite

(PHP3 , PHP4 )

fwrite -- Binary-safe file write

Description

int fwrite (int fp, string string [, int + length])

fwrite() writes the contents of + string to the file stream pointed to by + fp. If the length + argument is given, writing will stop after + length bytes have been written or the end + of string is reached, whichever comes + first. +

Note that if the length argument is given, + then the magic_quotes_runtime + configuration option will be ignored and no slashes will be + stripped from string. +

See also fread(), fopen(), + fsockopen(), popen(), and + fputs(). +


PrevHomeNext
ftruncateUpset_file_buffer
\ No newline at end of file diff --git a/function.get-browser.html b/function.get-browser.html new file mode 100644 index 0000000..2d47267 --- /dev/null +++ b/function.get-browser.html @@ -0,0 +1,321 @@ +get_browser
PHP Manual
PrevNext

get_browser

(PHP3 , PHP4 )

get_browser --  + Tells what the user's browser is capable of +

Description

object get_browser ([string + user_agent])

get_browser() attempts to determine the + capabilities of the user's browser. This is done by looking up + the browser's information in the + browscap.ini file. By default, the value of + $HTTP_USER_AGENT is used; however, you can alter this (i.e., look + up another browser's info) by passing the optional + user_agent parameter to + get_browser(). +

The information is returned in an object, which will contain + various data elements representing, for instance, the browser's + major and minor version numbers and ID string; true/false values + for features such as frames, JavaScript, and cookies; and so + forth. +

While browscap.ini contains information on + many browsers, it relies on user updates to keep the database + current. The format of the file is fairly self-explanatory. +

The following example shows how one might list all available + information retrieved about the user's browser. +

Example 1. Get_browser() example


<?php
+function list_array ($array) {
+    while (list ($key, $value) = each ($array)) {
+    $str .= "<b>$key:</b> $value<br>\n";
+    }
+    return $str;
+}
+echo "$HTTP_USER_AGENT<hr>\n";
+$browser = get_browser();
+echo list_array ((array) $browser);
+?>
+      
+

The output of the above script would look something like this: +


Mozilla/4.5 [en] (X11; U; Linux 2.2.9 i586)<hr>
+<b>browser_name_pattern:</b> Mozilla/4\.5.*<br>
+<b>parent:</b> Netscape 4.0<br>
+<b>platform:</b> Unknown<br>
+<b>majorver:</b> 4<br>
+<b>minorver:</b> 5<br>
+<b>browser:</b> Netscape<br>
+<b>version:</b> 4<br>
+<b>frames:</b> 1<br>
+<b>tables:</b> 1<br>
+<b>cookies:</b> 1<br>
+<b>backgroundsounds:</b> <br>
+<b>vbscript:</b> <br>
+<b>javascript:</b> 1<br>
+<b>javaapplets:</b> 1<br>
+<b>activexcontrols:</b> <br>
+<b>beta:</b> <br>
+<b>crawler:</b> <br>
+<b>authenticodeupdate:</b> <br>
+<b>msn:</b> <br>
+    

In order for this to work, your browscap configuration file + setting must point to the correct location of the + browscap.ini file. +

For more information (including locations from which you may + obtain a browscap.ini file), check the PHP + FAQ at http://www.php.net/FAQ.php. +


PrevHomeNext
exitUphighlight_file
\ No newline at end of file diff --git a/function.get-cfg-var.html b/function.get-cfg-var.html new file mode 100644 index 0000000..c507e60 --- /dev/null +++ b/function.get-cfg-var.html @@ -0,0 +1,195 @@ +get_cfg_var
PHP Manual
PrevNext

get_cfg_var

(PHP3 , PHP4 )

get_cfg_var --  + Get the value of a PHP configuration option. +

Description

string get_cfg_var (string varname)

Returns the current value of the PHP configuration variable + specified by varname, or false if an error + occurs. +

It will not return configuration information set when the PHP was + compiled, or read from an Apache configuration file (using the + php3_configuration_option directives). +

To check whether the system is using a configuration file, try + retrieving the value of the cfg_file_path configuration + setting. If this is available, a configuration file is being + used. +


PrevHomeNext
getenvUpget_current_user
\ No newline at end of file diff --git a/function.get-class-methods.html b/function.get-class-methods.html new file mode 100644 index 0000000..93507f8 --- /dev/null +++ b/function.get-class-methods.html @@ -0,0 +1,194 @@ +get_class_methods
PHP Manual
PrevNext

get_class_methods

(PHP4 >= 4.0RC1)

get_class_methods -- Returns an array of class methods' names

Description

array get_class_methods (string class_name)

This function returns an array of method names defined for the + class specified by class_name. +

See also get_class_vars(), + get_object_vars() +


PrevHomeNext
get_classUpget_class_vars
\ No newline at end of file diff --git a/function.get-class-vars.html b/function.get-class-vars.html new file mode 100644 index 0000000..069d66f --- /dev/null +++ b/function.get-class-vars.html @@ -0,0 +1,191 @@ +get_class_vars
PHP Manual
PrevNext

get_class_vars

(PHP4 >= 4.0RC1)

get_class_vars --  + Returns an array of default properties of the class +

Description

array get_class_vars (string class_name)

This function will return an array of default properties of the + class. +

See also get_class_methods(), + get_object_vars() +


PrevHomeNext
get_class_methodsUpget_declared_classes
\ No newline at end of file diff --git a/function.get-class.html b/function.get-class.html new file mode 100644 index 0000000..b231953 --- /dev/null +++ b/function.get-class.html @@ -0,0 +1,194 @@ +get_class
PHP Manual
PrevNext

get_class

(PHP4 >= 4.0b2)

get_class -- Returns the name of the class of an object

Description

string get_class (object obj)

This function returns the name of the class of which the + object obj is an instance. +

See also get_parent_class(), + is_subclass_of() +


PrevHomeNext
class_existsUpget_class_methods
\ No newline at end of file diff --git a/function.get-current-user.html b/function.get-current-user.html new file mode 100644 index 0000000..cede089 --- /dev/null +++ b/function.get-current-user.html @@ -0,0 +1,203 @@ +get_current_user
PHP Manual
PrevNext

get_current_user

(PHP3 , PHP4 )

get_current_user --  + Get the name of the owner of the current PHP script. +

Description

string get_current_user (void)

Returns the name of the owner of the current PHP script. +

See also getmyuid(), + getmypid(), getmyinode(), + and getlastmod(). +


PrevHomeNext
get_cfg_varUpget_magic_quotes_gpc
\ No newline at end of file diff --git a/function.get-declared-classes.html b/function.get-declared-classes.html new file mode 100644 index 0000000..218c5ac --- /dev/null +++ b/function.get-declared-classes.html @@ -0,0 +1,209 @@ +get_declared_classes
PHP Manual
PrevNext

get_declared_classes

(PHP4 >= 4.0RC2)

get_declared_classes -- Returns an array with the name of the defined classes

Description

array get_declared_classes (void)

This function returns an array of the names of the declared classes + in the current script. +

Note: + In PHP 4.0.1pl2, three extra classes are returned at the beginning of + the array: stdClass (defined in + Zend/zend.c), + OverloadedTestClass (defined in + ext/standard/basic_functions.c) + and Directory + (defined in ext/standard/dir.c). +


PrevHomeNext
get_class_varsUpget_object_vars
\ No newline at end of file diff --git a/function.get-extension-funcs.html b/function.get-extension-funcs.html new file mode 100644 index 0000000..b31b6c9 --- /dev/null +++ b/function.get-extension-funcs.html @@ -0,0 +1,225 @@ +get_extension_funcs
PHP Manual
PrevNext

get_extension_funcs

(PHP4 >= 4.0b4)

get_extension_funcs --  + Returns an array with the names of the functions of a module +

Description

array get_extension_funcs (string module_name)

This function returns the names of all the functions defined in + the module indicated by module_name. +

For example the lines below +


print_r (get_extension_funcs ("xml"));
+print_r (get_extension_funcs ("gd"));
+       

+ will print a list of the functions in the modules + xml and gd respectively. +

See also: get_loaded_extensions() +


PrevHomeNext
get_loaded_extensionsUpget_required_files
\ No newline at end of file diff --git a/function.get-html-translation-table.html b/function.get-html-translation-table.html new file mode 100644 index 0000000..319694b --- /dev/null +++ b/function.get-html-translation-table.html @@ -0,0 +1,384 @@ +get_html_translation_table
PHP Manual
PrevNext

get_html_translation_table

(PHP4 >= 4.0b4)

get_html_translation_table --  + Returns the translation table used by + htmlspecialchars() and + htmlentities() +

Description

string + get_html_translation_table + (int table [, int quote_style])

get_html_translation_table() will return the + translation table that is used internally for + htmlspecialchars() and + htmlentities(). There are two new defines + (HTML_ENTITIES, + HTML_SPECIALCHARS) that allow you to + specify the table you want. And as in the + htmlspecialchars() and + htmlentities() functions you can optionally specify the + quote_style you are working with. The default is ENT_COMPAT mode. See + the description of these modes in htmlspecialchars(). +

Example 1. Translation Table Example


$trans = get_html_translation_table (HTML_ENTITIES);
+$str = "Hallo & <Frau> & Krämer";
+$encoded = strtr ($str, $trans);
+      
+ The $encoded variable will now contain: "Hallo + &amp; + &lt;Frau&gt; + &amp; Kr&auml;mer". +

The cool thing is using array_flip() to change + the direction of the translation. +


$trans = array_flip ($trans);
+$original = strtr ($str, $trans);
+      

+ The content of $original would be: "Hallo & + <Frau> & Krämer". +

Note: + This function was added in PHP 4.0. +

+

See also: htmlspecialchars(), + htmlentities(), strtr(), + and array_flip(). +


PrevHomeNext
explodeUpget_meta_tags
\ No newline at end of file diff --git a/function.get-included-files.html b/function.get-included-files.html new file mode 100644 index 0000000..c8b365c --- /dev/null +++ b/function.get-included-files.html @@ -0,0 +1,234 @@ +get_included_files
PHP Manual
PrevNext

get_included_files

(PHP4 >= 4.0RC1)

get_included_files --  + Returns an array with the names of the files include_once()'d in + a script +

Description

array get_included_files (void)

This function returns an associtative array of the names of all + the files that have been loaded into a script using + include_once(). The indexes of the array are + the file names as used in the include_once() + without the ".php" extension. +

Note: + As of PHP 4.0.1pl2 this function assumes that the + include_once files end in the extension + ".php", other extensions do not work. +

+

See also: require_once(), + include_once(), + get_required_files() +


PrevHomeNext
get_required_filesUpPOSIX functions
\ No newline at end of file diff --git a/function.get-loaded-extensions.html b/function.get-loaded-extensions.html new file mode 100644 index 0000000..ba34761 --- /dev/null +++ b/function.get-loaded-extensions.html @@ -0,0 +1,251 @@ +get_loaded_extensions
PHP Manual
PrevNext

get_loaded_extensions

(PHP4 >= 4.0b4)

get_loaded_extensions --  + Returns an array with the names of all modules compiled and + loaded +

Description

array get_loaded_extensions (void)

This function returns the names of all the modules compiled and + loaded in the PHP interpreter. +

For example the line below +


print_r (get_loaded_extensions());
+      

+ will print a list like: +


Array
+(
+    [0] => xml
+    [1] => wddx
+    [2] => standard
+    [3] => session
+    [4] => posix
+    [5] => pgsql
+    [6] => pcre
+    [7] => gd
+    [8] => ftp
+    [9] => db
+    [10] => Calendar
+    [11] => bcmath
+)
+      

+

See also: get_extension_funcs(). +


PrevHomeNext
zend_logo_guidUpget_extension_funcs
\ No newline at end of file diff --git a/function.get-magic-quotes-gpc.html b/function.get-magic-quotes-gpc.html new file mode 100644 index 0000000..1ee97a9 --- /dev/null +++ b/function.get-magic-quotes-gpc.html @@ -0,0 +1,195 @@ +get_magic_quotes_gpc
PHP Manual
PrevNext

get_magic_quotes_gpc

(PHP3 >= 3.0.6, PHP4 )

get_magic_quotes_gpc --  + Get the current active configuration setting of magic quotes gpc. +

Description

long get_magic_quotes_gpc (void)

Returns the current active configuration setting of + magic_quotes_gpc. + (0 for off, 1 for on). +

See also get_magic_quotes_runtime(), + set_magic_quotes_runtime(). +


PrevHomeNext
get_current_userUpget_magic_quotes_runtime
\ No newline at end of file diff --git a/function.get-magic-quotes-runtime.html b/function.get-magic-quotes-runtime.html new file mode 100644 index 0000000..7c34cd9 --- /dev/null +++ b/function.get-magic-quotes-runtime.html @@ -0,0 +1,198 @@ +get_magic_quotes_runtime
PHP Manual
PrevNext

get_magic_quotes_runtime

(PHP3 >= 3.0.6, PHP4 )

get_magic_quotes_runtime --  + Get the current active configuration setting of + magic_quotes_runtime. +

Description

long + get_magic_quotes_runtime + (void)

Returns the current active configuration setting of + magic_quotes_runtime. + (0 for off, 1 for on). +

See also get_magic_quotes_gpc(), + set_magic_quotes_runtime(). +


PrevHomeNext
get_magic_quotes_gpcUpgetlastmod
\ No newline at end of file diff --git a/function.get-meta-tags.html b/function.get-meta-tags.html new file mode 100644 index 0000000..4c38b27 --- /dev/null +++ b/function.get-meta-tags.html @@ -0,0 +1,239 @@ +get_meta_tags
PHP Manual
PrevNext

get_meta_tags

(PHP3 >= 3.0.4, PHP4 )

get_meta_tags --  + Extracts all meta tag content attributes from a file and returns + an array +

Description

array get_meta_tags (string filename [, int + use_include_path])

Opens filename and parses it line by line + for <meta> tags of the form +

Example 1. Meta Tags Example


<meta name="author" content="name">
+<meta name="tags" content="php3 documentation">
+</head> <!-- parsing stops here -->
+      
+ (pay attention to line endings - PHP uses a native function to + parse the input, so a Mac file won't work on Unix). +

+ The value of the name property becomes the key, the value of the + content property becomes the value of the returned array, so you + can easily use standard array functions to traverse it or access + single values. Special characters in the value of the name + property are substituted with '_', the rest is converted to lower + case. +

Setting use_include_path to 1 will result + in PHP trying to open the file along the standard include path. +


PrevHomeNext
get_html_translation_tableUphebrev
\ No newline at end of file diff --git a/function.get-object-vars.html b/function.get-object-vars.html new file mode 100644 index 0000000..4b08f5f --- /dev/null +++ b/function.get-object-vars.html @@ -0,0 +1,279 @@ +get_object_vars
PHP Manual
PrevNext

get_object_vars

(PHP4 >= 4.0RC1)

get_object_vars -- Returns an associative array of object properties

Description

array get_object_vars (object obj)

This function returns an associative array of defined object properties + for the specified object obj. If variables + declared in the class of which the obj is an + instance, have not been assigned a value, those will not be returned + in the array. +

Example 1. Use of get_object_vars()


<?php
+class Point2D {
+    var $x, $y;
+    var $label;
+
+    function Point2D($x, $y) {
+        $this->x = $x;
+        $this->y = $y;
+    }
+
+    function setLabel($label) {
+        $this->label = $label;
+    }
+
+    function getPoint() {
+        return array("x" => $this->x,
+                     "y" => $this->y,
+                     "label" => $this->label);
+    }
+}
+
+$p1 = new Point2D(1.233, 3.445);
+print_r(get_object_vars($p1));
+// "$label" is declared but not defined
+// Array
+// (
+//     [x] => 1.233
+//     [y] => 3.445
+// )
+
+$p1->setLabel("point #1");
+print_r(get_object_vars($p1));
+// Array
+// (
+//     [x] => 1.233
+//     [y] => 3.445
+//     [label] => point #1
+// )
+
+?>
+      
+

See also get_class_methods(), + get_class_vars() +


PrevHomeNext
get_declared_classesUpget_parent_class
\ No newline at end of file diff --git a/function.get-parent-class.html b/function.get-parent-class.html new file mode 100644 index 0000000..7f56fff --- /dev/null +++ b/function.get-parent-class.html @@ -0,0 +1,195 @@ +get_parent_class
PHP Manual
PrevNext

get_parent_class

(PHP4 >= 4.0b2)

get_parent_class -- Returns the name of the parent class of an object

Description

string get_parent_class (object obj)

This function returns the name of the parent class to + the class of which the object obj + is an instance. +

See also get_class(), + is_subclass_of() +


PrevHomeNext
get_object_varsUpis_subclass_of
\ No newline at end of file diff --git a/function.get-required-files.html b/function.get-required-files.html new file mode 100644 index 0000000..4458904 --- /dev/null +++ b/function.get-required-files.html @@ -0,0 +1,324 @@ +get_required_files
PHP Manual
PrevNext

get_required_files

(PHP4 >= 4.0RC2)

get_required_files --  + Returns an array with the names of the files require_once()'d in + a script +

Description

array get_required_files (void)

This function returns an associtative array of the names of all + the files that have been loaded into a script using + require_once(). The indexes of the array are + the file names as used in the require_once() + without the ".php" extension. +

The example below +

Example 1. Printing the required and included files


<?php
+
+require_once ("local.php");
+require_once ("../inc/global.php");
+
+for ($i=1; $i<5; $i++)
+    include "util".$i."php";
+
+echo "Required_once files\n";
+print_r (get_required_files());
+
+echo "Included_once files\n";
+print_r (get_included_files());
+?>
+      
+ will generate the following output: +


Required_once files
+Array
+(
+    [local] => local.php 
+    [../inc/global] => /full/path/to/inc/global.php
+)
+
+Included_once files
+Array
+(
+    [util1] => util1.php 
+    [util2] => util2.php 
+    [util3] => util3.php 
+    [util4] => util4.php 
+)
+      

+

Note: + As of PHP 4.0.1pl2 this function assumes that the + required_once files end in the extension + ".php", other extensions do not work. +

+

See also: require_once(), + include_once(), + get_included_files() +


PrevHomeNext
get_extension_funcsUpget_included_files
\ No newline at end of file diff --git a/function.getallheaders.html b/function.getallheaders.html new file mode 100644 index 0000000..d9dfcc8 --- /dev/null +++ b/function.getallheaders.html @@ -0,0 +1,265 @@ +getallheaders
PHP Manual
PrevNext

getallheaders

(PHP3 , PHP4 )

getallheaders -- Fetch all HTTP request headers

Description

array getallheaders (void)

This function returns an associative array of all the HTTP + headers in the current request. +

Note: + You can also get at the value of the common CGI variables by + reading them from the environment, which works whether or not + you are using PHP as an Apache module. Use + phpinfo() to see a list of all of the + environment variables defined this way. +

+

Example 1. getallheaders() Example


$headers = getallheaders();
+while (list ($header, $value) = each ($headers)) {
+    echo "$header: $value<br>\n";
+}
+      
+

This example will display all the request headers for the current + request. +

Note: + Getallheaders() is currently only supported + when PHP runs as an Apache module. +

+


PrevHomeNext
apache_noteUpvirtual
\ No newline at end of file diff --git a/function.getcwd.html b/function.getcwd.html new file mode 100644 index 0000000..4e7071d --- /dev/null +++ b/function.getcwd.html @@ -0,0 +1,172 @@ +getcwd
PHP Manual
PrevNext

getcwd

(PHP4 >= 4.0b4)

getcwd -- gets the current working directory

Description

string getcwd(void);

Returns the current working directory. +


PrevHomeNext
closedirUpopendir
\ No newline at end of file diff --git a/function.getdate.html b/function.getdate.html new file mode 100644 index 0000000..15222a3 --- /dev/null +++ b/function.getdate.html @@ -0,0 +1,234 @@ +getdate
PHP Manual
PrevNext

getdate

(PHP3 , PHP4 )

getdate -- Get date/time information

Description

array getdate (int timestamp)

Returns an associative array containing the date information of + the timestamp as the following array + elements: +

  • "seconds" - seconds +

  • "minutes" - minutes +

  • "hours" - hours +

  • "mday" - day of the month +

  • "wday" - day of the week, numeric +

  • "mon" - month, numeric +

  • "year" - year, numeric +

  • "yday" - day of the year, numeric; i.e. "299" +

  • "weekday" - day of the week, textual, full; i.e. "Friday" +

  • "month" - month, textual, full; i.e. "January" +

+


PrevHomeNext
dateUpgettimeofday
\ No newline at end of file diff --git a/function.getenv.html b/function.getenv.html new file mode 100644 index 0000000..d794c1d --- /dev/null +++ b/function.getenv.html @@ -0,0 +1,237 @@ +getenv
PHP Manual
PrevNext

getenv

(PHP3 , PHP4 )

getenv -- Get the value of an environment variable

Description

string getenv (string varname)

Returns the value of the environment variable + varname, or false on an error. + +


$ip = getenv ("REMOTE_ADDR"); // get the ip number of the user 
+      

+

You can see a list of all the environmental variables by using + phpinfo(). You can find out what many of them + mean by taking a look at the CGI + specification, specifically the page on + environmental variables. +

Note: + This function does not work in ISAPI mode. +

+


PrevHomeNext
dlUpget_cfg_var
\ No newline at end of file diff --git a/function.gethostbyaddr.html b/function.gethostbyaddr.html new file mode 100644 index 0000000..992cc10 --- /dev/null +++ b/function.gethostbyaddr.html @@ -0,0 +1,195 @@ +gethostbyaddr
PHP Manual
PrevNext

gethostbyaddr

(PHP3 , PHP4 )

gethostbyaddr --  + Get the Internet host name corresponding to a given IP address +

Description

string gethostbyaddr (string ip_address)

Returns the host name of the Internet host specified by + ip_address. If an error occurs, returns + ip_address. +

See also gethostbyname(). +


PrevHomeNext
fsockopenUpgethostbyname
\ No newline at end of file diff --git a/function.gethostbyname.html b/function.gethostbyname.html new file mode 100644 index 0000000..12f3cdf --- /dev/null +++ b/function.gethostbyname.html @@ -0,0 +1,189 @@ +gethostbyname
PHP Manual
PrevNext

gethostbyname

(PHP3 , PHP4 )

gethostbyname --  + Get the IP address corresponding to a given Internet host name +

Description

string gethostbyname (string hostname)

Returns the IP address of the Internet host specified by + hostname. +

See also gethostbyaddr(). +


PrevHomeNext
gethostbyaddrUpgethostbynamel
\ No newline at end of file diff --git a/function.gethostbynamel.html b/function.gethostbynamel.html new file mode 100644 index 0000000..e7eabfd --- /dev/null +++ b/function.gethostbynamel.html @@ -0,0 +1,214 @@ +gethostbynamel
PHP Manual
PrevNext

gethostbynamel

(PHP3 , PHP4 )

gethostbynamel --  + Get a list of IP addresses corresponding to a given Internet host + name +

Description

array gethostbynamel (string hostname)

Returns a list of IP addresses to which the Internet host + specified by hostname resolves. +

See also gethostbyname(), + gethostbyaddr(), + checkdnsrr(), getmxrr(), + and the named(8) manual page. +


PrevHomeNext
gethostbynameUpgetmxrr
\ No newline at end of file diff --git a/function.getimagesize.html b/function.getimagesize.html new file mode 100644 index 0000000..3342892 --- /dev/null +++ b/function.getimagesize.html @@ -0,0 +1,330 @@ +GetImageSize
PHP Manual
PrevNext

GetImageSize

(PHP3 , PHP4 )

GetImageSize -- Get the size of a GIF, JPEG, PNG or SWF image

Description

array getimagesize (string filename [, array + imageinfo])

The GetImageSize() function will determine the + size of any GIF, JPG, + PNG or SWF image file and + return the dimensions along with the file type and a height/width + text string to be used inside a normal HTML + IMG tag. +

Returns an array with 4 elements. Index 0 contains the width of + the image in pixels. Index 1 contains the height. Index 2 a + flag indicating the type of the image. 1 = GIF, 2 = JPG, 3 = + PNG, 4 = SWF. Index 3 is a text string with the correct + "height=xxx width=xxx" string that can be used directly in an IMG + tag. +

Example 1. GetImageSize


<?php $size = GetImageSize ("img/flag.jpg"); ?>
+<IMG SRC="img/flag.jpg" <?php echo $size[3]; ?>
+      
+

The optional imageinfo parameter allows + you to extract some extended information from the image + file. Currently this will return the diffrent + JPG APP markers in an associative Array. Some + Programs use these APP markers to embedd text information in + images. A very common one in to embed IPTC + http://www.xe.net/iptc/ information in the + APP13 marker. You can use the iptcparse() + function to parse the binary APP13 marker into something + readable. +

Example 2. GetImageSize returning IPTC


<?php 
+    $size = GetImageSize ("testimg.jpg",&$info);
+    if (isset ($info["APP13"])) {
+        $iptc = iptcparse ($info["APP13"]);
+        var_dump ($iptc);
+    }
+?>
+      
+

Note: + This function does not require the GD image library. +

+


PrevHomeNext
Image functionsUpImageArc
\ No newline at end of file diff --git a/function.getlastmod.html b/function.getlastmod.html new file mode 100644 index 0000000..afb875b --- /dev/null +++ b/function.getlastmod.html @@ -0,0 +1,253 @@ +getlastmod
PHP Manual
PrevNext

getlastmod

(PHP3 , PHP4 )

getlastmod -- Get time of last page modification.

Description

int getlastmod (void)

Returns the time of the last modification of the current + page. The value returned is a Unix timestamp, suitable for + feeding to date(). Returns false on error. +

Example 1. getlastmod() example


// outputs e.g. 'Last modified: March 04 1998 20:43:59.'
+echo "Last modified: ".date ("F d Y H:i:s.", getlastmod());
+      
+

See alse date(), + getmyuid(), + get_current_user(), + getmyinode(), and + getmypid(). +


PrevHomeNext
get_magic_quotes_runtimeUpgetmyinode
\ No newline at end of file diff --git a/function.getmxrr.html b/function.getmxrr.html new file mode 100644 index 0000000..8d84a3e --- /dev/null +++ b/function.getmxrr.html @@ -0,0 +1,233 @@ +getmxrr
PHP Manual
PrevNext

getmxrr

(PHP3 , PHP4 )

getmxrr --  + Get MX records corresponding to a given Internet host name +

Description

int getmxrr (string hostname, array mxhosts [, array + weight])

Searches DNS for MX records corresponding to + hostname. Returns true if any records are + found; returns false if no records were found or if an error + occurred. +

A list of the MX records found is placed into the array + mxhosts. If the + weight array is given, it will be filled + with the weight information gathered. +

See also checkdnsrr(), + gethostbyname(), + gethostbynamel(), + gethostbyaddr(), and the + named(8) manual page. +


PrevHomeNext
gethostbynamelUpgetprotobyname
\ No newline at end of file diff --git a/function.getmyinode.html b/function.getmyinode.html new file mode 100644 index 0000000..85cc7b6 --- /dev/null +++ b/function.getmyinode.html @@ -0,0 +1,214 @@ +getmyinode
PHP Manual
PrevNext

getmyinode

(PHP3 , PHP4 )

getmyinode -- Get the inode of the current script.

Description

int getmyinode (void)

Returns the current script's inode, or false on error. +

See also getmyuid(), + get_current_user(), + getmypid(), and + getlastmod(). +

Note: + This function is not supported on Windows systems. +


PrevHomeNext
getlastmodUpgetmypid
\ No newline at end of file diff --git a/function.getmypid.html b/function.getmypid.html new file mode 100644 index 0000000..168f7be --- /dev/null +++ b/function.getmypid.html @@ -0,0 +1,206 @@ +getmypid
PHP Manual
PrevNext

getmypid

(PHP3 , PHP4 )

getmypid -- Get PHP's process ID.

Description

int getmypid (void)

Returns the current PHP process ID, or false on error. +

Note that when running as a server module, separate invocations + of the script are not guaranteed to have distinct pids. +

See also getmyuid(), + get_current_user(), + getmyinode(), and + getlastmod(). +


PrevHomeNext
getmyinodeUpgetmyuid
\ No newline at end of file diff --git a/function.getmyuid.html b/function.getmyuid.html new file mode 100644 index 0000000..8c0a43c --- /dev/null +++ b/function.getmyuid.html @@ -0,0 +1,202 @@ +getmyuid
PHP Manual
PrevNext

getmyuid

(PHP3 , PHP4 )

getmyuid -- Get PHP script owner's UID.

Description

int getmyuid (void)

Returns the user ID of the current script, or false on error. +

See also getmypid(), + get_current_user(), + getmyinode(), and + getlastmod(). +


PrevHomeNext
getmypidUpgetrusage
\ No newline at end of file diff --git a/function.getprotobyname.html b/function.getprotobyname.html new file mode 100644 index 0000000..0172458 --- /dev/null +++ b/function.getprotobyname.html @@ -0,0 +1,193 @@ +getprotobyname
PHP Manual
PrevNext

getprotobyname

(PHP4 >= 4.0b4)

getprotobyname --  + Get protocol number associated with protocol name +

Description

int getprotobyname (string name)

Getprotobyname() returns the protocol number + associated with the protocol name as per + /etc/protocols. +

See also: getprotobynumber(). +


PrevHomeNext
getmxrrUpgetprotobynumber
\ No newline at end of file diff --git a/function.getprotobynumber.html b/function.getprotobynumber.html new file mode 100644 index 0000000..01a3562 --- /dev/null +++ b/function.getprotobynumber.html @@ -0,0 +1,193 @@ +getprotobynumber
PHP Manual
PrevNext

getprotobynumber

(PHP4 >= 4.0b4)

getprotobynumber --  + Get protocol name associated with protocol number +

Description

string getprotobynumber (int number)

Getprotobynumber() returns the protocol name + associated with protocol number as per + /etc/protocols. +

See also: getprotobyname(). +


PrevHomeNext
getprotobynameUpgetservbyname
\ No newline at end of file diff --git a/function.getrandmax.html b/function.getrandmax.html new file mode 100644 index 0000000..2984b98 --- /dev/null +++ b/function.getrandmax.html @@ -0,0 +1,214 @@ +getrandmax
PHP Manual
PrevNext

getrandmax

(PHP3 , PHP4 )

getrandmax -- Show largest possible random value

Description

int getrandmax (void)

Returns the maximum value that can be returned by a call to + rand(). +

See also rand(), srand(), + mt_rand(), mt_srand(), and + mt_getrandmax(). +


PrevHomeNext
floorUphexdec
\ No newline at end of file diff --git a/function.getrusage.html b/function.getrusage.html new file mode 100644 index 0000000..af6f90d --- /dev/null +++ b/function.getrusage.html @@ -0,0 +1,218 @@ +getrusage
PHP Manual
PrevNext

getrusage

(PHP3 >= 3.0.7, PHP4 >= 4.0b2)

getrusage -- Get the current resource usages.

Description

array getrusage ([int + who])

This is an interface to getrusage(2). It returns an associative + array containing the data returned from the system call. If who + is 1, getrusage will be called with RUSAGE_CHILDREN. +

All entries are accessible by using their documented field names. +

Example 1. Getrusage Example


$dat = getrusage();
+echo $dat["ru_nswap"];         # number of swaps
+echo $dat["ru_majflt"];        # number of page faults
+echo $dat["ru_utime.tv_sec"];  # user time used (seconds)
+echo $dat["ru_utime.tv_usec"]; # user time used (microseconds)
+      
+ See your system's man page for more details. +


PrevHomeNext
getmyuidUpini_alter
\ No newline at end of file diff --git a/function.getservbyname.html b/function.getservbyname.html new file mode 100644 index 0000000..884efbc --- /dev/null +++ b/function.getservbyname.html @@ -0,0 +1,215 @@ +getservbyname
PHP Manual
PrevNext

getservbyname

(PHP4 >= 4.0b4)

getservbyname --  + Get port number associated with an Internet service and protocol +

Description

int getservbyname (string service, string protocol)

Getservbyname() returns the Internet port + which corresponds to service for the + specified protocol as per + /etc/services. + protocol is either TCP + or UDP. +

See also: getservbyport(). +


PrevHomeNext
getprotobynumberUpgetservbyport
\ No newline at end of file diff --git a/function.getservbyport.html b/function.getservbyport.html new file mode 100644 index 0000000..5fe68c2 --- /dev/null +++ b/function.getservbyport.html @@ -0,0 +1,211 @@ +getservbyport
PHP Manual
PrevNext

getservbyport

(PHP4 >= 4.0b4)

getservbyport --  + Get Internet service which corresponds to port and protocol +

Description

string getservbyport (int port, string protocol)

Getservbyport() returns the Internet service + associated with port for the specified + protocol as per /etc/services. + protocol is either TCP + or UDP. +

See also: getservbyname(). +


PrevHomeNext
getservbynameUpip2long
\ No newline at end of file diff --git a/function.gettext.html b/function.gettext.html new file mode 100644 index 0000000..e69ccd2 --- /dev/null +++ b/function.gettext.html @@ -0,0 +1,223 @@ +gettext
PHP Manual
PrevNext

gettext

(PHP3 >= 3.0.7, PHP4 )

gettext -- Lookup a message in the current domain

Description

string gettext (string message)

This function returns a translated string if one is found in the + translation table, or the submitted message if not found. You may + use an underscore character as an alias to this function. +

Example 1. Gettext()-check


<?php
+// Set language to German
+putenv ("LANG=de");
+
+// Specify location of translation tables
+bindtextdomain ("myPHPApp", "./locale");
+
+// Choose domain
+textdomain ("myPHPApp");
+
+// Print a test message
+print (gettext ("Welcome to My PHP Application"));
+?>
+     

PrevHomeNext
dgettextUptextdomain
\ No newline at end of file diff --git a/function.gettimeofday.html b/function.gettimeofday.html new file mode 100644 index 0000000..e69c43d --- /dev/null +++ b/function.gettimeofday.html @@ -0,0 +1,199 @@ +gettimeofday
PHP Manual
PrevNext

gettimeofday

(PHP3 >= 3.0.7, PHP4 >= 4.0b4)

gettimeofday -- Get current time

Description

array gettimeofday (void)

This is an interface to gettimeofday(2). It returns an + associative array containing the data returned from the system + call. +

  • "sec" - seconds +

  • "usec" - microseconds +

  • "minuteswest" - minutes west of Greenwich +

  • "dsttime" - type of dst correction +

+


PrevHomeNext
getdateUpgmdate
\ No newline at end of file diff --git a/function.gettype.html b/function.gettype.html new file mode 100644 index 0000000..846db0d --- /dev/null +++ b/function.gettype.html @@ -0,0 +1,231 @@ +gettype
PHP Manual
PrevNext

gettype

(PHP3 , PHP4 )

gettype -- Get the type of a variable

Description

string gettype (mixed var)

Returns the type of the PHP variable + var. +

Possibles values for the returned string are: +

  • "boolean"

  • "integer"

  • "double"

  • "string"

  • "array"

  • "object"

  • "resource"

  • "user function"

  • "unknown type"

+

See also settype(). +


PrevHomeNext
emptyUpintval
\ No newline at end of file diff --git a/function.gmdate.html b/function.gmdate.html new file mode 100644 index 0000000..b2b8b9b --- /dev/null +++ b/function.gmdate.html @@ -0,0 +1,242 @@ +gmdate
PHP Manual
PrevNext

gmdate

(PHP3 , PHP4 )

gmdate -- Format a GMT/CUT date/time

Description

string gmdate (string format, int timestamp)

Identical to the date() function except that + the time returned is Greenwich Mean Time (GMT). For example, when + run in Finland (GMT +0200), the first line below prints "Jan 01 + 1998 00:00:00", while the second prints "Dec 31 1997 22:00:00". +

Example 1. Gmdate() example


echo date ("M d Y H:i:s", mktime (0,0,0,1,1,1998));
+echo gmdate ("M d Y H:i:s", mktime (0,0,0,1,1,1998));
+      
+

See also date(), mktime(), + and gmmktime(). +


PrevHomeNext
gettimeofdayUpgmmktime
\ No newline at end of file diff --git a/function.gmmktime.html b/function.gmmktime.html new file mode 100644 index 0000000..f84eeb6 --- /dev/null +++ b/function.gmmktime.html @@ -0,0 +1,180 @@ +gmmktime
PHP Manual
PrevNext

gmmktime

(PHP3 , PHP4 )

gmmktime -- Get UNIX timestamp for a GMT date

Description

int gmmktime (int hour, int minute, int second, int month, int day, int year [, int + is_dst])

Identical to mktime() except the passed + parameters represents a GMT date. +


PrevHomeNext
gmdateUpgmstrftime
\ No newline at end of file diff --git a/function.gmstrftime.html b/function.gmstrftime.html new file mode 100644 index 0000000..141166d --- /dev/null +++ b/function.gmstrftime.html @@ -0,0 +1,233 @@ +gmstrftime
PHP Manual
PrevNext

gmstrftime

(PHP3 >= 3.0.12, PHP4 >= 4.0RC2)

gmstrftime --  + Format a GMT/CUT time/date according to locale settings +

Description

string gmstrftime (string format, int timestamp)

Behaves the same as strftime() except that the + time returned is Greenwich Mean Time (GMT). For example, when run + in Eastern Standard Time (GMT -0500), the first line below prints + "Dec 31 1998 20:00:00", while the second prints "Jan 01 1999 + 01:00:00". +

Example 1. Gmstrftime() example


setlocale ('LC_TIME', 'en_US');
+echo strftime ("%b %d %Y %H:%M:%S", mktime (20,0,0,12,31,98))."\n";
+echo gmstrftime ("%b %d %Y %H:%M:%S", mktime (20,0,0,12,31,98))."\n";
+      
+

See also strftime(). +


PrevHomeNext
gmmktimeUplocaltime
\ No newline at end of file diff --git a/function.gregoriantojd.html b/function.gregoriantojd.html new file mode 100644 index 0000000..15bca4f --- /dev/null +++ b/function.gregoriantojd.html @@ -0,0 +1,222 @@ +GregorianToJD
PHP Manual
PrevNext

GregorianToJD

(PHP3 , PHP4 )

GregorianToJD --  + Converts a Gregorian date to Julian Day Count +

Description

int gregoriantojd (int month, int day, int year)

Valid Range for Gregorian Calendar 4714 B.C. to 9999 A.D.

Although this software can handle dates all the way back to 4714 + B.C., such use may not be meaningful. The Gregorian calendar was + not instituted until October 15, 1582 (or October 5, 1582 in the + Julian calendar). Some countries did not accept it until much + later. For example, Britain converted in 1752, The USSR in 1918 + and Greece in 1923. Most European countries used the Julian + calendar prior to the Gregorian. +

Example 1. Calendar functions


<?php
+$jd = GregorianToJD (10,11,1970);
+echo "$jd\n";
+$gregorian = JDToGregorian ($jd);
+echo "$gregorian\n";
+?>
+      
+


PrevHomeNext
JDToGregorianUpJDToJulian
\ No newline at end of file diff --git a/function.gzclose.html b/function.gzclose.html new file mode 100644 index 0000000..c63939b --- /dev/null +++ b/function.gzclose.html @@ -0,0 +1,185 @@ +gzclose
PHP Manual
PrevNext

gzclose

(PHP3 , PHP4 )

gzclose -- Close an open gz-file pointer

Description

int gzclose (int zp)

The gz-file pointed to by zp is closed. +

Returns true on success and false on failure. +

The gz-file pointer must be valid, and must point to a file + successfully opened by gzopen(). +


PrevHomeNext
Zlib Compression FunctionsUpgzeof
\ No newline at end of file diff --git a/function.gzcompress.html b/function.gzcompress.html new file mode 100644 index 0000000..d99919e --- /dev/null +++ b/function.gzcompress.html @@ -0,0 +1,195 @@ +gzcompress
PHP Manual
PrevNext

gzcompress

(PHP4 >= 4.0.1)

gzcompress -- Gz-compress a string

Description

string gzcompress (string data [, int + level])

This function returns a gzip-compressed version of the input + data or false on errors. The optional + parameter level can be given as 0 for no + compression up to 9 for maximum compression. +

See also gzuncompress(). +


PrevHomeNext
readgzfileUpgzuncompress
\ No newline at end of file diff --git a/function.gzeof.html b/function.gzeof.html new file mode 100644 index 0000000..bfb962f --- /dev/null +++ b/function.gzeof.html @@ -0,0 +1,183 @@ +gzeof
PHP Manual
PrevNext

gzeof

(PHP3 , PHP4 )

gzeof -- Test for end-of-file on a gz-file pointer

Description

int gzeof (int zp)

Returns true if the gz-file pointer is at EOF or an error occurs; + otherwise returns false. +

The gz-file pointer must be valid, and must point to a file + successfully opened by gzopen(). +


PrevHomeNext
gzcloseUpgzfile
\ No newline at end of file diff --git a/function.gzfile.html b/function.gzfile.html new file mode 100644 index 0000000..9ef6ec8 --- /dev/null +++ b/function.gzfile.html @@ -0,0 +1,208 @@ +gzfile
PHP Manual
PrevNext

gzfile

(PHP3 , PHP4 )

gzfile -- Read entire gz-file into an array

Description

array gzfile (string filename [, int + use_include_path])

+ Identical to readgzfile(), except that + gzfile() returns the file in an array. +

You can use the optional second parameter and set it to "1", if + you want to search for the file in the include_path, too. +

+ See also readgzfile(), and + gzopen(). +


PrevHomeNext
gzeofUpgzgetc
\ No newline at end of file diff --git a/function.gzgetc.html b/function.gzgetc.html new file mode 100644 index 0000000..67110fe --- /dev/null +++ b/function.gzgetc.html @@ -0,0 +1,207 @@ +gzgetc
PHP Manual
PrevNext

gzgetc

(PHP3 , PHP4 )

gzgetc -- Get character from gz-file pointer

Description

string gzgetc (int zp)

Returns a string containing a single (uncompressed) character + read from the file pointed to by zp. Returns FALSE on EOF (as + does gzeof()). +

The gz-file pointer must be valid, and must point to a file + successfully opened by gzopen(). +

+ See also gzopen(), and + gzgets(). +


PrevHomeNext
gzfileUpgzgets
\ No newline at end of file diff --git a/function.gzgets.html b/function.gzgets.html new file mode 100644 index 0000000..815d894 --- /dev/null +++ b/function.gzgets.html @@ -0,0 +1,213 @@ +gzgets
PHP Manual
PrevNext

gzgets

(PHP3 , PHP4 )

gzgets -- Get line from file pointer

Description

string gzgets (int zp, int length)

Returns a (uncompressed) string of up to length - 1 bytes read + from the file pointed to by fp. Reading ends when length - 1 + bytes have been read, on a newline, or on EOF (whichever comes + first). +

+ If an error occurs, returns false. +

+ The file pointer must be valid, and must point to a file + successfully opened by gzopen(). +

+ See also gzopen(), + gzgetc(), and fgets(). +


PrevHomeNext
gzgetcUpgzgetss
\ No newline at end of file diff --git a/function.gzgetss.html b/function.gzgetss.html new file mode 100644 index 0000000..82d6d84 --- /dev/null +++ b/function.gzgetss.html @@ -0,0 +1,231 @@ +gzgetss
PHP Manual
PrevNext

gzgetss

(PHP3 , PHP4 )

gzgetss --  + Get line from gz-file pointer and strip HTML tags +

Description

string gzgetss (int zp, int length [, string + allowable_tags])

Identical to gzgets(), except that + gzgetss() attempts to strip any HTML and PHP + tags from the text it reads. +

You can use the optional third parameter to specify tags which + should not be stripped. +

Note: + Allowable_tags was added in PHP 3.0.13, + PHP4B3. +

+

See also gzgets(), + gzopen(), and strip_tags(). +


PrevHomeNext
gzgetsUpgzopen
\ No newline at end of file diff --git a/function.gzopen.html b/function.gzopen.html new file mode 100644 index 0000000..07d61cd --- /dev/null +++ b/function.gzopen.html @@ -0,0 +1,266 @@ +gzopen
PHP Manual
PrevNext

gzopen

(PHP3 , PHP4 )

gzopen -- Open gz-file

Description

int gzopen (string filename, string mode [, int + use_include_path])

Opens a gzip (.gz) file for reading or writing. The mode + parameter is as in fopen() ("rb" or "wb") but + can also include a compression level ("wb9") or a strategy: 'f' + for filtered data as in "wb6f", 'h' for Huffman only compression + as in "wb1h". (See the description of deflateInit2 in zlib.h for + more information about the strategy parameter.) +

Gzopen() can be used to read a file which is + not in gzip format; in this case gzread() will + directly read from the file without decompression. +

Gzopen() returns a file pointer to the file + opened, after that, everything you read from this file descriptor + will be transparently decompressed and what you write gets + compressed. +

If the open fails, the function returns false. +

You can use the optional third parameter and set it to "1", if + you want to search for the file in the include_path, too. +

Example 1. Gzopen() Example


$fp = gzopen ("/tmp/file.gz", "r");
+      
+

See also gzclose(). +


PrevHomeNext
gzgetssUpgzpassthru
\ No newline at end of file diff --git a/function.gzpassthru.html b/function.gzpassthru.html new file mode 100644 index 0000000..40f9b3b --- /dev/null +++ b/function.gzpassthru.html @@ -0,0 +1,200 @@ +gzpassthru
PHP Manual
PrevNext

gzpassthru

(PHP3 , PHP4 )

gzpassthru --  + Output all remaining data on a gz-file pointer +

Description

int gzpassthru (int zp)

Reads to EOF on the given gz-file pointer and writes the + (uncompressed) results to standard output. +

If an error occurs, returns false. +

The file pointer must be valid, and must point to a file + successfully opened by gzopen(). +

The gz-file is closed when gzpassthru() is + done reading it (leaving zp useless). +


PrevHomeNext
gzopenUpgzputs
\ No newline at end of file diff --git a/function.gzputs.html b/function.gzputs.html new file mode 100644 index 0000000..71b58db --- /dev/null +++ b/function.gzputs.html @@ -0,0 +1,183 @@ +gzputs
PHP Manual
PrevNext

gzputs

(PHP3 , PHP4 )

gzputs -- Write to a gz-file pointer

Description

int gzputs (int zp, string str [, int + length])

Gzputs() is an alias to + gzwrite(), and is identical in every way. +


PrevHomeNext
gzpassthruUpgzread
\ No newline at end of file diff --git a/function.gzread.html b/function.gzread.html new file mode 100644 index 0000000..5747984 --- /dev/null +++ b/function.gzread.html @@ -0,0 +1,265 @@ +gzread
PHP Manual
PrevNext

gzread

(PHP3 , PHP4 )

gzread -- Binary-safe gz-file read

Description

string gzread (int zp, int length)

gzread() reads up to + length bytes from the gz-file pointer + referenced by zp. Reading stops when + length (uncompressed) bytes have been read + or EOF is reached, whichever comes first. +


// get contents of a gz-file into a string
+$filename = "/usr/local/something.txt.gz";
+$zd = gzopen ($filename, "r");
+$contents = gzread ($zd, 10000);
+gzclose ($zd);
+      

+

See also gzwrite(), gzopen(), + gzgets(), gzgetss(), + gzfile(), and gzpassthru(). +


PrevHomeNext
gzputsUpgzrewind
\ No newline at end of file diff --git a/function.gzrewind.html b/function.gzrewind.html new file mode 100644 index 0000000..9f00892 --- /dev/null +++ b/function.gzrewind.html @@ -0,0 +1,205 @@ +gzrewind
PHP Manual
PrevNext

gzrewind

(PHP3 , PHP4 )

gzrewind -- Rewind the position of a gz-file pointer

Description

int gzrewind (int zp)

+ Sets the file position indicator for zp to the beginning of the + file stream. +

+ If an error occurs, returns 0. +

+ The file pointer must be valid, and must point to a file + successfully opened by gzopen(). +

See also gzseek() and + gztell(). +


PrevHomeNext
gzreadUpgzseek
\ No newline at end of file diff --git a/function.gzseek.html b/function.gzseek.html new file mode 100644 index 0000000..45df56b --- /dev/null +++ b/function.gzseek.html @@ -0,0 +1,203 @@ +gzseek
PHP Manual
PrevNext

gzseek

(PHP3 , PHP4 )

gzseek -- Seek on a gz-file pointer

Description

int gzseek (int zp, int offset)

Sets the file position indicator for the file referenced by zp to + offset bytes into the file stream. Equivalent to calling (in C) + gzseek( zp, offset, SEEK_SET ). +

If the file is opened for reading, this function is emulated but + can be extremely slow. If the file is opened for writing, only + forward seeks are supported; gzseek then compresses a sequence of + zeroes up to the new starting position. +

Upon success, returns 0; otherwise, returns -1. Note that seeking + past EOF is not considered an error. +

See also gztell() and + gzrewind(). +


PrevHomeNext
gzrewindUpgztell
\ No newline at end of file diff --git a/function.gztell.html b/function.gztell.html new file mode 100644 index 0000000..32326db --- /dev/null +++ b/function.gztell.html @@ -0,0 +1,215 @@ +gztell
PHP Manual
PrevNext

gztell

(PHP3 , PHP4 )

gztell -- Tell gz-file pointer read/write position

Description

int gztell (int zp)

Returns the position of the file pointer referenced by + zp; i.e., its offset into the file + stream. +

If an error occurs, returns false. +

The file pointer must be valid, and must point to a file + successfully opened by gzopen(). +

+ See also gzopen(), gzseek() + and gzrewind(). +


PrevHomeNext
gzseekUpgzwrite
\ No newline at end of file diff --git a/function.gzuncompress.html b/function.gzuncompress.html new file mode 100644 index 0000000..35f7c05 --- /dev/null +++ b/function.gzuncompress.html @@ -0,0 +1,209 @@ +gzuncompress
PHP Manual
PrevNext

gzuncompress

(PHP4 >= 4.0.1)

gzuncompress -- Uncompress a gz-compressed string

Description

string gzuncompress (string data [, int + length])

+ This function takes data compressed by + gzcompress() and returns the orignial + uncompressed data or false on error. The function will return an + error if the uncompressed data is more than 256 times the lenght + of the compressed input data or more than + the optional parameter length. +

See also gzcompress(). +


PrevHomeNext
gzcompressUpAppendixes
\ No newline at end of file diff --git a/function.gzwrite.html b/function.gzwrite.html new file mode 100644 index 0000000..f682765 --- /dev/null +++ b/function.gzwrite.html @@ -0,0 +1,248 @@ +gzwrite
PHP Manual
PrevNext

gzwrite

(PHP3 , PHP4 )

gzwrite -- Binary-safe gz-file write

Description

int gzwrite (int zp, string string [, int + length])

Gzwrite() writes the contents of + string to the gz-file stream pointed to by + zp. If the length + argument is given, writing will stop after + length (uncompressed) bytes have been + written or the end of string is reached, + whichever comes first. +

Note that if the length argument is given, + then the magic_quotes_runtime + configuration option will be ignored and no slashes will be + stripped from string. +

See also gzread(), gzopen(), + and gzputs(). +


PrevHomeNext
gztellUpreadgzfile
\ No newline at end of file diff --git a/function.header.html b/function.header.html new file mode 100644 index 0000000..60468c8 --- /dev/null +++ b/function.header.html @@ -0,0 +1,320 @@ +header
PHP Manual
PrevNext

header

(PHP3 , PHP4 )

header -- Send a raw HTTP header

Description

int header (string string)

The Header() function is used at the top of an + HTML file to send raw HTTP + header strings. See the HTTP 1.1 + Specification for more information on raw http headers. + Note: Remember that the + Header() function must be called before any + actual output is sent either by normal HTML tags or from PHP. It + is a very common error to read code with + include() or with auto_prepend and have spaces + or empty lines in this code that force output before + header() is called. +

There are two special-case header calls. The first is the + "Location" header. Not only does it send this header + back to the browser, it also returns a REDIRECT status code to + Apache. From a script writer's point of view this should not be + important, but for people who understand Apache internals it is + important to understand. +


header ("Location: http://www.php.net"); /* Redirect browser 
+                                            to PHP web site */
+exit;                 /* Make sure that code below does 
+                         not get executed when we redirect. */
+      

+

The second special-case is any header that starts with the + string, "HTTP/" (case is not significant). For + example, if you have your ErrorDocument 404 Apache directive + pointed to a PHP script, it would be a good idea to make sure + that your PHP script is actually generating a 404. The first + thing you do in your script should then be: +


header ("HTTP/1.0 404 Not Found");
+      

+

PHP scripts often generate dynamic HTML that must not be cached + by the client browser or any proxy caches between the server and the + client browser. Many proxies and clients can be forced to disable + caching with +


header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");    // Date in the past
+header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); 
+                                                      // always modified
+header ("Cache-Control: no-cache, must-revalidate");  // HTTP/1.1
+header ("Pragma: no-cache");                          // HTTP/1.0
+      

+

See also headers_sent() +


PrevHomeNext
HTTP functionsUpheaders_sent
\ No newline at end of file diff --git a/function.headers-sent.html b/function.headers-sent.html new file mode 100644 index 0000000..c1e4a8c --- /dev/null +++ b/function.headers-sent.html @@ -0,0 +1,182 @@ +headers_sent
PHP Manual
PrevNext

headers_sent

(PHP3 >= 3.0.8, PHP4 >= 4.0b2)

headers_sent -- Returns true if headers have been sent

Description

boolean headers_sent (void)

This function returns true if the HTTP headers have already been + sent, false otherwise. +

See also header() +


PrevHomeNext
headerUpsetcookie
\ No newline at end of file diff --git a/function.hebrev.html b/function.hebrev.html new file mode 100644 index 0000000..99c7fef --- /dev/null +++ b/function.hebrev.html @@ -0,0 +1,191 @@ +hebrev
PHP Manual
PrevNext

hebrev

(PHP3 , PHP4 )

hebrev --  + Convert logical Hebrew text to visual text +

Description

string hebrev (string hebrew_text [, int + max_chars_per_line])

The optional parameter max_chars_per_line + indicates maximum number of characters per line will be output. The + function tries to avoid breaking words. +

See also hebrevc() +


PrevHomeNext
get_meta_tagsUphebrevc
\ No newline at end of file diff --git a/function.hebrevc.html b/function.hebrevc.html new file mode 100644 index 0000000..b0c15a7 --- /dev/null +++ b/function.hebrevc.html @@ -0,0 +1,199 @@ +hebrevc
PHP Manual
PrevNext

hebrevc

(PHP3 , PHP4 )

hebrevc --  + Convert logical Hebrew text to visual text with newline conversion +

Description

string hebrevc (string hebrew_text [, int + max_chars_per_line])

This function is similar to hebrev() with the + difference that it converts newlines (\n) to "<br>\n". + The optional parameter max_chars_per_line + indicates maximum number of characters per line will be output. The + function tries to avoid breaking words. +

See also hebrev() +


PrevHomeNext
hebrevUphtmlentities
\ No newline at end of file diff --git a/function.hexdec.html b/function.hexdec.html new file mode 100644 index 0000000..55287b9 --- /dev/null +++ b/function.hexdec.html @@ -0,0 +1,184 @@ +hexdec
PHP Manual
PrevNext

hexdec

(PHP3 , PHP4 )

hexdec -- Hexadecimal to decimal

Description

int hexdec (string hex_string)

Returns the decimal equivalent of the hexadecimal number + represented by the hex_string argument. HexDec converts a + hexadecimal string to a decimal number. The largest number that + can be converted is 7fffffff or 2147483647 in decimal. +

See also the dechex() function. +


PrevHomeNext
getrandmaxUplcg_value
\ No newline at end of file diff --git a/function.highlight-file.html b/function.highlight-file.html new file mode 100644 index 0000000..5200617 --- /dev/null +++ b/function.highlight-file.html @@ -0,0 +1,334 @@ +highlight_file
PHP Manual
PrevNext

highlight_file

(PHP4 )

highlight_file -- Syntax highlighting of a file

Description

void highlight_file (string filename)

The highlight_file() function prints out a syntax + higlighted version of the code contained in filename + using the colors defined in the built-in syntax highlighter for PHP. +

Example 1. Creating a source highlighting URL

To setup a URL that can code hightlight any script that you pass to + it, we will make use of the "ForceType" directive in + Apache to generate a nice URL pattern, and use the + function highlight_file() to show a nice looking + code list. +

In your httpd.conf you can add the following: +


<Location /source>
+    ForceType application/x-httpd-php
+</Location>
+       

+

And then make a file named "source" and put it in your + web root directory. +


<HTML>
+<HEAD>
+<TITLE>Source Display</TITLE>
+</HEAD>
+<BODY BGCOLOR="white">
+<?php
+    $script = getenv ("PATH_TRANSLATED");
+    if(!$script) {
+    echo "<BR><B>ERROR: Script Name needed</B><BR>";
+    } else {
+    if (ereg("(\.php|\.inc)$",$script)) {
+    echo "<H1>Source of: $PATH_INFO</H1>\n<HR>\n";
+    highlight_file($script);
+    } else {
+    echo "<H1>ERROR: Only PHP or include script names are allowed</H1>"; 
+    }
+    }
+    echo "<HR>Processed: ".date("Y/M/d H:i:s",time());
+?>
+</BODY>
+</HTML>
+       
+

Then you can use an URL like the one below to display a colorized + version of a script located in "/path/to/script.php" + in your web site. +


http://your.server.com/source/path/to/script.php
+    

+

+

See also highlight_string(), + show_source(). +


PrevHomeNext
get_browserUphighlight_string
\ No newline at end of file diff --git a/function.highlight-string.html b/function.highlight-string.html new file mode 100644 index 0000000..b7f4d69 --- /dev/null +++ b/function.highlight-string.html @@ -0,0 +1,198 @@ +highlight_string
PHP Manual
PrevNext

highlight_string

(PHP4 )

highlight_string -- Syntax highlighting of a string

Description

void highlight_string (string str)

The highlight_string() function prints out a syntax + highlighted version of str using the colors defined + in the built-in syntax highlighter for PHP. +

See also highlight_file(), + show_source(). +


PrevHomeNext
highlight_fileUpignore_user_abort
\ No newline at end of file diff --git a/function.htmlentities.html b/function.htmlentities.html new file mode 100644 index 0000000..1f773d4 --- /dev/null +++ b/function.htmlentities.html @@ -0,0 +1,225 @@ +htmlentities
PHP Manual
PrevNext

htmlentities

(PHP3 , PHP4 )

htmlentities --  + Convert all applicable characters to HTML entities +

Description

string htmlentities (string string [, int quote_style])

This function is identical to + htmlspecialchars() in all ways, except that + all characters which have HTML character entity equivalents are + translated into these entities. Like + htmlspecialchars(), it takes an optional + second argument which indicates what should be done with single + and double quotes. ENT_COMPAT (the default) + will only convert double-quotes and leave single-quotes alone. + ENT_QUOTES will convert both double and + single quotes, and ENT_NOQUOTES will leave + both double and single quotes unconverted. +

At present, the ISO-8859-1 character set is used. Note that the optional + second argument was added in PHP 3.0.17 and PHP 4.0.3. +

See also htmlspecialchars() and + nl2br(). +


PrevHomeNext
hebrevcUphtmlspecialchars
\ No newline at end of file diff --git a/function.htmlspecialchars.html b/function.htmlspecialchars.html new file mode 100644 index 0000000..bb7f18d --- /dev/null +++ b/function.htmlspecialchars.html @@ -0,0 +1,296 @@ +htmlspecialchars
PHP Manual
PrevNext

htmlspecialchars

(PHP3 , PHP4 )

htmlspecialchars --  + Convert special characters to HTML entities +

Description

string htmlspecialchars (string string [, int quote_style])

Certain characters have special significance in HTML, and should + be represented by HTML entities if they are to preserve their + meanings. This function returns a string with some of these + conversions made; the translations made are those most + useful for everyday web programming. If you require all HTML + character entities to be translated, use + htmlentities() instead. +

This function is useful in preventing user-supplied text from + containing HTML markup, such as in a message board or guest book + application. The optional second argument, quote_style, tells the + function what to do with single and double quote characters. The + default mode, ENT_COMPAT, is the backwards compatible mode which only + translates the double-quote character and leaves the single-quote + untranslated. If ENT_QUOTES is set, both single and double quotes + are translated and if ENT_NOQUOTES is set neither single nor double quotes + are translated. +

The translations performed are: +

  • '&' (ampersand) becomes '&amp;' +

  • '"' (double quote) becomes '&quot;' when ENT_NOQUOTES is not set. +

  • ''' (single quote) becomes '&#039;' only when ENT_QUOTES is set. +

  • '<' (less than) becomes '&lt;' +

  • '>' (greater than) becomes '&gt;' +

+

Example 1. htmlspecialchars() example


$new = htmlspecialchars("<a href='test'>Test</a>", ENT_QUOTES);
+      
+

Note that this function does not translate anything beyond what + is listed above. For full entity translation, see + htmlentities(). Also note that the optional second + argument was added in PHP 3.0.17 and PHP 4.0.3. +

See also htmlentities() and + nl2br(). +


PrevHomeNext
htmlentitiesUpimplode
\ No newline at end of file diff --git a/function.hw-array2objrec.html b/function.hw-array2objrec.html new file mode 100644 index 0000000..29a87fa --- /dev/null +++ b/function.hw-array2objrec.html @@ -0,0 +1,186 @@ +hw_Array2Objrec
PHP Manual
PrevNext

hw_Array2Objrec

(PHP3 >= 3.0.4, PHP4 )

hw_Array2Objrec -- convert attributes from object array to object record

Description

strin hw_array2objrec (array object_array)

Converts an object_array into an object record. + Multiple attributes like 'Title' in different languages are treated + properly.

See also hw_objrec2array().


PrevHomeNext
Hyperwave functionsUphw_Children
\ No newline at end of file diff --git a/function.hw-children.html b/function.hw-children.html new file mode 100644 index 0000000..aac71ee --- /dev/null +++ b/function.hw-children.html @@ -0,0 +1,179 @@ +hw_Children
PHP Manual
PrevNext

hw_Children

(PHP3 >= 3.0.3, PHP4 )

hw_Children -- object ids of children

Description

array hw_children (int connection, int objectID)

Returns an array of object ids. Each id + belongs to a child of the collection with ID + objectID. + The array contains all children both documents and collections.


PrevHomeNext
hw_Array2ObjrecUphw_ChildrenObj
\ No newline at end of file diff --git a/function.hw-childrenobj.html b/function.hw-childrenobj.html new file mode 100644 index 0000000..c4c4909 --- /dev/null +++ b/function.hw-childrenobj.html @@ -0,0 +1,179 @@ +hw_ChildrenObj
PHP Manual
PrevNext

hw_ChildrenObj

(PHP3 >= 3.0.3, PHP4 )

hw_ChildrenObj -- object records of children

Description

array hw_childrenobj (int connection, int objectID)

Returns an array of object records. Each object record + belongs to a child of the collection with ID + objectID. + The array contains all children both documents and collections.


PrevHomeNext
hw_ChildrenUphw_Close
\ No newline at end of file diff --git a/function.hw-close.html b/function.hw-close.html new file mode 100644 index 0000000..2d1dfb7 --- /dev/null +++ b/function.hw-close.html @@ -0,0 +1,173 @@ +hw_Close
PHP Manual
PrevNext

hw_Close

(PHP3 >= 3.0.3, PHP4 )

hw_Close -- closes the Hyperwave connection

Description

int hw_close (int connection)

Returns false if connection is not a valid connection index, + otherwise true. Closes down the connection to a Hyperwave server + with the given connection index.


PrevHomeNext
hw_ChildrenObjUphw_Connect
\ No newline at end of file diff --git a/function.hw-connect.html b/function.hw-connect.html new file mode 100644 index 0000000..3da3486 --- /dev/null +++ b/function.hw-connect.html @@ -0,0 +1,196 @@ +hw_Connect
PHP Manual
PrevNext

hw_Connect

(PHP3 >= 3.0.3, PHP4 )

hw_Connect -- opens a connection

Description

int hw_connect (string host, int port, string username, string password)

Opens a connection to a Hyperwave server and returns a connection + index on success, or false if the connection + could not be made. Each of the arguments should be a quoted string, + except for the port number. The username and + password arguments are + optional and can be left out. In such a case no identification with + the server will be done. It is similar to identify as user anonymous. + This function returns a connection + index that is needed by other Hyperwave functions. You can have + multiple connections open at once. Keep in mind, that the password + is not encrypted.

See also hw_pConnect().


PrevHomeNext
hw_CloseUphw_Cp
\ No newline at end of file diff --git a/function.hw-cp.html b/function.hw-cp.html new file mode 100644 index 0000000..6afa67f --- /dev/null +++ b/function.hw-cp.html @@ -0,0 +1,188 @@ +hw_Cp
PHP Manual
PrevNext

hw_Cp

(PHP3 >= 3.0.3, PHP4 )

hw_Cp -- copies objects

Description

int hw_cp (int connection, array object_id_array, int destination id)

Copies the objects with object ids as specified in the second + parameter to the collection + with the id destination id.

The value return is the number of copied objects.

See also hw_mv().


PrevHomeNext
hw_ConnectUphw_Deleteobject
\ No newline at end of file diff --git a/function.hw-deleteobject.html b/function.hw-deleteobject.html new file mode 100644 index 0000000..2a6e3bf --- /dev/null +++ b/function.hw-deleteobject.html @@ -0,0 +1,182 @@ +hw_Deleteobject
PHP Manual
PrevNext

hw_Deleteobject

(PHP3 >= 3.0.3, PHP4 )

hw_Deleteobject -- deletes object

Description

int hw_deleteobject (int connection, int object_to_delete)

Deletes the object with the given object id in the second + parameter. It will delete all instances of the object.

Returns TRUE if no error occurs otherwise FALSE.

See also hw_mv().


PrevHomeNext
hw_CpUphw_DocByAnchor
\ No newline at end of file diff --git a/function.hw-docbyanchor.html b/function.hw-docbyanchor.html new file mode 100644 index 0000000..0b31900 --- /dev/null +++ b/function.hw-docbyanchor.html @@ -0,0 +1,177 @@ +hw_DocByAnchor
PHP Manual
PrevNext

hw_DocByAnchor

(PHP3 >= 3.0.3, PHP4 )

hw_DocByAnchor -- object id object belonging to anchor

Description

int hw_docbyanchor (int connection, int anchorID)

Returns an th object id of the document to + which anchorID belongs.


PrevHomeNext
hw_DeleteobjectUphw_DocByAnchorObj
\ No newline at end of file diff --git a/function.hw-docbyanchorobj.html b/function.hw-docbyanchorobj.html new file mode 100644 index 0000000..6bccdfe --- /dev/null +++ b/function.hw-docbyanchorobj.html @@ -0,0 +1,177 @@ +hw_DocByAnchorObj
PHP Manual
PrevNext

hw_DocByAnchorObj

(PHP3 >= 3.0.3, PHP4 )

hw_DocByAnchorObj -- object record object belonging to anchor

Description

string hw_docbyanchorobj (int connection, int anchorID)

Returns an th object record of the document to + which anchorID belongs.


PrevHomeNext
hw_DocByAnchorUphw_DocumentAttributes
\ No newline at end of file diff --git a/function.hw-documentattributes.html b/function.hw-documentattributes.html new file mode 100644 index 0000000..b28f18b --- /dev/null +++ b/function.hw-documentattributes.html @@ -0,0 +1,180 @@ +hw_DocumentAttributes
PHP Manual
PrevNext

hw_DocumentAttributes

(PHP3 >= 3.0.3, PHP4 <= 4.0b1)

hw_DocumentAttributes -- object record of hw_document

Description

string hw_documentattributes (int hw_document)

Returns the object record of the document.

See also hw_DocumentBodyTag(), + hw_DocumentSize().


PrevHomeNext
hw_DocByAnchorObjUphw_DocumentBodyTag
\ No newline at end of file diff --git a/function.hw-documentbodytag.html b/function.hw-documentbodytag.html new file mode 100644 index 0000000..e541e95 --- /dev/null +++ b/function.hw-documentbodytag.html @@ -0,0 +1,181 @@ +hw_DocumentBodyTag
PHP Manual
PrevNext

hw_DocumentBodyTag

(PHP3 >= 3.0.3, PHP4 <= 4.0b1)

hw_DocumentBodyTag -- body tag of hw_document

Description

string hw_documentbodytag (int hw_document)

Returns the BODY tag of the document. If the document is an HTML + document the BODY tag should be printed before the document.

See also hw_DocumentAttributes(), + hw_DocumentSize().


PrevHomeNext
hw_DocumentAttributesUphw_DocumentContent
\ No newline at end of file diff --git a/function.hw-documentcontent.html b/function.hw-documentcontent.html new file mode 100644 index 0000000..8ad43ea --- /dev/null +++ b/function.hw-documentcontent.html @@ -0,0 +1,186 @@ +hw_DocumentContent
PHP Manual
PrevNext

hw_DocumentContent

(PHP3 >= 3.0.8)

hw_DocumentContent -- returns content of hw_document

Description

string hw_documentcontent (int hw_document)

Returns the content of the document. If the document is an HTML + document the content is everything after the BODY tag. Information + from the HEAD and BODY tag is in the stored in the object record.

See also hw_DocumentAttributes(), + hw_DocumentSize(), + hw_DocumentSetContent().


PrevHomeNext
hw_DocumentBodyTagUphw_DocumentSetContent
\ No newline at end of file diff --git a/function.hw-documentsetcontent.html b/function.hw-documentsetcontent.html new file mode 100644 index 0000000..cb7a0ca --- /dev/null +++ b/function.hw-documentsetcontent.html @@ -0,0 +1,190 @@ +hw_DocumentSetContent
PHP Manual
PrevNext

hw_DocumentSetContent

(PHP3 >= 3.0.8)

hw_DocumentSetContent -- sets/replaces content of hw_document

Description

string hw_documentsetcontent (int hw_document, string content)

Sets or replaces the content of the document. If the document is an HTML + document the content is everything after the BODY tag. Information + from the HEAD and BODY tag is in the stored in the object record. + If you provide this information in the content of the document too, + the Hyperwave server will change the object record accordingly when + the document is inserted. Probably not a very good idea. + If this functions fails the document will retain its old content.

See also hw_DocumentAttributes(), + hw_DocumentSize(), + hw_DocumentContent().


PrevHomeNext
hw_DocumentContentUphw_DocumentSize
\ No newline at end of file diff --git a/function.hw-documentsize.html b/function.hw-documentsize.html new file mode 100644 index 0000000..e013494 --- /dev/null +++ b/function.hw-documentsize.html @@ -0,0 +1,180 @@ +hw_DocumentSize
PHP Manual
PrevNext

hw_DocumentSize

(PHP3 >= 3.0.3, PHP4 <= 4.0b1)

hw_DocumentSize -- size of hw_document

Description

int hw_documentsize (int hw_document)

Returns the size in bytes of the document.

See also hw_DocumentBodyTag(), + hw_DocumentAttributes().


PrevHomeNext
hw_DocumentSetContentUphw_ErrorMsg
\ No newline at end of file diff --git a/function.hw-edittext.html b/function.hw-edittext.html new file mode 100644 index 0000000..bfd7d04 --- /dev/null +++ b/function.hw-edittext.html @@ -0,0 +1,201 @@ +hw_EditText
PHP Manual
PrevNext

hw_EditText

(PHP3 >= 3.0.3, PHP4 )

hw_EditText -- retrieve text document

Description

int hw_edittext (int connection, int hw_document)

Uploads the text document to the server. The object record + of the document may not be modified while the document + is edited. + This function will only works for pure text documents. It will + not open a special data connection and therefore blocks the + control connection during the transfer.

See also hw_PipeDocument(), + hw_FreeDocument(), + hw_DocumentBodyTag(), + hw_DocumentSize(), + hw_OutputDocument(), + hw_GetText().


PrevHomeNext
hw_ErrorMsgUphw_Error
\ No newline at end of file diff --git a/function.hw-error.html b/function.hw-error.html new file mode 100644 index 0000000..8a5eac0 --- /dev/null +++ b/function.hw-error.html @@ -0,0 +1,172 @@ +hw_Error
PHP Manual
PrevNext

hw_Error

(PHP3 >= 3.0.3, PHP4 )

hw_Error -- error number

Description

int hw_error (int connection)

Returns the last error number. If the return value is 0 no error has + occurred. The error relates to the last command.


PrevHomeNext
hw_EditTextUphw_Free_Document
\ No newline at end of file diff --git a/function.hw-errormsg.html b/function.hw-errormsg.html new file mode 100644 index 0000000..f564258 --- /dev/null +++ b/function.hw-errormsg.html @@ -0,0 +1,173 @@ +hw_ErrorMsg
PHP Manual
PrevNext

hw_ErrorMsg

(PHP3 >= 3.0.3, PHP4 )

hw_ErrorMsg -- returns error message

Description

string hw_errormsg (int connection)

Returns a string containing the last error message or 'No Error'. If false + is returned, this function failed. + The message relates to the last command.


PrevHomeNext
hw_DocumentSizeUphw_EditText
\ No newline at end of file diff --git a/function.hw-free-document.html b/function.hw-free-document.html new file mode 100644 index 0000000..d66fdd6 --- /dev/null +++ b/function.hw-free-document.html @@ -0,0 +1,171 @@ +hw_Free_Document
PHP Manual
PrevNext

hw_Free_Document

(PHP3 >= 3.0.3, PHP4 )

hw_Free_Document -- frees hw_document

Description

int hw_free_document (int hw_document)

Frees the memory occupied by the Hyperwave document.


PrevHomeNext
hw_ErrorUphw_GetParents
\ No newline at end of file diff --git a/function.hw-getanchors.html b/function.hw-getanchors.html new file mode 100644 index 0000000..e666779 --- /dev/null +++ b/function.hw-getanchors.html @@ -0,0 +1,177 @@ +hw_GetAnchors
PHP Manual
PrevNext

hw_GetAnchors

(PHP3 >= 3.0.3, PHP4 )

hw_GetAnchors -- object ids of anchors of document

Description

array hw_getanchors (int connection, int objectID)

Returns an array of object ids with anchors of the document + with object ID objectID.


PrevHomeNext
hw_GetChildDocCollObjUphw_GetAnchorsObj
\ No newline at end of file diff --git a/function.hw-getanchorsobj.html b/function.hw-getanchorsobj.html new file mode 100644 index 0000000..f8b4fad --- /dev/null +++ b/function.hw-getanchorsobj.html @@ -0,0 +1,177 @@ +hw_GetAnchorsObj
PHP Manual
PrevNext

hw_GetAnchorsObj

(PHP3 >= 3.0.3, PHP4 )

hw_GetAnchorsObj -- object records of anchors of document

Description

array hw_getanchorsobj (int connection, int objectID)

Returns an array of object records with anchors of the document + with object ID objectID.


PrevHomeNext
hw_GetAnchorsUphw_Mv
\ No newline at end of file diff --git a/function.hw-getandlock.html b/function.hw-getandlock.html new file mode 100644 index 0000000..82f757f --- /dev/null +++ b/function.hw-getandlock.html @@ -0,0 +1,188 @@ +hw_GetAndLock
PHP Manual
PrevNext

hw_GetAndLock

(PHP3 >= 3.0.3, PHP4 )

hw_GetAndLock -- return bject record and lock object

Description

string hw_getandlock (int connection, int objectID)

Returns the object record for the object with ID + objectID. + It will also lock the object, so other users cannot access + it until it is unlocked.

See also hw_Unlock(), + hw_GetObject().


PrevHomeNext
hw_GetObjectUphw_GetText
\ No newline at end of file diff --git a/function.hw-getchildcoll.html b/function.hw-getchildcoll.html new file mode 100644 index 0000000..f71f827 --- /dev/null +++ b/function.hw-getchildcoll.html @@ -0,0 +1,188 @@ +hw_GetChildColl
PHP Manual
PrevNext

hw_GetChildColl

(PHP3 >= 3.0.3, PHP4 )

hw_GetChildColl -- object ids of child collections

Description

array hw_getchildcoll (int connection, int objectID)

Returns an array of object ids. Each object ID + belongs to a child collection of the collection with ID + objectID. The function will not + return child documents.

See also hw_GetChildren(), + hw_GetChildDocColl().


PrevHomeNext
hw_GetParentsObjUphw_GetChildCollObj
\ No newline at end of file diff --git a/function.hw-getchildcollobj.html b/function.hw-getchildcollobj.html new file mode 100644 index 0000000..ce17c23 --- /dev/null +++ b/function.hw-getchildcollobj.html @@ -0,0 +1,188 @@ +hw_GetChildCollObj
PHP Manual
PrevNext

hw_GetChildCollObj

(PHP3 >= 3.0.3, PHP4 )

hw_GetChildCollObj -- object records of child collections

Description

array hw_getchildcollobj (int connection, int objectID)

Returns an array of object records. Each object records + belongs to a child collection of the collection with ID + objectID. The function will not return + child documents.

See also hw_ChildrenObj(), + hw_GetChildDocCollObj().


PrevHomeNext
hw_GetChildCollUphw_GetRemote
\ No newline at end of file diff --git a/function.hw-getchilddoccoll.html b/function.hw-getchilddoccoll.html new file mode 100644 index 0000000..c0dc4ac --- /dev/null +++ b/function.hw-getchilddoccoll.html @@ -0,0 +1,180 @@ +hw_GetChildDocColl
PHP Manual
PrevNext

hw_GetChildDocColl

(PHP3 >= 3.0.3, PHP4 )

hw_GetChildDocColl -- object ids of child documents of collection

Description

array hw_getchilddoccoll (int connection, int objectID)

Returns array of object ids for child documents of a collection.

See also hw_GetChildren(), + hw_GetChildColl().


PrevHomeNext
hw_GetObjectByQueryCollObjUphw_GetChildDocCollObj
\ No newline at end of file diff --git a/function.hw-getchilddoccollobj.html b/function.hw-getchilddoccollobj.html new file mode 100644 index 0000000..ed9821e --- /dev/null +++ b/function.hw-getchilddoccollobj.html @@ -0,0 +1,180 @@ +hw_GetChildDocCollObj
PHP Manual
PrevNext

hw_GetChildDocCollObj

(PHP3 >= 3.0.3, PHP4 )

hw_GetChildDocCollObj -- object records of child documents of collection

Description

array hw_getchilddoccollobj (int connection, int objectID)

Returns an array of object records for child documents of a collection.

See also hw_ChildrenObj(), + hw_GetChildCollObj().


PrevHomeNext
hw_GetChildDocCollUphw_GetAnchors
\ No newline at end of file diff --git a/function.hw-getobject.html b/function.hw-getobject.html new file mode 100644 index 0000000..642059c --- /dev/null +++ b/function.hw-getobject.html @@ -0,0 +1,221 @@ +hw_GetObject
PHP Manual
PrevNext

hw_GetObject

(PHP3 >= 3.0.3, PHP4 )

hw_GetObject -- object record

Description

array hw_getobject (int connection, [int|array] objectID, string query)

Returns the object record for the object with ID + objectID if the second parameter is an integer. + If the second parameter is an array of integer the function will + return an array of object records. In such a case the last + parameter is also evaluated which is a query string.

The query string has the following syntax:

<expr> ::= "(" <expr> ")" |

"!" <expr> | /* NOT */

<expr> "||" <expr> | /* OR */

<expr> "&&" <expr> | /* AND */

<attribute> <operator> <value>

+ <attribute> ::= /* any attribute name (Title, Author, DocumentType ...) */

+ <operator> ::= "=" | /* equal */

"<" | /* less than (string compare) */

">" | /* greater than (string compare) */

"~" /* regular expression matching */

The query allows to further select certain objects from the list + of given objects. Unlike the other + query functions, this query may use not indexed attributes. How many + object records are returned depends on the query and if access to + the object is allowed.

See also hw_GetAndLock(), + hw_GetObjectByQuery().


PrevHomeNext
hw_GetSrcByDestObjUphw_GetAndLock
\ No newline at end of file diff --git a/function.hw-getobjectbyquery.html b/function.hw-getobjectbyquery.html new file mode 100644 index 0000000..27fec73 --- /dev/null +++ b/function.hw-getobjectbyquery.html @@ -0,0 +1,191 @@ +hw_GetObjectByQuery
PHP Manual
PrevNext

hw_GetObjectByQuery

(PHP3 >= 3.0.3, PHP4 )

hw_GetObjectByQuery -- search object

Description

array hw_getobjectbyquery (int connection, string query, int max_hits)

Searches for objects on the whole server and returns an array of + object ids. The maximum number of matches is limited to + max_hits. If max_hits + is set to -1 the maximum number of matches is unlimited.

The query will only work with indexed attributes.

See also hw_GetObjectByQueryObj().


PrevHomeNext
hw_GetTextUphw_GetObjectByQueryObj
\ No newline at end of file diff --git a/function.hw-getobjectbyquerycoll.html b/function.hw-getobjectbyquerycoll.html new file mode 100644 index 0000000..f788403 --- /dev/null +++ b/function.hw-getobjectbyquerycoll.html @@ -0,0 +1,198 @@ +hw_GetObjectByQueryColl
PHP Manual
PrevNext

hw_GetObjectByQueryColl

(PHP3 >= 3.0.3, PHP4 )

hw_GetObjectByQueryColl -- search object in collection

Description

array hw_getobjectbyquerycoll (int connection, int objectID, string query, int max_hits)

Searches for objects in collection with ID + objectID and returns an array of + object ids. The maximum number of matches is limited to + max_hits. + If max_hits + is set to -1 the maximum number of matches is unlimited.

The query will only work with indexed attributes.

See also hw_GetObjectByQueryCollObj().


PrevHomeNext
hw_GetObjectByQueryObjUphw_GetObjectByQueryCollObj
\ No newline at end of file diff --git a/function.hw-getobjectbyquerycollobj.html b/function.hw-getobjectbyquerycollobj.html new file mode 100644 index 0000000..00f6233 --- /dev/null +++ b/function.hw-getobjectbyquerycollobj.html @@ -0,0 +1,198 @@ +hw_GetObjectByQueryCollObj
PHP Manual
PrevNext

hw_GetObjectByQueryCollObj

(PHP3 >= 3.0.3, PHP4 )

hw_GetObjectByQueryCollObj -- search object in collection

Description

array hw_getobjectbyquerycollobj (int connection, int objectID, string query, int max_hits)

Searches for objects in collection with ID + objectID and returns an array of + object records. The maximum number of matches is limited to + max_hits. + If max_hits + is set to -1 the maximum number of matches is unlimited.

The query will only work with indexed attributes.

See also hw_GetObjectByQueryColl().


PrevHomeNext
hw_GetObjectByQueryCollUphw_GetChildDocColl
\ No newline at end of file diff --git a/function.hw-getobjectbyqueryobj.html b/function.hw-getobjectbyqueryobj.html new file mode 100644 index 0000000..953ceef --- /dev/null +++ b/function.hw-getobjectbyqueryobj.html @@ -0,0 +1,191 @@ +hw_GetObjectByQueryObj
PHP Manual
PrevNext

hw_GetObjectByQueryObj

(PHP3 >= 3.0.3, PHP4 )

hw_GetObjectByQueryObj -- search object

Description

array hw_getobjectbyqueryobj (int connection, string query, int max_hits)

Searches for objects on the whole server and returns an array of + object records. The maximum number of matches is limited to + max_hits. If max_hits + is set to -1 the maximum number of matches is unlimited.

The query will only work with indexed attributes.

See also hw_GetObjectByQuery().


PrevHomeNext
hw_GetObjectByQueryUphw_GetObjectByQueryColl
\ No newline at end of file diff --git a/function.hw-getparents.html b/function.hw-getparents.html new file mode 100644 index 0000000..00dfcc8 --- /dev/null +++ b/function.hw-getparents.html @@ -0,0 +1,177 @@ +hw_GetParents
PHP Manual
PrevNext

hw_GetParents

(PHP3 >= 3.0.3, PHP4 )

hw_GetParents -- object ids of parents

Description

array hw_getparents (int connection, int objectID)

Returns an indexed array of object ids. Each object id belongs to + a parent of the object with ID objectID.


PrevHomeNext
hw_Free_DocumentUphw_GetParentsObj
\ No newline at end of file diff --git a/function.hw-getparentsobj.html b/function.hw-getparentsobj.html new file mode 100644 index 0000000..2725012 --- /dev/null +++ b/function.hw-getparentsobj.html @@ -0,0 +1,179 @@ +hw_GetParentsObj
PHP Manual
PrevNext

hw_GetParentsObj

(PHP3 >= 3.0.3, PHP4 )

hw_GetParentsObj -- object records of parents

Description

array hw_getparentsobj (int connection, int objectID)

Returns an indexed array of object records plus an associated array with statistical + information about the object records. The associated array is the + last entry of the returned array. Each object record belongs to + a parent of the object with ID objectID.


PrevHomeNext
hw_GetParentsUphw_GetChildColl
\ No newline at end of file diff --git a/function.hw-getremote.html b/function.hw-getremote.html new file mode 100644 index 0000000..b9a9057 --- /dev/null +++ b/function.hw-getremote.html @@ -0,0 +1,190 @@ +hw_GetRemote
PHP Manual
PrevNext

hw_GetRemote

(PHP3 >= 3.0.3, PHP4 )

hw_GetRemote -- Gets a remote document

Description

int hw_getremote (int connection, int objectID)

Returns a remote document. Remote documents in Hyperwave notation + are documents retrieved from an external source. Common remote + documents are for example external web pages or queries in + a database. In order to be able to access external sources + throught remote documents Hyperwave introduces the HGI (Hyperwave + Gateway Interface) which is similar to the CGI. Currently, only + ftp, http-servers and some databases can be accessed by the HGI. + Calling hw_GetRemote() returns the document from + the external source. If you want to use this function you should be + very familiar with HGIs. You should also consider to use PHP instead + of Hyperwave to access external sources. Adding database support + by a Hyperwave gateway should be more difficult than doing it in PHP.

See also hw_GetRemoteChildren().


PrevHomeNext
hw_GetChildCollObjUphw_GetRemoteChildren
\ No newline at end of file diff --git a/function.hw-getremotechildren.html b/function.hw-getremotechildren.html new file mode 100644 index 0000000..6999802 --- /dev/null +++ b/function.hw-getremotechildren.html @@ -0,0 +1,196 @@ +hw_GetRemoteChildren
PHP Manual
PrevNext

hw_GetRemoteChildren

(PHP3 >= 3.0.3, PHP4 )

hw_GetRemoteChildren -- Gets children of remote document

Description

int hw_getremotechildren (int connection, string object record)

Returns the children of a remote document. Children of a remote + document are remote documents itself. + This makes sense + if a database query has to be narrowed and is explained in + Hyperwave Programmers' Guide. If the number of children is 1 the + function will return the document itself formated by the Hyperwave + Gateway Interface (HGI). If the number of children + is greater than 1 it will return an array of object record with + each maybe the input value for another call to + hw_GetRemoteChildren(). Those object records are + virtual and do not exist in the Hyperwave server, therefore they + do not have a valid object ID. How exactely such an object record + looks like is up to the HGI. + If you want to use this function you should be very familiar with HGIs. + You should also consider to use PHP instead of Hyperwave to access + external + sources. Adding database support by a Hyperwave gateway should be more + difficult than doing it in PHP.

See also hw_GetRemote().


PrevHomeNext
hw_GetRemoteUphw_GetSrcByDestObj
\ No newline at end of file diff --git a/function.hw-getsrcbydestobj.html b/function.hw-getsrcbydestobj.html new file mode 100644 index 0000000..6a53dea --- /dev/null +++ b/function.hw-getsrcbydestobj.html @@ -0,0 +1,183 @@ +hw_GetSrcByDestObj
PHP Manual
PrevNext

hw_GetSrcByDestObj

(PHP3 >= 3.0.3, PHP4 )

hw_GetSrcByDestObj -- Returns anchors pointing at object

Description

array hw_getsrcbydestobj (int connection, int objectID)

Returns the object records of all anchors pointing to the object with ID + objectID. The object can either be a document + or an anchor of type destination.

See also hw_GetAnchors().


PrevHomeNext
hw_GetRemoteChildrenUphw_GetObject
\ No newline at end of file diff --git a/function.hw-gettext.html b/function.hw-gettext.html new file mode 100644 index 0000000..205404e --- /dev/null +++ b/function.hw-gettext.html @@ -0,0 +1,252 @@ +hw_GetText
PHP Manual
PrevNext

hw_GetText

(PHP3 >= 3.0.3, PHP4 )

hw_GetText -- retrieve text document

Description

int hw_gettext (int connection, int objectID [, mixed + rootID/prefix])

Returns the document with object ID + objectID. If the document + has anchors which can be inserted, they will be inserted already. + The optional parameter rootID/prefix can + be a string or an integer. If it is an integer it determines + how links are inserted + into the document. The default is 0 and will result in links that + are constructed from the name of the link's destination object. This + is useful for web applications. If a link points to an object with + name 'internet_movie' the HTML link will be + <A HREF="/internet_movie">. The actual location of the source and + destination object in the document hierachy is disregarded. You + will have to set up your web browser, to rewrite that URL to for + example '/my_script.php3/internet_movie'. 'my_script.php3' will + have to evaluate $PATH_INFO and retrieve the document. + All links will have the prefix '/my_script.php3/'. If you do not + want this you can set the optional parameter + rootID/prefix to any prefix which + is used instead. Is this case it has to be a string.

If rootID/prefix is an integer and + unequal to 0 the link is constructed from all the names + starting at the object with the id rootID/prefix + separated by a slash relative to the current object. + If for example the above document 'internet_movie' is located + at 'a-b-c-internet_movie' with '-' being the seperator between + hierachy levels on the Hyperwave server and the source document is + located at 'a-b-d-source' the resulting HTML link would be: + <A HREF="../c/internet_movie">. This is useful if you want + to download the whole server content onto disk and map + the document hierachy onto the file system.

This function will only work for pure text documents. It will + not open a special data connection and therefore blocks the + control connection during the transfer.

See also hw_PipeDocument(), + hw_FreeDocument(), + hw_DocumentBodyTag(), + hw_DocumentSize(), + hw_OutputDocument().


PrevHomeNext
hw_GetAndLockUphw_GetObjectByQuery
\ No newline at end of file diff --git a/function.hw-getusername.html b/function.hw-getusername.html new file mode 100644 index 0000000..f9cff26 --- /dev/null +++ b/function.hw-getusername.html @@ -0,0 +1,171 @@ +hw_getusername
PHP Manual
PrevNext

hw_getusername

(PHP3 >= 3.0.3, PHP4 )

hw_getusername -- name of currently logged in user

Description

string hw_getusername (int connection)

Returns the username of the connection.


PrevHomeNext
hw_WhoUpICAP Functions
\ No newline at end of file diff --git a/function.hw-identify.html b/function.hw-identify.html new file mode 100644 index 0000000..028d24c --- /dev/null +++ b/function.hw-identify.html @@ -0,0 +1,190 @@ +hw_Identify
PHP Manual
PrevNext

hw_Identify

(PHP3 >= 3.0.3, PHP4 )

hw_Identify -- identifies as user

Description

int hw_identify (string username, string password)

Identifies as user with username and + password. Identification + is only valid for the current session. I do not thing this + function will be needed very often. In most cases it will + be easier to identify with the opening of the connection.

See also hw_Connect().


PrevHomeNext
hw_MvUphw_InCollections
\ No newline at end of file diff --git a/function.hw-incollections.html b/function.hw-incollections.html new file mode 100644 index 0000000..333c880 --- /dev/null +++ b/function.hw-incollections.html @@ -0,0 +1,199 @@ +hw_InCollections
PHP Manual
PrevNext

hw_InCollections

(PHP3 >= 3.0.3, PHP4 )

hw_InCollections -- check if object ids in collections

Description

array hw_incollections (int connection, array object_id_array, array collection_id_array, int return_collections)

Checks whether a set of objects (documents or collections) + specified by the object_id_array is part of + the collections listed in collection_id_array. + When the fourth parameter return_collections is 0, + the subset of object ids that is part of the collections (i.e., + the documents or collections that are children of one or more + collections of collection ids or their subcollections, recursively) + is returned as an array. When the fourth parameter is 1, however, the + set of collections that have one or more objects of this subset as + children are returned as an array. This option allows a client to, + e.g., highlight the part of the collection hierarchy that contains + the matches of a previous query, in a graphical overview.


PrevHomeNext
hw_IdentifyUphw_Info
\ No newline at end of file diff --git a/function.hw-info.html b/function.hw-info.html new file mode 100644 index 0000000..45c92e0 --- /dev/null +++ b/function.hw-info.html @@ -0,0 +1,174 @@ +hw_Info
PHP Manual
PrevNext

hw_Info

(PHP3 >= 3.0.3, PHP4 )

hw_Info -- info about connection

Description

string hw_info (int connection)

Returns information about the current connection. The returned string + has the following format: <Serverstring>, <Host>, + <Port>, <Username>, <Port of Client>, + <Byte swapping>


PrevHomeNext
hw_InCollectionsUphw_InsColl
\ No newline at end of file diff --git a/function.hw-inscoll.html b/function.hw-inscoll.html new file mode 100644 index 0000000..5e7cb89 --- /dev/null +++ b/function.hw-inscoll.html @@ -0,0 +1,183 @@ +hw_InsColl
PHP Manual
PrevNext

hw_InsColl

(PHP3 >= 3.0.3, PHP4 )

hw_InsColl -- insert collection

Description

int hw_inscoll (int connection, int objectID, array object_array)

Inserts a new collection with attributes as in + object_array into + collection with object ID objectID.


PrevHomeNext
hw_InfoUphw_InsDoc
\ No newline at end of file diff --git a/function.hw-insdoc.html b/function.hw-insdoc.html new file mode 100644 index 0000000..6ebb567 --- /dev/null +++ b/function.hw-insdoc.html @@ -0,0 +1,212 @@ +hw_InsDoc
PHP Manual
PrevNext

hw_InsDoc

(PHP3 >= 3.0.3, PHP4 )

hw_InsDoc -- insert document

Description

int hw_insdoc (int connection, int parentID, string object_record, string text)

Inserts a new document with attributes as in + object_record into collection with object ID + parentID. This function inserts either + an object record only or an object record and a pure ascii text in + text if text is given. + If you want to insert a general document of any kind use + hw_insertdocument() instead.

See also hw_InsertDocument(), + hw_InsColl().


PrevHomeNext
hw_InsCollUphw_InsertDocument
\ No newline at end of file diff --git a/function.hw-insertdocument.html b/function.hw-insertdocument.html new file mode 100644 index 0000000..b0f1db9 --- /dev/null +++ b/function.hw-insertdocument.html @@ -0,0 +1,191 @@ +hw_InsertDocument
PHP Manual
PrevNext

hw_InsertDocument

(PHP3 >= 3.0.3, PHP4 )

hw_InsertDocument -- upload any document

Description

int hw_insertdocument (int connection, int parent_id, int hw_document)

Uploads a document into the collection with + parent_id. + The document has to be created before with + hw_NewDocument(). Make sure that + the object record of the new document contains at least + the attributes: Type, DocumentType, Title and Name. Possibly + you also want to set the MimeType. The functions returns the + object id of the new document or false.

See also hw_PipeDocument().


PrevHomeNext
hw_InsDocUphw_InsertObject
\ No newline at end of file diff --git a/function.hw-insertobject.html b/function.hw-insertobject.html new file mode 100644 index 0000000..09f3b85 --- /dev/null +++ b/function.hw-insertobject.html @@ -0,0 +1,195 @@ +hw_InsertObject
PHP Manual
PrevNext

hw_InsertObject

(PHP3 >= 3.0.3, PHP4 )

hw_InsertObject -- inserts an object record

Description

int hw_insertobject (int connection, string object rec, string parameter)

Inserts an object into the server. The object can be + any valid hyperwave object. See the HG-CSP documentation + for a detailed information on how the parameters have to be.

Note: If you want to insert an Anchor, the attribute Position + has always been set either to a start/end value or to + 'invisible'. Invisible positions are needed if the annotation + has no correspondig link in the annotation text.

See also hw_PipeDocument(), + hw_InsertDocument(), + hw_InsDoc(), + hw_InsColl().


PrevHomeNext
hw_InsertDocumentUphw_mapid
\ No newline at end of file diff --git a/function.hw-mapid.html b/function.hw-mapid.html new file mode 100644 index 0000000..2086c63 --- /dev/null +++ b/function.hw-mapid.html @@ -0,0 +1,195 @@ +hw_mapid
PHP Manual
PrevNext

hw_mapid

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

hw_mapid -- Maps global id on virtual local id

Description

int hw_mapid (int connection, int server id, int object id)

Maps a global object id on any hyperwave server, even those + you did not connect to with hw_connect(), + onto a virtual object id. This virtual object id can then be + used as any other object id, e.g. to obtain the object record + with hw_getobject(). The server id is the + first part of the global object id (GOid) of the object which + is actually the IP number as an integer.

Note: In order to use this function you will have to set + the F_DISTRIBUTED flag, which can currently only be set at + compile time in hg_comm.c. It is not set by default. Read + the comment at the beginning of hg_comm.c +


PrevHomeNext
hw_InsertObjectUphw_Modifyobject
\ No newline at end of file diff --git a/function.hw-modifyobject.html b/function.hw-modifyobject.html new file mode 100644 index 0000000..0a22ea5 --- /dev/null +++ b/function.hw-modifyobject.html @@ -0,0 +1,537 @@ +hw_Modifyobject
PHP Manual
PrevNext

hw_Modifyobject

(PHP3 >= 3.0.7, PHP4 >= 4.0b2)

hw_Modifyobject -- modifies object record

Description

int hw_modifyobject (int connection, int object_to_change, array remove, array add, int mode)

This command allows to remove, add, or modify individual attributes + of an object record. The object is specified by the Object ID + object_to_change. The first array + remove is a list of attributes to remove. + The second array add is a list of attributes + to add. In order to modify an attribute one will have to remove + the old one and add a new one. hw_modifyobject() + will always remove the attributes before it adds attributes unless + the value of the attribute to remove is not a string or array.

The last parameter determines if the modification is performed + recursively. 1 means recurive modification. If some of the objects + cannot be modified they will be skiped without notice. + hw_error() may not indicate an error though + some of the objects could not be modified.

The keys of both arrays are the attributes name. The value of each + array element can either be an array, a string or anything else. + If it is an array + each attribute value is constructed by the key of each element plus + a colon and the value of each element. If it is a string it is taken + as the attribute value. An empty string will result in a complete + removal of that attribute. If the value is neither a string nor an + array but something else, e.g. an integer, no operation at all will + be performed on the attribute. This is neccessary if you want to + to add a completely new attribute not just a new value for an existing + attribute. If the remove array contained + an empty string for that attribute, the attribute would be tried to be + removed which would fail since it doesn't exist. The following addition of + a new value for that attribute would also fail. Setting the value + for that attribute to e.g. 0 would not even try to remove it and + the addition will work.

If you would like to change the attribute 'Name' with the current + value 'books' into 'articles' you will have to create two arrays + and call hw_modifyobject(). +

Example 1. modifying an attribute


       // $connect is an existing connection to the Hyperwave server
+       // $objid is the ID of the object to modify
+       $remarr = array("Name" => "books");
+       $addarr = array("Name" => "articles");
+       $hw_modifyobject($connect, $objid, $remarr, $addarr);
+      
+ In order to delete/add a name=value pair from/to the object record just + pass the remove/add array and set the last/third parameter to an empty + array. If the attribute is the first one with that name to add, set + attribute value in the remove array to an integer. +

Example 2. adding a completely new attribute


       // $connect is an existing connection to the Hyperwave server
+       // $objid is the ID of the object to modify
+       $remarr = array("Name" => 0);
+       $addarr = array("Name" => "articles");
+       $hw_modifyobject($connect, $objid, $remarr, $addarr);
+      

Note: + Multilingual attributes, e.g. 'Title', can be modified in two + ways. Either by providing the attributes value in its native + form 'language':'title' or by providing an array with elements + for each language as described above. The above example would + than be:

+

Example 3. modifying Title attribute


       $remarr = array("Title" => "en:Books");
+       $addarr = array("Title" => "en:Articles");
+       $hw_modifyobject($connect, $objid, $remarr, $addarr);
+      
+ or +

Example 4. modifying Title attribute


       $remarr = array("Title" => array("en" => "Books"));
+       $addarr = array("Title" => array("en" => "Articles", "ge"=>"Artikel"));
+       $hw_modifyobject($connect, $objid, $remarr, $addarr);
+      
+ This removes the english title 'Books' and adds the english title + 'Articles' and the german title 'Artikel'. +

Example 5. removing attribute


       $remarr = array("Title" => "");
+       $addarr = array("Title" => "en:Articles");
+       $hw_modifyobject($connect, $objid, $remarr, $addarr);
+      
+

Note: + This will remove all attributes with the name 'Title' and adds + a new 'Title' attribute. This comes in handy if you want to + remove attributes recursively. +

+

Note: + If you need to delete all attributes with a certain name you + will have to pass an empty string as the attribute value.

+

Note: + Only the attributes 'Title', 'Description' and 'Keyword' will + properly handle the language prefix. If those attributes don't carry + a language prefix, the prefix 'xx' will be assigned. +

+

Note: + The 'Name' attribute is somewhat special. In some cases it cannot + be complete removed. You will get an error message 'Change of base + attribute' (not clear when this happens). Therefore you will always + have to add a new Name first and than remove the old one. +

+

Note: + You may not suround this function by calls to + hw_getandlock() and hw_unlock(). + hw_modifyobject() does this internally. +

Returns TRUE if no error occurs otherwise FALSE.


PrevHomeNext
hw_mapidUphw_New_Document
\ No newline at end of file diff --git a/function.hw-mv.html b/function.hw-mv.html new file mode 100644 index 0000000..5f230e5 --- /dev/null +++ b/function.hw-mv.html @@ -0,0 +1,210 @@ +hw_Mv
PHP Manual
PrevNext

hw_Mv

(PHP3 >= 3.0.3, PHP4 )

hw_Mv -- moves objects

Description

int hw_mv (int connection, array object id array, int source id, int destination id)

Moves the objects with object ids as specified in the second + parameter from the collection with id source id + to the collection with the id destination id. + If the destination id is 0 the objects will + be unlinked from the source collection. If this is the last instance + of that object it will be deleted. If you want to delete all instances + at once, use hw_deleteobject().

The value return is the number of moved objects.

See also hw_cp(), + hw_deleteobject().


PrevHomeNext
hw_GetAnchorsObjUphw_Identify
\ No newline at end of file diff --git a/function.hw-new-document.html b/function.hw-new-document.html new file mode 100644 index 0000000..6936295 --- /dev/null +++ b/function.hw-new-document.html @@ -0,0 +1,217 @@ +hw_New_Document
PHP Manual
PrevNext

hw_New_Document

(PHP3 >= 3.0.3, PHP4 )

hw_New_Document -- create new document

Description

int hw_new_document (string object_record, string document_data, int document_size)

Returns a new Hyperwave document with document data set to + document_data and object record set to + object_record. The length of the + document_data has to passed in + document_sizeThis function does not + insert the document into the Hyperwave server.

See also hw_FreeDocument(), + hw_DocumentSize(), + hw_DocumentBodyTag(), + hw_OutputDocument(), + hw_InsertDocument().


PrevHomeNext
hw_ModifyobjectUphw_Objrec2Array
\ No newline at end of file diff --git a/function.hw-objrec2array.html b/function.hw-objrec2array.html new file mode 100644 index 0000000..f5774c3 --- /dev/null +++ b/function.hw-objrec2array.html @@ -0,0 +1,205 @@ +hw_Objrec2Array
PHP Manual
PrevNext

hw_Objrec2Array

(PHP3 >= 3.0.3, PHP4 )

hw_Objrec2Array -- convert attributes from object record to object array

Description

array hw_objrec2array (string object_record [, array + format])

Converts an object_record into an object array. + The keys of the resulting array are the attributes names. + Multi-value attributes like 'Title' in different languages form its own + array. The keys of this array are the left part to the colon of the + attribute value. This left part must be two characters long. + Other multi-value attributes without a prefix form an indexed array. + If the optional parameter is missing the + attributes 'Title', 'Description' + and 'Keyword' are treated as language attributes and the attributes + 'Group', 'Parent' and 'HtmlAttr' as non-prefixed multi-value attributes. + By passing an array holding the type for each attribute you can + alter this behaviour. The array is an associated array with the attribute + name as its key and the value being one of + HW_ATTR_LANG or HW_ATTR_NONE +

See also hw_array2objrec().


PrevHomeNext
hw_New_DocumentUphw_OutputDocument
\ No newline at end of file diff --git a/function.hw-outputdocument.html b/function.hw-outputdocument.html new file mode 100644 index 0000000..3e2e08a --- /dev/null +++ b/function.hw-outputdocument.html @@ -0,0 +1,171 @@ +hw_OutputDocument
PHP Manual
PrevNext

hw_OutputDocument

(PHP3 >= 3.0.3, PHP4 <= 4.0b1)

hw_OutputDocument -- prints hw_document

Description

int hw_outputdocument (int hw_document)

Prints the document without the BODY tag.


PrevHomeNext
hw_Objrec2ArrayUphw_pConnect
\ No newline at end of file diff --git a/function.hw-pconnect.html b/function.hw-pconnect.html new file mode 100644 index 0000000..865bf5a --- /dev/null +++ b/function.hw-pconnect.html @@ -0,0 +1,195 @@ +hw_pConnect
PHP Manual
PrevNext

hw_pConnect

(PHP3 >= 3.0.3, PHP4 )

hw_pConnect -- make a persistent database connection

Description

int hw_pconnect (string host, int port, string username, string password)

Returns a connection index on success, or false if the connection + could not be made. Opens a persistent connection to a Hyperwave + server. Each of the arguments should be a quoted string, + except for the port number. The username + and password arguments are + optional and can be left out. In such a case no identification with + the server will be done. It is similar to identify as user anonymous. + This function returns a connection + index that is needed by other Hyperwave functions. You can have + multiple persistent connections open at once.

See also hw_Connect().


PrevHomeNext
hw_OutputDocumentUphw_PipeDocument
\ No newline at end of file diff --git a/function.hw-pipedocument.html b/function.hw-pipedocument.html new file mode 100644 index 0000000..14d6ecf --- /dev/null +++ b/function.hw-pipedocument.html @@ -0,0 +1,201 @@ +hw_PipeDocument
PHP Manual
PrevNext

hw_PipeDocument

(PHP3 >= 3.0.3, PHP4 )

hw_PipeDocument -- retrieve any document

Description

int hw_pipedocument (int connection, int objectID)

Returns the Hyperwave document with object ID + objectID. If the document + has anchors which can be inserted, they will have been inserted already. + The document will be transfered via a special data connection which + does not block the control connection.

See also hw_GetText() for more on link insertion, + hw_FreeDocument(), + hw_DocumentSize(), + hw_DocumentBodyTag(), + hw_OutputDocument().


PrevHomeNext
hw_pConnectUphw_Root
\ No newline at end of file diff --git a/function.hw-root.html b/function.hw-root.html new file mode 100644 index 0000000..f1ca2c1 --- /dev/null +++ b/function.hw-root.html @@ -0,0 +1,173 @@ +hw_Root
PHP Manual
PrevNext

hw_Root

(PHP3 >= 3.0.3, PHP4 )

hw_Root -- root object id

Description

int hw_root ()

Returns the object ID of the hyperroot collection. Currently this + is always 0. The child collection of the hyperroot is the root + collection of the connected server.


PrevHomeNext
hw_PipeDocumentUphw_Unlock
\ No newline at end of file diff --git a/function.hw-unlock.html b/function.hw-unlock.html new file mode 100644 index 0000000..c02960e --- /dev/null +++ b/function.hw-unlock.html @@ -0,0 +1,176 @@ +hw_Unlock
PHP Manual
PrevNext

hw_Unlock

(PHP3 >= 3.0.3, PHP4 )

hw_Unlock -- unlock object

Description

int hw_unlock (int connection, int objectID)

Unlocks a document, so other users regain access.

See also hw_GetAndLock().


PrevHomeNext
hw_RootUphw_Who
\ No newline at end of file diff --git a/function.hw-who.html b/function.hw-who.html new file mode 100644 index 0000000..3216f1b --- /dev/null +++ b/function.hw-who.html @@ -0,0 +1,174 @@ +hw_Who
PHP Manual
PrevNext

hw_Who

(PHP3 >= 3.0.3, PHP4 )

hw_Who -- List of currently logged in users

Description

int hw_who (int connection)

Returns an array of users currently logged into the Hyperwave server. + Each entry in this array is an array itself containing the elements id, + name, system, onSinceDate, onSinceTime, TotalTime and self. 'self' + is 1 if this entry belongs to the user who initianted the request.


PrevHomeNext
hw_UnlockUphw_getusername
\ No newline at end of file diff --git a/function.ibase-bind.html b/function.ibase-bind.html new file mode 100644 index 0000000..53fd0b8 --- /dev/null +++ b/function.ibase-bind.html @@ -0,0 +1,182 @@ +ibase_bind
PHP Manual
PrevNext

ibase_bind

ibase_bind -- + Bind placeholder parameters from a previously prepared query +

Description

int ibase_bind(int query);

Bind Parameters from a query prepared by + ibase_prepare(). +

Note: + Ibase_bind() is currently not functional in + PHP4 +


PrevHomeNext
ibase_prepareUpibase_execute
\ No newline at end of file diff --git a/function.ibase-close.html b/function.ibase-close.html new file mode 100644 index 0000000..11634a9 --- /dev/null +++ b/function.ibase-close.html @@ -0,0 +1,185 @@ +ibase_close
PHP Manual
PrevNext

ibase_close

(PHP3 >= 3.0.6, PHP4 )

ibase_close --  + Close a connection to an InterBase database +

Description

int ibase_close ([int + connection_id])

Closes the link to an InterBase database that's associated with + a connection id returned from ibase_connect(). + If the connection id is omitted, the last opened link is assumed. + Default transaction on link is committed, other transactions are + rolled back. +


PrevHomeNext
ibase_pconnectUpibase_query
\ No newline at end of file diff --git a/function.ibase-connect.html b/function.ibase-connect.html new file mode 100644 index 0000000..041022f --- /dev/null +++ b/function.ibase-connect.html @@ -0,0 +1,348 @@ +ibase_connect
PHP Manual
PrevNext

ibase_connect

(PHP3 >= 3.0.6, PHP4 )

ibase_connect --  + Open a connection to an InterBase database +

Description

int ibase_connect (string database [, string + username [, string + password [, string + charset [, int + buffers [, int + dialect [, string + role]]]]]])

Establishes a connection to an InterBase server. + The database argument + has to be a valid path to database file on the server it resides on. + If the server is not local, it must be prefixed with either + 'hostname:' (TCP/IP), '//hostname/' (NetBEUI) or 'hostname@' (IPX/SPX), + depending on the connection protocol used. username + and password can also + be specified with PHP configuration directives ibase.default_user and + ibase.default_password. charset is the default + character set for a database. buffers is the number + of database buffers to allocate for the server-side cache. If 0 or omitted, + server chooses its own default. dialect selects + the default SQL dialect for any statement executed within a connection, + and it defaults to the highest one supported by client libraries. +

In case a second call is made to + ibase_connect() with the same arguments, no new link + will be established, but instead, the link identifier of the already opened + link will be returned. The link to the server will be closed as soon as the + execution of the script ends, unless it's closed earlier by explicitly calling + ibase_close(). +

Example 1. Ibase_connect() example


<?php
+    $dbh = ibase_connect ($host, $username, $password);
+    $stmt = 'SELECT * FROM tblname';
+    $sth = ibase_query ($dbh, $stmt);
+    while ($row = ibase_fetch_object ($sth)) {
+        print $row->email . "\n";
+    }
+    ibase_close ($dbh);
+?>
+      
+

Note: + buffers was added in PHP4-RC2. +

Note: + dialect was added in PHP4-RC2. It is functional + only with InterBase 6 and versions higher than that. +

Note: + role was added in PHP4-RC2. It is functional + only with InterBase 5 and versions higher than that. +

See also: ibase_pconnect(). +


PrevHomeNext
InterBase functionsUpibase_pconnect
\ No newline at end of file diff --git a/function.ibase-execute.html b/function.ibase-execute.html new file mode 100644 index 0000000..e07c7d4 --- /dev/null +++ b/function.ibase-execute.html @@ -0,0 +1,225 @@ +ibase_execute
PHP Manual
PrevNext

ibase_execute

(PHP3 >= 3.0.6, PHP4 )

ibase_execute -- Execute a previously prepared query

Description

int ibase_execute (int + query [, int + bind_args])

Execute a query prepared by ibase_prepare(). + This is a lot more effective than using ibase_query() + if you are repeating a same kind of query several times with only + some parameters changing. +


<?php
+    $updates = array(
+        1 => 'Eric',
+        5 => 'Filip',
+        7 => 'Larry'
+    );
+
+    $query = ibase_prepare("UPDATE FOO SET BAR = ? WHERE BAZ = ?");
+
+    while (list($baz, $bar) = each($updates)) {
+        ibase_execute($query, $bar, $baz);
+    }
+?>
+      

+


PrevHomeNext
ibase_prepareUpibase_free_query
\ No newline at end of file diff --git a/function.ibase-fetch-object.html b/function.ibase-fetch-object.html new file mode 100644 index 0000000..ff8f29e --- /dev/null +++ b/function.ibase-fetch-object.html @@ -0,0 +1,234 @@ +ibase_fetch_object
PHP Manual
PrevNext

ibase_fetch_object

(PHP3 >= 3.0.7, PHP4 >= 4.0RC1)

ibase_fetch_object -- Get an object from a InterBase database

Description

object ibase_fetch_object (int + result_id)

Fetches a row as a pseudo-object from a + result_id obtained either by + ibase_query() or + ibase_execute(). +


<php
+    $dbh = ibase_connect ($host, $username, $password);
+    $stmt = 'SELECT * FROM tblname';
+    $sth = ibase_query ($dbh, $stmt);
+    while ($row = ibase_fetch_object ($sth)) {
+        print $row->email . "\n";
+    }
+    ibase_close ($dbh);
+?>
+      

+

See also ibase_fetch_row(). +


PrevHomeNext
ibase_fetch_rowUpibase_free_result
\ No newline at end of file diff --git a/function.ibase-fetch-row.html b/function.ibase-fetch-row.html new file mode 100644 index 0000000..b22662d --- /dev/null +++ b/function.ibase-fetch-row.html @@ -0,0 +1,180 @@ +ibase_fetch_row
PHP Manual
PrevNext

ibase_fetch_row

(PHP3 >= 3.0.6, PHP4 )

ibase_fetch_row -- Fetch a row from an InterBase database

Description

array ibase_fetch_row (int + result_identifier)

Returns the next row specified by the result identifier obtained + using the ibase_query(). +


PrevHomeNext
ibase_queryUpibase_fetch_object
\ No newline at end of file diff --git a/function.ibase-free-query.html b/function.ibase-free-query.html new file mode 100644 index 0000000..61be4e0 --- /dev/null +++ b/function.ibase-free-query.html @@ -0,0 +1,181 @@ +ibase_free_query
PHP Manual
PrevNext

ibase_free_query

(PHP3 >= 3.0.6, PHP4 )

ibase_free_query --  + Free memory allocated by a prepared query +

Description

int ibase_free_query (int + query)

Free a query prepared by ibase_prepare(). +


PrevHomeNext
ibase_executeUpibase_timefmt
\ No newline at end of file diff --git a/function.ibase-free-result.html b/function.ibase-free-result.html new file mode 100644 index 0000000..331e09c --- /dev/null +++ b/function.ibase-free-result.html @@ -0,0 +1,180 @@ +ibase_free_result
PHP Manual
PrevNext

ibase_free_result

(PHP3 >= 3.0.6, PHP4 )

ibase_free_result -- Free a result set

Description

int ibase_free_result (int + result_identifier)

Free's a result set the has been created by + ibase_query(). +


PrevHomeNext
ibase_fetch_objectUpibase_prepare
\ No newline at end of file diff --git a/function.ibase-num-fields.html b/function.ibase-num-fields.html new file mode 100644 index 0000000..86ef729 --- /dev/null +++ b/function.ibase-num-fields.html @@ -0,0 +1,235 @@ +ibase_num_fields
PHP Manual
PrevNext

ibase_num_fields

(PHP3 >= 3.0.7, PHP4 >= 4.0RC1)

ibase_num_fields --  + Get the number of fields in a result set +

Description

int ibase_num_fields (int result_id)

Returns an integer containing the number of fields in a result + set. +


<?php
+    $dbh = ibase_connect ($host, $username, $password);
+    $stmt = 'SELECT * FROM tblname';
+    $sth = ibase_query ($dbh, $stmt);
+
+    if (ibase_num_fields($sth) > 0) {
+        while ($row = ibase_fetch_object ($sth)) {
+            print $row->email . "\n";
+        }
+    } else {
+        die ("No Results were found for your query");
+    }
+
+    ibase_close ($dbh);
+?>
+      

+

See also: ibase_field_info(). +

Note: + Ibase_num_fields() is currently not functional + in PHP 4. +


PrevHomeNext
ibase_timefmtUpLDAP functions
\ No newline at end of file diff --git a/function.ibase-pconnect.html b/function.ibase-pconnect.html new file mode 100644 index 0000000..6412cd4 --- /dev/null +++ b/function.ibase-pconnect.html @@ -0,0 +1,216 @@ +ibase_pconnect
PHP Manual
PrevNext

ibase_pconnect

(PHP3 >= 3.0.6, PHP4 )

ibase_pconnect --  + Creates an persistent connection to an InterBase database +

Description

int ibase_connect (string database [, string + username [, string + password [, string + charset [, string + role]]]])

ibase_pconnect() acts very much like + ibase_connect() with two major differences. + First, when connecting, the function will first try to find a + (persistent) link that's already opened with the same parameters. + If one is found, an identifier for it will be returned instead of + opening a new connection. Second, the connection to the InterBase + server will not be closed when the execution of the script ends. + Instead, the link will remain open for future use + (ibase_close() will not close links established + by ibase_pconnect()). This type of link is + therefore called 'persistent'. +

See also ibase_connect() for the meaning of + parameters passed to this function. They are exactly the same. +


PrevHomeNext
ibase_connectUpibase_close
\ No newline at end of file diff --git a/function.ibase-prepare.html b/function.ibase-prepare.html new file mode 100644 index 0000000..ecbc5da --- /dev/null +++ b/function.ibase-prepare.html @@ -0,0 +1,183 @@ +ibase_prepare
PHP Manual
PrevNext

ibase_prepare

(PHP3 >= 3.0.6, PHP4 )

ibase_prepare --  + Prepare a query for later binding of parameter placeholders and + execution +

Description

int ibase_prepare ([int + link_identifier, string query])

Prepare a query for later binding of parameter placeholders and + execution (via ibase_execute()). +


PrevHomeNext
ibase_free_resultUpibase_execute
\ No newline at end of file diff --git a/function.ibase-query.html b/function.ibase-query.html new file mode 100644 index 0000000..c2e15d0 --- /dev/null +++ b/function.ibase-query.html @@ -0,0 +1,231 @@ +ibase_query
PHP Manual
PrevNext

ibase_query

(PHP3 >= 3.0.6, PHP4 )

ibase_query -- Execute a query on an InterBase database

Description

int ibase_query ([int + link_identifier, string + query [, int + bind_args]])

Performs a query on an InterBase database, returning a result + identifier for use with ibase_fetch_row(), + ibase_fetch_object(), + ibase_free_result() and + ibase_free_query(). +

Note: + Although this function supports variable binding to parameter + placeholders, there is not very much meaning using this capability + with it. For real life use and an example, see + ibase_prepare() and + ibase_execute(). +


PrevHomeNext
ibase_closeUpibase_fetch_row
\ No newline at end of file diff --git a/function.ibase-timefmt.html b/function.ibase-timefmt.html new file mode 100644 index 0000000..0fee90d --- /dev/null +++ b/function.ibase-timefmt.html @@ -0,0 +1,252 @@ +ibase_timefmt
PHP Manual
PrevNext

ibase_timefmt

(PHP3 >= 3.0.6, PHP4 )

ibase_timefmt --  + Sets the format of timestamp, date and time type columns returned from queries +

Description

int ibase_timefmt (string + format [, int + columntype])

Sets the format of timestamp, date or time type columns returned + from queries. Internally, the columns are formatted by c-function + strftime(), so refer to it's documentation regarding to the format + of the string. columntype is one of the + constants IBASE_TIMESTAMP, IBASE_DATE and IBASE_TIME. If omitted, + defaults to IBASE_TIMESTAMP for backwards compatibility. +


<?php
+    // InterBase 6 TIME-type columns will be returned in
+    // the form '05 hours 37 minutes'. 
+    ibase_timefmt("%H hours %M minutes", IBASE_TIME);
+?>
+      

+

You can also set defaults for these formats with PHP configuration + directives ibase.timestampformat, ibase.dateformat and ibase.timeformat. +

Note: + columntype was added in PHP 4.0. It has any + meaning only with InterBase version 6 and higher. +

Note: + A backwards incompatible change happened in PHP 4.0 when PHP + configuration directive ibase.timeformat was renamed to + ibase.timestampformat and directives ibase.dateformat and + ibase.timeformat were added, so that the names would match better + their functionality. +


PrevHomeNext
ibase_free_queryUpibase_num_fields
\ No newline at end of file diff --git a/function.icap-close.html b/function.icap-close.html new file mode 100644 index 0000000..06ecae9 --- /dev/null +++ b/function.icap-close.html @@ -0,0 +1,174 @@ +icap_close
PHP Manual
PrevNext

icap_close

(unknown)

icap_close -- Close an ICAP stream

Description

int icap_close (int icap_stream [, int + flags])

+ Closes the given icap stream. +


PrevHomeNext
icap_openUpicap_fetch_event
\ No newline at end of file diff --git a/function.icap-delete-event.html b/function.icap-delete-event.html new file mode 100644 index 0000000..72c5396 --- /dev/null +++ b/function.icap-delete-event.html @@ -0,0 +1,185 @@ +icap_delete_event
PHP Manual
PrevNext

icap_delete_event

(PHP4 >= 4.0b4)

icap_delete_event -- Delete an event from an ICAP calendar

Description

string icap_delete_event (int sream_id, int uid)

+ Icap_delete_event() deletes the calendar event + specified by the uid. +

Returns true. +


PrevHomeNext
icap_store_eventUpicap_snooze
\ No newline at end of file diff --git a/function.icap-fetch-event.html b/function.icap-fetch-event.html new file mode 100644 index 0000000..681808e --- /dev/null +++ b/function.icap-fetch-event.html @@ -0,0 +1,268 @@ +icap_fetch_event
PHP Manual
PrevNext

icap_fetch_event

(PHP4 >= 4.0b4)

icap_fetch_event -- Fetches an event from the calendar stream/

Description

int icap_fetch_event (int stream_id, int event_id [, int + options])

+ Icap_fetch_event() fetches an event from the + calendar stream specified by event_id. +

Returns an event object consisting of: +

  • int id - ID of that event. +

  • int public - TRUE if the event if public, FALSE if it is private. +

  • string category - Category string of the event. +

  • string title - Title string of the event. +

  • string description - Description string of the event. +

  • int alarm - number of minutes before the event to send an + alarm/reminder. +

  • object start - Object containing a datetime entry. +

  • object end - Object containing a datetime entry. +

+ All datetime entries consist of an object that contains: +

  • int year - year +

  • int month - month +

  • int mday - day of month +

  • int hour - hour +

  • int min - minutes +

  • int sec - seconds +

+


PrevHomeNext
icap_closeUpicap_list_events
\ No newline at end of file diff --git a/function.icap-list-alarms.html b/function.icap-list-alarms.html new file mode 100644 index 0000000..dc33a01 --- /dev/null +++ b/function.icap-list-alarms.html @@ -0,0 +1,223 @@ +icap_list_alarms
PHP Manual
PrevNext

icap_list_alarms

(PHP4 >= 4.0b4)

icap_list_alarms --  + Return a list of events that has an alarm triggered at the given + datetime +

Description

int icap_list_alarms (int stream_id, array date, array time)

Returns an array of event ID's that has an alarm going off at the + given datetime. +

+ Icap_list_alarms() function takes in a + datetime for a calendar stream. An array of event id's that has + an alarm should be going off at the datetime are returned. +

All datetime entries consist of an object that contains: +

  • int year - year +

  • int month - month +

  • int mday - day of month +

  • int hour - hour +

  • int min - minutes +

  • int sec - seconds +

+


PrevHomeNext
icap_snoozeUpImage functions
\ No newline at end of file diff --git a/function.icap-list-events.html b/function.icap-list-events.html new file mode 100644 index 0000000..6b6f475 --- /dev/null +++ b/function.icap-list-events.html @@ -0,0 +1,224 @@ +icap_list_events
PHP Manual
PrevNext

icap_list_events

(PHP4 >= 4.0RC1)

icap_list_events --  + Return a list of events between two given datetimes +

Description

array icap_list_events (int stream_id, int begin_date [, int + end_date])

Returns an array of event ID's that are between the two given + datetimes. +

+ Icap_list_events() function takes in a + beginning datetime and an end datetime for a calendar stream. An + array of event id's that are between the given datetimes are + returned. +

All datetime entries consist of an object that contains: +

  • int year - year +

  • int month - month +

  • int mday - day of month +

  • int hour - hour +

  • int min - minutes +

  • int sec - seconds +

+


PrevHomeNext
icap_fetch_eventUpicap_store_event
\ No newline at end of file diff --git a/function.icap-open.html b/function.icap-open.html new file mode 100644 index 0000000..a0bc23c --- /dev/null +++ b/function.icap-open.html @@ -0,0 +1,195 @@ +icap_open
PHP Manual
PrevNext

icap_open

(PHP4 >= 4.0b4)

icap_open -- Opens up an ICAP connection

Description

stream icap_open (string calendar, string username, string password, string options)

Returns an ICAP stream on success, false on error.

icap_open() opens up an ICAP connection to the + specified calendar store. If the optional + options is specified, passes the + options to that mailbox also. +


PrevHomeNext
ICAP FunctionsUpicap_close
\ No newline at end of file diff --git a/function.icap-snooze.html b/function.icap-snooze.html new file mode 100644 index 0000000..9c81ea2 --- /dev/null +++ b/function.icap-snooze.html @@ -0,0 +1,185 @@ +icap_snooze
PHP Manual
PrevNext

icap_snooze

(PHP4 >= 4.0b4)

icap_snooze -- Snooze an alarm

Description

string icap_snooze (int stream_id, int uid)

+ Icap_snooze() turns on an alarm for a + calendar event specified by the uid. +

Returns true. +


PrevHomeNext
icap_delete_eventUpicap_list_alarms
\ No newline at end of file diff --git a/function.icap-store-event.html b/function.icap-store-event.html new file mode 100644 index 0000000..126bff6 --- /dev/null +++ b/function.icap-store-event.html @@ -0,0 +1,258 @@ +icap_store_event
PHP Manual
PrevNext

icap_store_event

(PHP4 >= 4.0b4)

icap_store_event -- Store an event into an ICAP calendar

Description

string icap_store_event (int stream_id, object event)

+ Icap_store_event() Stores an event into + an ICAP calendar. An event object consists of: +

  • int public - 1 if public, 0 if private; +

  • string caegory - Category string of the event. +

  • string title - Title string of the event. +

  • string description - Description string of the event. +

  • int alarm - Number of minutes before the event to sned out an alarm. +

  • datetime start - datetime object of the start of the event. +

  • datetime end - datetime object of the end of the event. +

+

All datetime entries consist of an object that contains: +

  • int year - year +

  • int month - month +

  • int mday - day of month +

  • int hour - hour +

  • int min - minutes +

  • int sec - seconds +

+

Returns true on success and false on error. +


PrevHomeNext
icap_list_eventsUpicap_delete_event
\ No newline at end of file diff --git a/function.ifx-affected-rows.html b/function.ifx-affected-rows.html new file mode 100644 index 0000000..f6d21ef --- /dev/null +++ b/function.ifx-affected-rows.html @@ -0,0 +1,274 @@ +ifx_affected_rows
PHP Manual
PrevNext

ifx_affected_rows

(PHP3 >= 3.0.3, PHP4 )

ifx_affected_rows -- Get number of rows affected by a query

Description

int ifx_affected_rows (int result_id)

result_id is a valid result id returned by + ifx_query() or + ifx_prepare(). +

+ Returns the number of rows affected by a query associated with + result_id. +

+ For inserts, updates and deletes the number is the real number + (sqlerrd[2]) of affected rows. For selects it is an estimate + (sqlerrd[0]). Don't rely on it. The database server can never + return the actual number of rows that will be returned by a + SELECT because it has not even begun fetching them at this stage + (just after the "PREPARE" when the optimizer has determined the + query plan). +

+ Useful after ifx_prepare() to limit queries to + reasonable result sets. +

See also: ifx_num_rows() +

Example 1. Informix affected rows


$rid = ifx_prepare ("select * from emp 
+                     where name like " . $name, $connid);
+if (! $rid) {
+    ... error ...
+}
+$rowcount = ifx_affected_rows ($rid);
+if ($rowcount > 1000) {
+    printf ("Too many rows in result set (%d)\n<br>", $rowcount);
+    die ("Please restrict your query<br>\n");
+}
+     

PrevHomeNext
ifx_errormsgUpifx_getsqlca
\ No newline at end of file diff --git a/function.ifx-blobinfile-mode.html b/function.ifx-blobinfile-mode.html new file mode 100644 index 0000000..9a2041e --- /dev/null +++ b/function.ifx-blobinfile-mode.html @@ -0,0 +1,174 @@ +ifx_blobinfile_mode
PHP Manual
PrevNext

ifx_blobinfile_mode

(PHP3 >= 3.0.4, PHP4 )

ifx_blobinfile_mode -- Set the default blob mode for all select queries

Description

void ifx_blobinfile_mode (int mode)

Set the default blob mode for all select queries. Mode "0" means + save Byte-Blobs in memory, and mode "1" means save Byte-Blobs in + a file. +


PrevHomeNext
ifx_update_blobUpifx_textasvarchar
\ No newline at end of file diff --git a/function.ifx-byteasvarchar.html b/function.ifx-byteasvarchar.html new file mode 100644 index 0000000..e0b65f0 --- /dev/null +++ b/function.ifx-byteasvarchar.html @@ -0,0 +1,174 @@ +ifx_byteasvarchar
PHP Manual
PrevNext

ifx_byteasvarchar

(PHP3 >= 3.0.4, PHP4 )

ifx_byteasvarchar -- Set the default byte mode

Description

void ifx_byteasvarchar (int mode)

Sets the default byte mode for all select-queries. Mode "0" will + return a blob id, and mode "1" will return a varchar with text + content. +


PrevHomeNext
ifx_textasvarcharUpifx_nullformat
\ No newline at end of file diff --git a/function.ifx-close.html b/function.ifx-close.html new file mode 100644 index 0000000..7dd4942 --- /dev/null +++ b/function.ifx-close.html @@ -0,0 +1,257 @@ +ifx_close
PHP Manual
PrevNext

ifx_close

(PHP3 >= 3.0.3, PHP4 )

ifx_close -- Close Informix connection

Description

int ifx_close ([int + link_identifier])

Returns: always true. +

+ ifx_close() closes the link to an Informix + database that's associated with the specified link identifier. + If the link identifier isn't specified, the last opened link is + assumed. +

+ Note that this isn't usually necessary, as non-persistent open + links are automatically closed at the end of the script's + execution. +

+ ifx_close() will not close persistent links + generated by ifx_pconnect(). +

+ See also: ifx_connect(), and + ifx_pconnect(). +

Example 1. Closing a Informix connection


$conn_id = ifx_connect ("mydb@ol_srv", "itsme", "mypassword");
+... some queries and stuff ...
+ifx_close($conn_id);
+      
+


PrevHomeNext
ifx_pconnectUpifx_query
\ No newline at end of file diff --git a/function.ifx-connect.html b/function.ifx-connect.html new file mode 100644 index 0000000..c0c180d --- /dev/null +++ b/function.ifx-connect.html @@ -0,0 +1,267 @@ +ifx_connect
PHP Manual
PrevNext

ifx_connect

(PHP3 >= 3.0.3, PHP4 )

ifx_connect -- Open Informix server connection

Description

int ifx_connect ([string database [, string userid [, string password]]])

+ Returns a connection identifier on success, or FALSE on + error. +

+ ifx_connect() establishes a connection to an + Informix server. All of the arguments are optional, and if + they're missing, defaults are taken from values supplied in configuration file + (ifx.default_host for the host (Informix libraries will use + INFORMIXSERVER environment value if not defined), + ifx.default_user for user, ifx.default_password for the password + (none if not defined). +

+ In case a second call is made to + ifx_connect() with the same arguments, no + new link will be established, but instead, the link identifier of + the already opened link will be returned. +

+ The link to the server will be closed as soon as the execution of + the script ends, unless it's closed earlier by explicitly calling + ifx_close(). +

+ See also ifx_pconnect(), and + ifx_close(). +

Example 1. Connect to a Informix database


$conn_id = ifx_connect ("mydb@ol_srv1", "imyself", "mypassword");
+      
+


PrevHomeNext
Informix functionsUpifx_pconnect
\ No newline at end of file diff --git a/function.ifx-copy-blob.html b/function.ifx-copy-blob.html new file mode 100644 index 0000000..fe43ce8 --- /dev/null +++ b/function.ifx-copy-blob.html @@ -0,0 +1,181 @@ +ifx_copy_blob
PHP Manual
PrevNext

ifx_copy_blob

(PHP3 >= 3.0.4, PHP4 )

ifx_copy_blob -- Duplicates the given blob object

Description

int ifx_copy_blob (int bid)

Duplicates the given blob object. bid is + the ID of the blob object. +

Returns FALSE on error otherwise the new blob object-id. +


PrevHomeNext
ifx_create_blobUpifx_free_blob
\ No newline at end of file diff --git a/function.ifx-create-blob.html b/function.ifx-create-blob.html new file mode 100644 index 0000000..61332df --- /dev/null +++ b/function.ifx-create-blob.html @@ -0,0 +1,186 @@ +ifx_create_blob
PHP Manual
PrevNext

ifx_create_blob

(PHP3 >= 3.0.4, PHP4 )

ifx_create_blob -- Creates an blob object

Description

int ifx_create_blob (int type, int mode, string param)

Creates an blob object. +

type: 1 = TEXT, 0 = BYTE +

mode: 0 = blob-object holds the content in memory, + 1 = blob-object holds the content in file. +

param: if mode = 0: pointer to the content, + if mode = 1: pointer to the filestring. +

Return FALSE on error, otherwise the new blob object-id. +


PrevHomeNext
ifx_get_charUpifx_copy_blob
\ No newline at end of file diff --git a/function.ifx-create-char.html b/function.ifx-create-char.html new file mode 100644 index 0000000..f93d3be --- /dev/null +++ b/function.ifx-create-char.html @@ -0,0 +1,178 @@ +ifx_create_char
PHP Manual
PrevNext

ifx_create_char

(PHP3 >= 3.0.6, PHP4 )

ifx_create_char -- Creates an char object

Description

int ifx_create_char (string param)

Creates an char object. param should + be the char content. +


PrevHomeNext
ifx_free_resultUpifx_free_char
\ No newline at end of file diff --git a/function.ifx-do.html b/function.ifx-do.html new file mode 100644 index 0000000..ff7ee58 --- /dev/null +++ b/function.ifx-do.html @@ -0,0 +1,214 @@ +ifx_do
PHP Manual
PrevNext

ifx_do

(PHP3 >= 3.0.4, PHP4 )

ifx_do --  + Execute a previously prepared SQL-statement +

Description

int ifx_do (int result_id)

Returns TRUE on success, FALSE on error. +

+ Executes a previously prepared query or opens a cursor for it. +

+ Does NOT free result_id on error. +

+ Also sets the real number of + ifx_affected_rows() for non-select statements + for retrieval by ifx_affected_rows() +

See also: ifx_prepare(). There is a example. +


PrevHomeNext
ifx_prepareUpifx_error
\ No newline at end of file diff --git a/function.ifx-error.html b/function.ifx-error.html new file mode 100644 index 0000000..7cff78d --- /dev/null +++ b/function.ifx-error.html @@ -0,0 +1,236 @@ +ifx_error
PHP Manual
PrevNext

ifx_error

(PHP3 >= 3.0.3, PHP4 )

ifx_error -- Returns error code of last Informix call

Description

string ifx_error(void);

The Informix error codes (SQLSTATE & SQLCODE) formatted as + follows : +

x [SQLSTATE = aa bbb SQLCODE=cccc] +

where x = space : no error +

+ E : error +

+ N : no more data +

+ W : warning +

+ ? : undefined +

If the "x" character is anything other than space, SQLSTATE and + SQLCODE describe the error in more detail. +

See the Informix manual for the description of SQLSTATE and + SQLCODE +

Returns in a string one character describing the general results + of a statement and both SQLSTATE and SQLCODE associated with the + most recent SQL statement executed. The format of the string is + "(char) [SQLSTATE=(two digits) (three digits) SQLCODE=(one + digit)]". The first character can be ' ' + (space) (success), 'W' (the statement caused + some warning), 'E' (an error happened when + executing the statement) or 'N' (the statement + didn't return any data). +

+ See also: ifx_errormsg() +


PrevHomeNext
ifx_doUpifx_errormsg
\ No newline at end of file diff --git a/function.ifx-errormsg.html b/function.ifx-errormsg.html new file mode 100644 index 0000000..241ef03 --- /dev/null +++ b/function.ifx-errormsg.html @@ -0,0 +1,219 @@ +ifx_errormsg
PHP Manual
PrevNext

ifx_errormsg

(PHP3 >= 3.0.4, PHP4 )

ifx_errormsg -- Returns error message of last Informix call

Description

string ifx_errormsg ([int + errorcode])

Returns the Informix error message associated with the most + recent Informix error, or, when the optional + "errorcode" param is present, the error + message corresponding to "errorcode". +

+ See also: ifx_error() +


printf("%s\n<br>", ifx_errormsg(-201));
+     


PrevHomeNext
ifx_errorUpifx_affected_rows
\ No newline at end of file diff --git a/function.ifx-fetch-row.html b/function.ifx-fetch-row.html new file mode 100644 index 0000000..991ee3c --- /dev/null +++ b/function.ifx-fetch-row.html @@ -0,0 +1,294 @@ +ifx_fetch_row
PHP Manual
PrevNext

ifx_fetch_row

(PHP3 >= 3.0.3, PHP4 )

ifx_fetch_row -- Get row as enumerated array

Description

array ifx_fetch_row (int result_id [, mixed + position])

+ Returns an associative array that corresponds to the fetched row, + or false if there are no more rows. +

Blob columns are returned as integer blob id values for use in + ifx_get_blob() unless you have used + ifx_textasvarchar(1) or ifx_byteasvarchar(1), in which case blobs + are returned as string values. Returns FALSE on error +

result_id is a valid resultid returned by + ifx_query() or + ifx_prepare() (select type queries only!). +

position is an + optional parameter for a "fetch" operation on "scroll" cursors: + "NEXT", "PREVIOUS", "CURRENT", "FIRST", "LAST" or a number. If + you specify a number, an "absolute" row fetch is executed. This + parameter is optional, and only valid for SCROLL cursors. +

ifx_fetch_row() fetches one row of data from + the result associated with the specified result identifier. The + row is returned as an array. Each result column is stored in an + array offset, starting at offset 0, with the column name as key. +

Subsequent calls to ifx_fetch_row() would + return the next row in the result set, or false if there are no + more rows. +

Example 1. Informix fetch rows


$rid = ifx_prepare ("select * from emp where name like " . $name,
+                     $connid, IFX_SCROLL);
+if (! $rid) {
+    ... error ...
+}
+$rowcount = ifx_affected_rows($rid);
+if ($rowcount > 1000) {
+    printf ("Too many rows in result set (%d)\n<br>", $rowcount);
+    die ("Please restrict your query<br>\n");
+}
+if (! ifx_do ($rid)) {
+   ... error ...
+}
+$row = ifx_fetch_row ($rid, "NEXT");
+while (is_array($row)) {
+    for(reset($row); $fieldname=key($row); next($row)) {
+        $fieldvalue = $row[$fieldname];
+        printf ("%s = %s,", $fieldname, $fieldvalue);
+    }
+    printf("\n<br>");
+    $row = ifx_fetch_row ($rid, "NEXT");
+}
+ifx_free_result ($rid);
+     

PrevHomeNext
ifx_getsqlcaUpifx_htmltbl_result
\ No newline at end of file diff --git a/function.ifx-fieldproperties.html b/function.ifx-fieldproperties.html new file mode 100644 index 0000000..b6c3d40 --- /dev/null +++ b/function.ifx-fieldproperties.html @@ -0,0 +1,227 @@ +ifx_fieldproperties
PHP Manual
PrevNext

ifx_fieldproperties

(PHP3 >= 3.0.3, PHP4 )

ifx_fieldproperties -- List of SQL fieldproperties

Description

array ifx_fieldproperties (int result_id)

Returns an associative array with fieldnames as key and the SQL + fieldproperties as data for a query with + result_id. Returns FALSE on error. +

Returns the Informix SQL fieldproperies of every field in the + query as an associative array. Properties are encoded as: + "SQLTYPE;length;precision;scale;ISNULLABLE" where SQLTYPE = the + Informix type like "SQLVCHAR" etc. and ISNULLABLE = "Y" or "N". +

Example 1. Informix SQL fieldproperties


$properties = ifx_fieldproperties ($resultid);
+if (! isset($properties)) {
+  ... error ...
+}
+for ($i = 0; $i < count($properties); $i++) {
+    $fname = key ($properties);
+    printf ("%s:\t type =  %s\n", $fname, $properties[$fname]);
+    next ($properties);
+}
+     

PrevHomeNext
ifx_fieldtypesUpifx_num_fields
\ No newline at end of file diff --git a/function.ifx-fieldtypes.html b/function.ifx-fieldtypes.html new file mode 100644 index 0000000..c730ff8 --- /dev/null +++ b/function.ifx-fieldtypes.html @@ -0,0 +1,221 @@ +ifx_fieldtypes
PHP Manual
PrevNext

ifx_fieldtypes

(PHP3 >= 3.0.3, PHP4 )

ifx_fieldtypes -- List of Informix SQL fields

Description

array ifx_fieldtypes (int result_id)

Returns an associative array with fieldnames as key and the SQL + fieldtypes as data for query with + result_id. Returns FALSE on error. +

Example 1. Fielnames and SQL fieldtypes


$types = ifx_fieldtypes ($resultid);
+if (! isset ($types)) {
+  ... error ...
+}
+for ($i = 0; $i < count($types); $i++) {
+    $fname = key($types);
+    printf("%s :\t type =  %s\n", $fname, $types[$fname]);
+    next($types);
+}
+     

PrevHomeNext
ifx_htmltbl_resultUpifx_fieldproperties
\ No newline at end of file diff --git a/function.ifx-free-blob.html b/function.ifx-free-blob.html new file mode 100644 index 0000000..43053d3 --- /dev/null +++ b/function.ifx-free-blob.html @@ -0,0 +1,179 @@ +ifx_free_blob
PHP Manual
PrevNext

ifx_free_blob

(PHP3 >= 3.0.4, PHP4 )

ifx_free_blob -- Deletes the blob object

Description

int ifx_free_blob (int bid)

Deletes the blobobject for the given blob object-id + bid. Returns FALSE on error otherwise + TRUE. +


PrevHomeNext
ifx_copy_blobUpifx_get_blob
\ No newline at end of file diff --git a/function.ifx-free-char.html b/function.ifx-free-char.html new file mode 100644 index 0000000..ce3a7e3 --- /dev/null +++ b/function.ifx-free-char.html @@ -0,0 +1,179 @@ +ifx_free_char
PHP Manual
PrevNext

ifx_free_char

(PHP3 >= 3.0.6, PHP4 )

ifx_free_char -- Deletes the char object

Description

int ifx_free_char (int bid)

Deletes the charobject for the given char object-id + bid. Returns FALSE on error otherwise + TRUE. +


PrevHomeNext
ifx_create_charUpifx_update_char
\ No newline at end of file diff --git a/function.ifx-free-result.html b/function.ifx-free-result.html new file mode 100644 index 0000000..67e63c7 --- /dev/null +++ b/function.ifx-free-result.html @@ -0,0 +1,178 @@ +ifx_free_result
PHP Manual
PrevNext

ifx_free_result

(PHP3 >= 3.0.3, PHP4 )

ifx_free_result -- Releases resources for the query

Description

int ifx_free_result (int result_id)

Releases resources for the query associated with + result_id. Returns FALSE on error. +


PrevHomeNext
ifx_num_rowsUpifx_create_char
\ No newline at end of file diff --git a/function.ifx-get-blob.html b/function.ifx-get-blob.html new file mode 100644 index 0000000..43a6634 --- /dev/null +++ b/function.ifx-get-blob.html @@ -0,0 +1,178 @@ +ifx_get_blob
PHP Manual
PrevNext

ifx_get_blob

(PHP3 >= 3.0.4, PHP4 )

ifx_get_blob -- Return the content of a blob object

Description

int ifx_get_blob (int bid)

Returns the content of the blob object for the given blob + object-id bid. +


PrevHomeNext
ifx_free_blobUpifx_update_blob
\ No newline at end of file diff --git a/function.ifx-get-char.html b/function.ifx-get-char.html new file mode 100644 index 0000000..471a3a5 --- /dev/null +++ b/function.ifx-get-char.html @@ -0,0 +1,178 @@ +ifx_get_char
PHP Manual
PrevNext

ifx_get_char

(PHP3 >= 3.0.6, PHP4 )

ifx_get_char -- Return the content of the char object

Description

int ifx_get_char (int bid)

Returns the content of the char object for the given char + object-id bid. +


PrevHomeNext
ifx_update_charUpifx_create_blob
\ No newline at end of file diff --git a/function.ifx-getsqlca.html b/function.ifx-getsqlca.html new file mode 100644 index 0000000..4b6d00e --- /dev/null +++ b/function.ifx-getsqlca.html @@ -0,0 +1,258 @@ +ifx_getsqlca
PHP Manual
PrevNext

ifx_getsqlca

(PHP3 >= 3.0.8, PHP4 )

ifx_getsqlca --  + Get the contents of sqlca.sqlerrd[0..5] after a query +

Description

array ifx_getsqlca (int result_id)

result_id is a valid result id returned by + ifx_query() or + ifx_prepare(). +

+ Returns a pseudo-row (assiociative array) with sqlca.sqlerrd[0] + ... sqlca.sqlerrd[5] after the query associated with + result_id. +

+ For inserts, updates and deletes the values returned are those as + set by the server after executing the query. This gives access to + the number of affected rows and the serial insert value. For + SELECTs the values are those saved after the PREPARE + statement. This gives access to the *estimated* number of + affected rows. The use of this function saves the overhead of + executing a "select dbinfo('sqlca.sqlerrdx')" query, as it + retrieves the values that were saved by the ifx driver at the + appropriate moment. +

Example 1. Retrieve Informix sqlca.sqlerrd[x] values


/* assume the first column of 'sometable' is a serial */
+$qid = ifx_query("insert into sometable 
+                  values (0, '2nd column', 'another column') ", $connid);
+if (! $qid) {
+    ... error ...
+}
+$sqlca = ifx_getsqlca ($qid);
+$serial_value = $sqlca["sqlerrd1"];
+echo "The serial value of the inserted row is : " . $serial_value<br>\n"; 
+     

PrevHomeNext
ifx_affected_rowsUpifx_fetch_row
\ No newline at end of file diff --git a/function.ifx-htmltbl-result.html b/function.ifx-htmltbl-result.html new file mode 100644 index 0000000..8a9b914 --- /dev/null +++ b/function.ifx-htmltbl-result.html @@ -0,0 +1,235 @@ +ifx_htmltbl_result
PHP Manual
PrevNext

ifx_htmltbl_result

(PHP3 >= 3.0.3, PHP4 )

ifx_htmltbl_result --  + Formats all rows of a query into a HTML table +

Description

int ifx_htmltbl_result (int result_id [, string + html_table_options])

Returns the number of rows fetched or FALSE on error. +

Formats all rows of the result_id query + into a html table. The optional second argument is a string of + <table> tag options +

Example 1. Informix results as HTML table


$rid = ifx_prepare ("select * from emp where name like " . $name,
+                     $connid, IFX_SCROLL);
+if (! $rid) {
+   ... error ...
+}
+$rowcount = ifx_affected_rows ($rid);
+if ($rowcount > 1000) {
+    printf ("Too many rows in result set (%d)\n<br>", $rowcount);
+    die ("Please restrict your query<br>\n");
+}
+if (! ifx_do($rid) {
+  ... error ...
+}
+
+ifx_htmltbl_result ($rid, "border=\"2\"");
+
+ifx_free_result($rid);
+     

PrevHomeNext
ifx_fetch_rowUpifx_fieldtypes
\ No newline at end of file diff --git a/function.ifx-nullformat.html b/function.ifx-nullformat.html new file mode 100644 index 0000000..c442210 --- /dev/null +++ b/function.ifx-nullformat.html @@ -0,0 +1,175 @@ +ifx_nullformat
PHP Manual
PrevNext

ifx_nullformat

(PHP3 >= 3.0.4, PHP4 )

ifx_nullformat --  + Sets the default return value on a fetch row +

Description

void ifx_nullformat (int mode)

Sets the default return value of a NULL-value on a fetch row. + Mode "0" returns "", and mode "1" returns "NULL". +


PrevHomeNext
ifx_byteasvarcharUpifxus_create_slob
\ No newline at end of file diff --git a/function.ifx-num-fields.html b/function.ifx-num-fields.html new file mode 100644 index 0000000..bf15e82 --- /dev/null +++ b/function.ifx-num-fields.html @@ -0,0 +1,182 @@ +ifx_num_fields
PHP Manual
PrevNext

ifx_num_fields

(PHP3 >= 3.0.3, PHP4 )

ifx_num_fields -- Returns the number of columns in the query

Description

int ifx_num_fields (int result_id)

Returns the number of columns in query for + result_id or FALSE on error +

After preparing or executing a query, this call gives you the + number of columns in the query. +


PrevHomeNext
ifx_fieldpropertiesUpifx_num_rows
\ No newline at end of file diff --git a/function.ifx-num-rows.html b/function.ifx-num-rows.html new file mode 100644 index 0000000..afed425 --- /dev/null +++ b/function.ifx-num-rows.html @@ -0,0 +1,192 @@ +ifx_num_rows
PHP Manual
PrevNext

ifx_num_rows

(PHP3 >= 3.0.3, PHP4 )

ifx_num_rows -- Count the rows already fetched a query

Description

int ifx_num_rows (int result_id)

Gives the number of rows fetched so far for a query with + result_id after a + ifx_query() or ifx_do() + query. +


PrevHomeNext
ifx_num_fieldsUpifx_free_result
\ No newline at end of file diff --git a/function.ifx-pconnect.html b/function.ifx-pconnect.html new file mode 100644 index 0000000..6098e41 --- /dev/null +++ b/function.ifx-pconnect.html @@ -0,0 +1,234 @@ +ifx_pconnect
PHP Manual
PrevNext

ifx_pconnect

(PHP3 >= 3.0.3, PHP4 )

ifx_pconnect -- Open persistent Informix connection

Description

int ifx_pconnect ([string + database [, string + userid [, string + password]]])

+ Returns: A positive Informix persistent link identifier on success, + or false on error +

ifx_pconnect() acts very much like + ifx_connect() with two major differences. +

+ This function behaves exactly like ifx_connect() + when PHP is not running as an Apache module. + First, when connecting, the function would first try to find a + (persistent) link that's already open with the same host, + username and password. If one is found, an identifier for it + will be returned instead of opening a new connection. +

+ Second, the connection to the SQL server will not be closed when + the execution of the script ends. Instead, the link will remain + open for future use (ifx_close() will not + close links established by ifx_pconnect()). +

+ This type of links is therefore called 'persistent'. +

See also: ifx_connect(). +


PrevHomeNext
ifx_connectUpifx_close
\ No newline at end of file diff --git a/function.ifx-prepare.html b/function.ifx-prepare.html new file mode 100644 index 0000000..fc63808 --- /dev/null +++ b/function.ifx-prepare.html @@ -0,0 +1,265 @@ +ifx_prepare
PHP Manual
PrevNext

ifx_prepare

(PHP3 >= 3.0.4, PHP4 )

ifx_prepare -- Prepare an SQL-statement for execution

Description

int ifx_prepare (string query, int conn_id [, int + cursor_def, mixed blobidarray])

Returns a integer result_id for use by + ifx_do(). Sets + affected_rows for retrieval by the + ifx_affected_rows() function. +

Prepares query on connection + conn_id. For "select-type" queries a + cursor is declared and opened. The optional + cursor_type parameter allows you to make + this a "scroll" and/or "hold" cursor. It's a bitmask and can be + either IFX_SCROLL, IFX_HOLD, or both or'ed together. +

+ For either query type the estimated number of affected rows is + saved for retrieval by ifx_affected_rows(). +

If you have BLOB (BYTE or TEXT) columns in the query, you can add + a blobidarray parameter containing the + corresponding "blob ids", and you should replace those columns + with a "?" in the query text. +

If the contents of the TEXT (or BYTE) column allow it, you can + also use "ifx_textasvarchar(1)" and "ifx_byteasvarchar(1)". This + allows you to treat TEXT (or BYTE) columns just as if they were + ordinary (but long) VARCHAR columns for select queries, and you + don't need to bother with blob id's. +

With ifx_textasvarchar(0) or ifx_byteasvarchar(0) (the default + situation), select queries will return BLOB columns as blob id's + (integer value). You can get the value of the blob as a string + or file with the blob functions (see below). +

See also: ifx_do(). +


PrevHomeNext
ifx_queryUpifx_do
\ No newline at end of file diff --git a/function.ifx-query.html b/function.ifx-query.html new file mode 100644 index 0000000..c7b9d9f --- /dev/null +++ b/function.ifx-query.html @@ -0,0 +1,371 @@ +ifx_query
PHP Manual
PrevNext

ifx_query

(PHP3 >= 3.0.3, PHP4 )

ifx_query -- Send Informix query

Description

int ifx_query (string query [, int + link_identifier [, int + cursor_type [, mixed + blobidarray]]])

+ Returns: A positive Informix result identifier on success, or + false on error. +

+ A "result_id" resource used by other functions to retrieve the + query results. Sets "affected_rows" for retrieval by the + ifx_affected_rows() function. +

+ ifx_query() sends a query to the currently + active database on the server that's associated with the + specified link identifier. If the link identifier isn't + specified, the last opened link is assumed. If no link is open, + the function tries to establish a link as if + ifx_connect() was called, and use it. +

Executes query on connection + conn_id. For "select-type" queries a + cursor is declared and opened. The optional + cursor_type parameter allows you to make + this a "scroll" and/or "hold" cursor. It's a bitmask and can be + either IFX_SCROLL, IFX_HOLD, or both or'ed together. Non-select + queries are "execute immediate". IFX_SCROLL and IFX_HOLD are + symbolic constants and as such shouldn't be between quotes. I you + omit this parameter the cursor is a normal sequential cursor. +

For either query type the number of (estimated or real) affected + rows is saved for retrieval by + ifx_affected_rows(). +

If you have BLOB (BYTE or TEXT) columns in an update query, you + can add a blobidarray parameter containing + the corresponding "blob ids", and you should replace those + columns with a "?" in the query text. +

If the contents of the TEXT (or BYTE) column allow it, you can + also use "ifx_textasvarchar(1)" and "ifx_byteasvarchar(1)". This + allows you to treat TEXT (or BYTE) columns just as if they were + ordinary (but long) VARCHAR columns for select queries, and you + don't need to bother with blob id's. +

With ifx_textasvarchar(0) or ifx_byteasvarchar(0) (the default + situation), select queries will return BLOB columns as blob id's + (integer value). You can get the value of the blob as a string + or file with the blob functions (see below). +

See also: ifx_connect(). +

Example 1. + Show all rows of the "orders" table as a html table +


ifx_textasvarchar(1);      // use "text mode" for blobs
+$res_id = ifx_query("select * from orders", $conn_id);
+if (! $res_id) {
+    printf("Can't select orders : %s\n<br>%s<br>\n", ifx_error());
+    ifx_errormsg();
+    die;
+}
+ifx_htmltbl_result($res_id, "border=\"1\"");
+ifx_free_result($res_id);
+      
+

Example 2. Insert some values into the "catalog" table


                      // create blob id's for a byte and text column
+$textid = ifx_create_blob(0, 0, "Text column in memory");
+$byteid = ifx_create_blob(1, 0, "Byte column in memory");
+                      // store blob id's in a blobid array
+$blobidarray[] = $textid;
+$blobidarray[] = $byteid;
+                      // launch query
+$query = "insert into catalog (stock_num, manu_code, " .
+         "cat_descr,cat_picture) values(1,'HRO',?,?)";
+$res_id = ifx_query($query, $conn_id, $blobidarray);
+if (! $res_id) {
+  ... error ...
+}
+                     // free result id
+ifx_free_result($res_id);
+      
+


PrevHomeNext
ifx_closeUpifx_prepare
\ No newline at end of file diff --git a/function.ifx-textasvarchar.html b/function.ifx-textasvarchar.html new file mode 100644 index 0000000..855ff6a --- /dev/null +++ b/function.ifx-textasvarchar.html @@ -0,0 +1,174 @@ +ifx_textasvarchar
PHP Manual
PrevNext

ifx_textasvarchar

(PHP3 >= 3.0.4, PHP4 )

ifx_textasvarchar -- Set the default text mode

Description

void ifx_textasvarchar (int mode)

Sets the default text mode for all select-queries. Mode "0" will + return a blob id, and mode "1" will return a varchar with text + content. +


PrevHomeNext
ifx_blobinfile_modeUpifx_byteasvarchar
\ No newline at end of file diff --git a/function.ifx-update-blob.html b/function.ifx-update-blob.html new file mode 100644 index 0000000..c4c6794 --- /dev/null +++ b/function.ifx-update-blob.html @@ -0,0 +1,184 @@ +ifx_update_blob
PHP Manual
PrevNext

ifx_update_blob

(PHP3 >= 3.0.4, PHP4 )

ifx_update_blob -- Updates the content of the blob object

Description

ifx_update_blob (int bid, string content)

Updates the content of the blob object for the given blob object + bid. content is a + string with new data. Returns FALSE on error otherwise TRUE. +


PrevHomeNext
ifx_get_blobUpifx_blobinfile_mode
\ No newline at end of file diff --git a/function.ifx-update-char.html b/function.ifx-update-char.html new file mode 100644 index 0000000..e79681d --- /dev/null +++ b/function.ifx-update-char.html @@ -0,0 +1,184 @@ +ifx_update_char
PHP Manual
PrevNext

ifx_update_char

(PHP3 >= 3.0.6, PHP4 )

ifx_update_char -- Updates the content of the char object

Description

int ifx_update_char (int bid, string content)

Updates the content of the char object for the given char object + bid. content is a + string with new data. Returns FALSE on error otherwise TRUE. +


PrevHomeNext
ifx_free_charUpifx_get_char
\ No newline at end of file diff --git a/function.ifxus-close-slob.html b/function.ifxus-close-slob.html new file mode 100644 index 0000000..9afcee9 --- /dev/null +++ b/function.ifxus-close-slob.html @@ -0,0 +1,179 @@ +ifxus_close_slob
PHP Manual
PrevNext

ifxus_close_slob

(PHP3 >= 3.0.4, PHP4 )

ifxus_close_slob -- Deletes the slob object

Description

int ifxus_close_slob (int bid)

Deletes the slob object on the given slob object-id + bid. Return FALSE on error otherwise + TRUE. +


PrevHomeNext
ifxus_free_slobUpifxus_open_slob
\ No newline at end of file diff --git a/function.ifxus-create-slob.html b/function.ifxus-create-slob.html new file mode 100644 index 0000000..ca6eb24 --- /dev/null +++ b/function.ifxus-create-slob.html @@ -0,0 +1,176 @@ +ifxus_create_slob
PHP Manual
PrevNext

ifxus_create_slob

(PHP3 >= 3.0.4, PHP4 )

ifxus_create_slob -- Creates an slob object and opens it

Description

int ifxus_create_slob (int mode)

Creates an slob object and opens it. Modes: 1 = LO_RDONLY, 2 = + LO_WRONLY, 4 = LO_APPEND, 8 = LO_RDWR, 16 = LO_BUFFER, 32 = + LO_NOBUFFER -> or-mask. You can also use constants named + IFX_LO_RDONLY, IFX_LO_WRONLY etc. Return FALSE on error otherwise + the new slob object-id. +


PrevHomeNext
ifx_nullformatUpifxus_free_slob
\ No newline at end of file diff --git a/function.ifxus-free-slob.html b/function.ifxus-free-slob.html new file mode 100644 index 0000000..48e3881 --- /dev/null +++ b/function.ifxus-free-slob.html @@ -0,0 +1,178 @@ +ifxus_free_slob
PHP Manual
PrevNext

ifxus_free_slob

(PHP3 >= 3.0.4, PHP4 )

ifxus_free_slob -- Deletes the slob object

Description

int ifxus_free_slob (int bid)

Deletes the slob object. bid is the Id of + the slob object. Returns FALSE on error otherwise TRUE. +


PrevHomeNext
ifxus_create_slobUpifxus_close_slob
\ No newline at end of file diff --git a/function.ifxus-open-slob.html b/function.ifxus-open-slob.html new file mode 100644 index 0000000..c3ccda6 --- /dev/null +++ b/function.ifxus-open-slob.html @@ -0,0 +1,181 @@ +ifxus_open_slob
PHP Manual
PrevNext

ifxus_open_slob

(PHP3 >= 3.0.4, PHP4 )

ifxus_open_slob -- Opens an slob object

Description

int ifxus_open_slob (long bid, int mode)

Opens an slob object. bid should be an + existing slob id. Modes: 1 = LO_RDONLY, 2 = LO_WRONLY, 4 = + LO_APPEND, 8 = LO_RDWR, 16 = LO_BUFFER, 32 = LO_NOBUFFER -> + or-mask. Returns FALSE on error otherwise the new slob + object-id. +


PrevHomeNext
ifxus_close_slobUpifxus_tell_slob
\ No newline at end of file diff --git a/function.ifxus-read-slob.html b/function.ifxus-read-slob.html new file mode 100644 index 0000000..a412fab --- /dev/null +++ b/function.ifxus-read-slob.html @@ -0,0 +1,184 @@ +ifxus_read_slob
PHP Manual
PrevNext

ifxus_read_slob

(PHP3 >= 3.0.4, PHP4 )

ifxus_read_slob -- Reads nbytes of the slob object

Description

int ifxus_read_slob (long bid, long nbytes)

Reads nbytes of the slob object. bid is a + existing slob id and nbytes is the number + of bytes zu read. Return FALSE on error otherwise the string. +


PrevHomeNext
ifxus_seek_slobUpifxus_write_slob
\ No newline at end of file diff --git a/function.ifxus-seek-slob.html b/function.ifxus-seek-slob.html new file mode 100644 index 0000000..cc7f7f5 --- /dev/null +++ b/function.ifxus-seek-slob.html @@ -0,0 +1,186 @@ +ifxus_seek_slob
PHP Manual
PrevNext

ifxus_seek_slob

(PHP3 >= 3.0.4, PHP4 )

ifxus_seek_slob -- Sets the current file or seek position

Description

int ifxus_seek_blob (long bid, int mode, long offset)

Sets the current file or seek position of an open slob object. + bid should be an existing slob id. Modes: + 0 = LO_SEEK_SET, 1 = LO_SEEK_CUR, 2 = LO_SEEK_END and + offset is an byte offset. Return FALSE on + error otherwise the seek position. +


PrevHomeNext
ifxus_tell_slobUpifxus_read_slob
\ No newline at end of file diff --git a/function.ifxus-tell-slob.html b/function.ifxus-tell-slob.html new file mode 100644 index 0000000..2b8c3f9 --- /dev/null +++ b/function.ifxus-tell-slob.html @@ -0,0 +1,179 @@ +ifxus_tell_slob
PHP Manual
PrevNext

ifxus_tell_slob

(PHP3 >= 3.0.4, PHP4 )

ifxus_tell_slob -- Returns the current file or seek position

Description

int ifxus_tell_slob (long bid)

Returns the current file or seek position of an open slob object + bid should be an existing slob id. Return + FALSE on error otherwise the seek position. +


PrevHomeNext
ifxus_open_slobUpifxus_seek_slob
\ No newline at end of file diff --git a/function.ifxus-write-slob.html b/function.ifxus-write-slob.html new file mode 100644 index 0000000..f56d49a --- /dev/null +++ b/function.ifxus-write-slob.html @@ -0,0 +1,184 @@ +ifxus_write_slob
PHP Manual
PrevNext

ifxus_write_slob

(PHP3 >= 3.0.4, PHP4 )

ifxus_write_slob -- Writes a string into the slob object

Description

int ifxus_write_slob (long bid, string content)

Writes a string into the slob object. bid + is a existing slob id and content the + content to write. Return FALSE on error otherwise bytes written. +


PrevHomeNext
ifxus_read_slobUpInterBase functions
\ No newline at end of file diff --git a/function.ignore-user-abort.html b/function.ignore-user-abort.html new file mode 100644 index 0000000..0570f7c --- /dev/null +++ b/function.ignore-user-abort.html @@ -0,0 +1,186 @@ +ignore_user_abort
PHP Manual
PrevNext

ignore_user_abort

(PHP3 >= 3.0.7, PHP4 >= 4.0b4)

ignore_user_abort --  + Set whether a client disconnect should abort script execution +

Description

int ignore_user_abort ([int + setting])

This function sets whether a client disconnect should cause a + script to be aborted. It will return the previous setting and + can be called without an argument to not change the current + setting and only return the current setting. See the Connection Handling + section in the Features chapter + for a complete description of connection handling in PHP. +


PrevHomeNext
highlight_stringUpiptcparse
\ No newline at end of file diff --git a/function.imagearc.html b/function.imagearc.html new file mode 100644 index 0000000..aa41f75 --- /dev/null +++ b/function.imagearc.html @@ -0,0 +1,211 @@ +ImageArc
PHP Manual
PrevNext

ImageArc

(PHP3 , PHP4 )

ImageArc -- Draw a partial ellipse

Description

int imagearc (int im, int cx, int cy, int w, int h, int s, int e, int col)

ImageArc() draws a partial ellipse centered at + cx, cy (top left is + 0, 0) in the image represented by im. W + and h specifies the ellipse's width and + height respectively while the start and end points are specified + in degrees indicated by the s and + e. arguments. +


PrevHomeNext
GetImageSizeUpImageChar
\ No newline at end of file diff --git a/function.imagechar.html b/function.imagechar.html new file mode 100644 index 0000000..e27ae08 --- /dev/null +++ b/function.imagechar.html @@ -0,0 +1,215 @@ +ImageChar
PHP Manual
PrevNext

ImageChar

(PHP3 , PHP4 )

ImageChar -- Draw a character horizontally

Description

int imagechar (int im, int font, int x, int y, string c, int col)

ImageChar() draws the first character of + c in the image identified by + id with its upper-left at + x,y (top left is 0, + 0) with the color col. If font is 1, 2, 3, + 4 or 5, a built-in font is used (with higher numbers + corresponding to larger fonts). +

See also imageloadfont(). +


PrevHomeNext
ImageArcUpImageCharUp
\ No newline at end of file diff --git a/function.imagecharup.html b/function.imagecharup.html new file mode 100644 index 0000000..4583e95 --- /dev/null +++ b/function.imagecharup.html @@ -0,0 +1,216 @@ +ImageCharUp
PHP Manual
PrevNext

ImageCharUp

(PHP3 , PHP4 )

ImageCharUp -- Draw a character vertically

Description

int imagecharup (int im, int font, int x, int y, string c, int col)

+ ImageCharUp() draws the character + c vertically in the image identified by + im at coordinates + x, y (top left is + 0, 0) with the color col. If font is 1, + 2, 3, 4 or 5, a built-in font is used. +

+ See also imageloadfont(). +


PrevHomeNext
ImageCharUpImageColorAllocate
\ No newline at end of file diff --git a/function.imagecolorallocate.html b/function.imagecolorallocate.html new file mode 100644 index 0000000..5d74f59 --- /dev/null +++ b/function.imagecolorallocate.html @@ -0,0 +1,228 @@ +ImageColorAllocate
PHP Manual
PrevNext

ImageColorAllocate

(PHP3 , PHP4 )

ImageColorAllocate -- Allocate a color for an image

Description

int imagecolorallocate (int im, int red, int green, int blue)

ImageColorAllocate() returns a color + identifier representing the color composed of the given + RGB components. The im + argument is the return from the imagecreate() + function. ImageColorAllocate() must be called + to create each color that is to be used in the image represented + by im. +


$white = ImageColorAllocate ($im, 255, 255, 255);
+$black = ImageColorAllocate ($im, 0, 0, 0);
+      

+


PrevHomeNext
ImageCharUpUpImageColorDeAllocate
\ No newline at end of file diff --git a/function.imagecolorat.html b/function.imagecolorat.html new file mode 100644 index 0000000..3eeda0a --- /dev/null +++ b/function.imagecolorat.html @@ -0,0 +1,189 @@ +ImageColorAt
PHP Manual
PrevNext

ImageColorAt

(PHP3 , PHP4 )

ImageColorAt -- Get the index of the color of a pixel

Description

int imagecolorat (int im, int x, int y)

Returns the index of the color of the pixel at the + specified location in the image. +

See also imagecolorset() and + imagecolorsforindex(). +


PrevHomeNext
ImageColorDeAllocateUpImageColorClosest
\ No newline at end of file diff --git a/function.imagecolorclosest.html b/function.imagecolorclosest.html new file mode 100644 index 0000000..ebfe737 --- /dev/null +++ b/function.imagecolorclosest.html @@ -0,0 +1,195 @@ +ImageColorClosest
PHP Manual
PrevNext

ImageColorClosest

(PHP3 , PHP4 )

ImageColorClosest --  + Get the index of the closest color to the specified color +

Description

int imagecolorclosest (int im, int red, int green, int blue)

Returns the index of the color in the palette of the image which + is "closest" to the specified RGB value. +

The "distance" between the desired color and each color in the + palette is calculated as if the RGB values + represented points in three-dimensional space. +

See also imagecolorexact(). +


PrevHomeNext
ImageColorAtUpImageColorExact
\ No newline at end of file diff --git a/function.imagecolordeallocate.html b/function.imagecolordeallocate.html new file mode 100644 index 0000000..ee05073 --- /dev/null +++ b/function.imagecolordeallocate.html @@ -0,0 +1,211 @@ +ImageColorDeAllocate
PHP Manual
PrevNext

ImageColorDeAllocate

(PHP3 >= 3.0.6, PHP4 )

ImageColorDeAllocate --  + De-allocate a color for an image +

Description

int + imagecolordeallocate + (int + im, int + index)

The ImageColorDeAllocate() function + de-allocates a color previously allocated with the + ImageColorAllocate() function. +


$white = ImageColorAllocate($im, 255, 255, 255);
+ImageColorDeAllocate($im, $white);
+      

+


PrevHomeNext
ImageColorAllocateUpImageColorAt
\ No newline at end of file diff --git a/function.imagecolorexact.html b/function.imagecolorexact.html new file mode 100644 index 0000000..607e051 --- /dev/null +++ b/function.imagecolorexact.html @@ -0,0 +1,186 @@ +ImageColorExact
PHP Manual
PrevNext

ImageColorExact

(PHP3 , PHP4 )

ImageColorExact -- Get the index of the specified color

Description

int imagecolorexact (int im, int red, int green, int blue)

Returns the index of the specified color in the palette of the + image. +

If the color does not exist in the image's palette, -1 is + returned. +

See also imagecolorclosest(). +


PrevHomeNext
ImageColorClosestUpImageColorResolve
\ No newline at end of file diff --git a/function.imagecolorresolve.html b/function.imagecolorresolve.html new file mode 100644 index 0000000..0b19e9b --- /dev/null +++ b/function.imagecolorresolve.html @@ -0,0 +1,186 @@ +ImageColorResolve
PHP Manual
PrevNext

ImageColorResolve

(PHP3 >= 3.0.2, PHP4 )

ImageColorResolve --  + Get the index of the specified color or its closest possible + alternative +

Description

int imagecolorresolve (int im, int red, int green, int blue)

This function is guaranteed to return a color index for a + requested color, either the exact color or the closest possible + alternative. +

See also imagecolorclosest(). +


PrevHomeNext
ImageColorExactUpImageGammaCorrect
\ No newline at end of file diff --git a/function.imagecolorset.html b/function.imagecolorset.html new file mode 100644 index 0000000..ca6c249 --- /dev/null +++ b/function.imagecolorset.html @@ -0,0 +1,186 @@ +ImageColorSet
PHP Manual
PrevNext

ImageColorSet

(PHP3 , PHP4 )

ImageColorSet --  + Set the color for the specified palette index +

Description

bool imagecolorset (int im, int index, int red, int green, int blue)

This sets the specified index in the palette to the specified + color. This is useful for creating flood-fill-like effects in + paletted images without the overhead of performing the actual + flood-fill. +

See also imagecolorat(). +


PrevHomeNext
ImageGammaCorrectUpImageColorsForIndex
\ No newline at end of file diff --git a/function.imagecolorsforindex.html b/function.imagecolorsforindex.html new file mode 100644 index 0000000..99c3451 --- /dev/null +++ b/function.imagecolorsforindex.html @@ -0,0 +1,190 @@ +ImageColorsForIndex
PHP Manual
PrevNext

ImageColorsForIndex

(PHP3 , PHP4 )

ImageColorsForIndex -- Get the colors for an index

Description

array imagecolorsforindex (int im, int index)

This returns an associative array with red, green, and blue keys + that contain the appropriate values for the specified color + index. +

See also imagecolorat() and + imagecolorexact(). +


PrevHomeNext
ImageColorSetUpImageColorsTotal
\ No newline at end of file diff --git a/function.imagecolorstotal.html b/function.imagecolorstotal.html new file mode 100644 index 0000000..4b2e53f --- /dev/null +++ b/function.imagecolorstotal.html @@ -0,0 +1,191 @@ +ImageColorsTotal
PHP Manual
PrevNext

ImageColorsTotal

(PHP3 , PHP4 )

ImageColorsTotal --  + Find out the number of colors in an image's palette +

Description

int imagecolorstotal (int im)

This returns the number of colors in the specified image's + palette. +

See also imagecolorat() and + imagecolorsforindex(). +


PrevHomeNext
ImageColorsForIndexUpImageColorTransparent
\ No newline at end of file diff --git a/function.imagecolortransparent.html b/function.imagecolortransparent.html new file mode 100644 index 0000000..344132a --- /dev/null +++ b/function.imagecolortransparent.html @@ -0,0 +1,211 @@ +ImageColorTransparent
PHP Manual
PrevNext

ImageColorTransparent

(PHP3 , PHP4 )

ImageColorTransparent -- Define a color as transparent

Description

int imagecolortransparent (int im [, int + col])

ImageColorTransparent() sets the transparent + color in the im image to + col. Im is the + image identifier returned by ImageCreate() and + col is a color identifier returned by + ImageColorAllocate(). +

The identifier of the new (or current, if none is specified) + transparent color is returned. +


PrevHomeNext
ImageColorsTotalUpImageCopy
\ No newline at end of file diff --git a/function.imagecopy.html b/function.imagecopy.html new file mode 100644 index 0000000..58f2441 --- /dev/null +++ b/function.imagecopy.html @@ -0,0 +1,230 @@ +ImageCopy
PHP Manual
PrevNext

ImageCopy

(PHP3 >= 3.0.6, PHP4 )

ImageCopy --  + Copy part of an image +

Description

int + ImageCopy + (int + dst_im, int + src_im, int + dst_x, int + dst_y, int + src_x, int + src_y, int + src_w, int + src_h)

Copy a part of src_im onto + dst_im starting at the x,y coordinates + src_x, src_y with + a width of src_w and a height of + src_h. The portion defined will be copied + onto the x,y coordinates, dst_x and + dst_y. +


PrevHomeNext
ImageColorTransparentUpImageCopyResized
\ No newline at end of file diff --git a/function.imagecopyresized.html b/function.imagecopyresized.html new file mode 100644 index 0000000..ce7aa5a --- /dev/null +++ b/function.imagecopyresized.html @@ -0,0 +1,205 @@ +ImageCopyResized
PHP Manual
PrevNext

ImageCopyResized

(PHP3 , PHP4 )

ImageCopyResized -- Copy and resize part of an image

Description

int imagecopyresized (int dst_im, int src_im, int dstX, int dstY, int srcX, int srcY, int dstW, int dstH, int srcW, int srcH)

ImageCopyResized() copies a rectangular + portion of one image to another image. + Dst_im is the destination image, + src_im is the source image identifier. If + the source and destination coordinates and width and heights + differ, appropriate stretching or shrinking of the image fragment + will be performed. The coordinates refer to the upper left + corner. This function can be used to copy regions within the + same image (if dst_im is the same as + src_im) but if the regions overlap the + results will be unpredictable. +


PrevHomeNext
ImageCopyUpImageCreate
\ No newline at end of file diff --git a/function.imagecreate.html b/function.imagecreate.html new file mode 100644 index 0000000..9d8e0a2 --- /dev/null +++ b/function.imagecreate.html @@ -0,0 +1,233 @@ +ImageCreate
PHP Manual
PrevNext

ImageCreate

(PHP3 , PHP4 )

ImageCreate -- Create a new image

Description

int imagecreate (int x_size, int y_size)

+ ImageCreate() returns an image identifier + representing a blank image of size x_size + by y_size. +

Example 1. + Creating a new GD image stream and outputting an image. +


<?php
+header ("Content-type: image/png");
+$im = @ImageCreate (50, 100)
+    or die ("Cannot Initialize new GD image stream");
+$background_color = ImageColorAllocate ($im, 255, 255, 255);
+$text_color = ImageColorAllocate ($im, 233, 14, 91);
+ImageString ($im, 1, 5, 5,  "A Simple Text String", $text_color);
+ImagePng ($im);
+?>
+      
+


PrevHomeNext
ImageCopyResizedUpImageCreateFromGIF
\ No newline at end of file diff --git a/function.imagecreatefromgif.html b/function.imagecreatefromgif.html new file mode 100644 index 0000000..c421af9 --- /dev/null +++ b/function.imagecreatefromgif.html @@ -0,0 +1,250 @@ +ImageCreateFromGIF
PHP Manual
PrevNext

ImageCreateFromGIF

(PHP3 , PHP4 )

ImageCreateFromGIF -- Create a new image from file or URL

Description

int imagecreatefromgif (string filename)

ImageCreateFromGif() returns an image identifier + representing the image obtained from the given filename. +

+ ImageCreateFromGif() returns an empty string + on failure. It also outputs an error message, which unfortunately + displays as a broken link in a browser. To ease debugging the + following example will produce an error GIF: +

Example 1. + Example to handle an error during creation (courtesy + vic@zymsys.com) +


function LoadGif ($imgname) {
+    $im = @ImageCreateFromGIF ($imgname); /* Attempt to open */
+    if (!$im) { /* See if it failed */
+        $im = ImageCreate (150, 30); /* Create a blank image */
+        $bgc = ImageColorAllocate ($im, 255, 255, 255);
+        $tc  = ImageColorAllocate ($im, 0, 0, 0);
+        ImageFilledRectangle ($im, 0, 0, 150, 30, $bgc); 
+        /* Output an errmsg */
+        ImageString($im, 1, 5, 5, "Error loading $imgname", $tc); 
+    }
+    return $im;
+}
+      
+

Note: + Since all GIF support was removed from the GD library in + version 1.6, this function is not available if you are using + that version of the GD library. +

+


PrevHomeNext
ImageCreateUpImageCreateFromJPEG
\ No newline at end of file diff --git a/function.imagecreatefromjpeg.html b/function.imagecreatefromjpeg.html new file mode 100644 index 0000000..6dd0086 --- /dev/null +++ b/function.imagecreatefromjpeg.html @@ -0,0 +1,238 @@ +ImageCreateFromJPEG
PHP Manual
PrevNext

ImageCreateFromJPEG

(PHP3 >= 3.0.16, PHP4 >= 4.0RC1)

ImageCreateFromJPEG -- Create a new image from file or URL

Description

int imagecreatefromjpeg (string filename)

ImageCreateFromJPEG() returns an image identifier + representing the image obtained from the given filename. +

+ ImagecreateFromJPEG() returns an empty string + on failure. It also outputs an error message, which unfortunately + displays as a broken link in a browser. To ease debugging the + following example will produce an error JPEG: +

Example 1. + Example to handle an error during creation (courtesy + vic@zymsys.com ) +


function LoadJpeg ($imgname) {
+    $im = @ImageCreateFromJPEG ($imgname); /* Attempt to open */
+    if (!$im) { /* See if it failed */
+        $im = ImageCreate (150, 30); /* Create a blank image */
+        $bgc = ImageColorAllocate ($im, 255, 255, 255);
+        $tc  = ImageColorAllocate ($im, 0, 0, 0);
+        ImageFilledRectangle ($im, 0, 0, 150, 30, $bgc);
+        /* Output an errmsg */
+        ImageString ($im, 1, 5, 5, "Error loading $imgname", $tc); 
+    }
+    return $im;
+}
+      
+


PrevHomeNext
ImageCreateFromGIFUpImageCreateFromPNG
\ No newline at end of file diff --git a/function.imagecreatefrompng.html b/function.imagecreatefrompng.html new file mode 100644 index 0000000..d76b3dc --- /dev/null +++ b/function.imagecreatefrompng.html @@ -0,0 +1,238 @@ +ImageCreateFromPNG
PHP Manual
PrevNext

ImageCreateFromPNG

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

ImageCreateFromPNG -- Create a new image from file or URL

Description

int imagecreatefrompng (string filename)

ImageCreateFromPNG() returns an image identifier + representing the image obtained from the given filename. +

+ ImageCreateFromPNG() returns an empty string + on failure. It also outputs an error message, which unfortunately + displays as a broken link in a browser. To ease debugging the + following example will produce an error PNG: +

Example 1. + Example to handle an error during creation (courtesy + vic@zymsys.com) +


function LoadPNG ($imgname) {
+    $im = @ImageCreateFromPNG ($imgname); /* Attempt to open */
+    if (!$im) { /* See if it failed */
+        $im  = ImageCreate (150, 30); /* Create a blank image */
+        $bgc = ImageColorAllocate ($im, 255, 255, 255);
+        $tc  = ImageColorAllocate ($im, 0, 0, 0);
+        ImageFilledRectangle ($im, 0, 0, 150, 30, $bgc);
+        /* Output an errmsg */
+        ImageString ($im, 1, 5, 5, "Error loading $imgname", $tc); 
+    }
+    return $im;
+}
+      
+


PrevHomeNext
ImageCreateFromJPEGUpImageDashedLine
\ No newline at end of file diff --git a/function.imagedashedline.html b/function.imagedashedline.html new file mode 100644 index 0000000..b24a67c --- /dev/null +++ b/function.imagedashedline.html @@ -0,0 +1,217 @@ +ImageDashedLine
PHP Manual
PrevNext

ImageDashedLine

(PHP3 , PHP4 )

ImageDashedLine -- Draw a dashed line

Description

int imagedashedline (int im, int x1, int y1, int x2, int y2, int col)

+ ImageDashedLine() draws a dashed line from + x1, y1 to + x2, y2 (top left is + 0, 0) in image im of color + col. +

+ See also ImageLine(). +


PrevHomeNext
ImageCreateFromPNGUpImageDestroy
\ No newline at end of file diff --git a/function.imagedestroy.html b/function.imagedestroy.html new file mode 100644 index 0000000..8a2e417 --- /dev/null +++ b/function.imagedestroy.html @@ -0,0 +1,192 @@ +ImageDestroy
PHP Manual
PrevNext

ImageDestroy

(PHP3 , PHP4 )

ImageDestroy -- Destroy an image

Description

int imagedestroy (int im)

+ ImageDestroy() frees any memory associated + with image im. Im + is the image identifier returned by the + ImageCreate() function. +


PrevHomeNext
ImageDashedLineUpImageFill
\ No newline at end of file diff --git a/function.imagefill.html b/function.imagefill.html new file mode 100644 index 0000000..78586be --- /dev/null +++ b/function.imagefill.html @@ -0,0 +1,199 @@ +ImageFill
PHP Manual
PrevNext

ImageFill

(PHP3 , PHP4 )

ImageFill -- Flood fill

Description

int imagefill (int im, int x, int y, int col)

+ ImageFill() performs a flood fill starting at + coordinate x, y + (top left is 0, 0) with color col in the + image im. +


PrevHomeNext
ImageDestroyUpImageFilledPolygon
\ No newline at end of file diff --git a/function.imagefilledpolygon.html b/function.imagefilledpolygon.html new file mode 100644 index 0000000..35c558f --- /dev/null +++ b/function.imagefilledpolygon.html @@ -0,0 +1,196 @@ +ImageFilledPolygon
PHP Manual
PrevNext

ImageFilledPolygon

(PHP3 , PHP4 )

ImageFilledPolygon -- Draw a filled polygon

Description

int imagefilledpolygon (int im, array points, int num_points, int col)

+ ImageFilledPolygon() creates a filled polygon + in image im. + Points is a PHP array containing the + polygon's vertices, ie. points[0] = x0, points[1] = y0, points[2] + = x1, points[3] = y1, etc. Num_points is + the total number of vertices. +


PrevHomeNext
ImageFillUpImageFilledRectangle
\ No newline at end of file diff --git a/function.imagefilledrectangle.html b/function.imagefilledrectangle.html new file mode 100644 index 0000000..8d6965a --- /dev/null +++ b/function.imagefilledrectangle.html @@ -0,0 +1,210 @@ +ImageFilledRectangle
PHP Manual
PrevNext

ImageFilledRectangle

(PHP3 , PHP4 )

ImageFilledRectangle -- Draw a filled rectangle

Description

int imagefilledrectangle (int im, int x1, int y1, int x2, int y2, int col)

+ ImageFilledRectangle() creates a filled + rectangle of color col() in image + im starting at upper left coordinates + x1, y1 and ending + at bottom right coordinates x2, + y2. 0, 0 is the top left corner of the + image. +


PrevHomeNext
ImageFilledPolygonUpImageFillToBorder
\ No newline at end of file diff --git a/function.imagefilltoborder.html b/function.imagefilltoborder.html new file mode 100644 index 0000000..3945ada --- /dev/null +++ b/function.imagefilltoborder.html @@ -0,0 +1,200 @@ +ImageFillToBorder
PHP Manual
PrevNext

ImageFillToBorder

(PHP3 , PHP4 )

ImageFillToBorder -- Flood fill to specific color

Description

int imagefilltoborder (int im, int x, int y, int border, int col)

+ ImageFillToBorder() performs a flood fill + whose border color is defined by border. + The starting point for the fill is x, + y (top left is 0, 0) and the region is + filled with color col. +


PrevHomeNext
ImageFilledRectangleUpImageFontHeight
\ No newline at end of file diff --git a/function.imagefontheight.html b/function.imagefontheight.html new file mode 100644 index 0000000..3032a85 --- /dev/null +++ b/function.imagefontheight.html @@ -0,0 +1,182 @@ +ImageFontHeight
PHP Manual
PrevNext

ImageFontHeight

(PHP3 , PHP4 )

ImageFontHeight -- Get font height

Description

int imagefontheight (int font)

Returns the pixel height of a character in the specified font. +

See also ImageFontWidth() and + ImageLoadFont(). +


PrevHomeNext
ImageFillToBorderUpImageFontWidth
\ No newline at end of file diff --git a/function.imagefontwidth.html b/function.imagefontwidth.html new file mode 100644 index 0000000..358489b --- /dev/null +++ b/function.imagefontwidth.html @@ -0,0 +1,184 @@ +ImageFontWidth
PHP Manual
PrevNext

ImageFontWidth

(PHP3 , PHP4 )

ImageFontWidth -- Get font width

Description

int imagefontwidth (int font)

+ Returns the pixel width of a character in font. +

+ See also ImageFontHeight() and + ImageLoadFont(). +


PrevHomeNext
ImageFontHeightUpImageGIF
\ No newline at end of file diff --git a/function.imagegammacorrect.html b/function.imagegammacorrect.html new file mode 100644 index 0000000..2d13ef1 --- /dev/null +++ b/function.imagegammacorrect.html @@ -0,0 +1,201 @@ +ImageGammaCorrect
PHP Manual
PrevNext

ImageGammaCorrect

(PHP3 >= 3.0.13, PHP4 >= 4.0.0)

ImageGammaCorrect --  + Apply a gamma correction to a GD image +

Description

int + imagegammacorrect + (int + im, double + inputgamma, double + outputgamma)

The ImageGammaCorrect() function applies gamma + correction to a gd image stream (im) given + an input gamma, the parameter inputgamma + and an output gamma, the parameter + outputgamma. +


PrevHomeNext
ImageColorResolveUpImageColorSet
\ No newline at end of file diff --git a/function.imagegif.html b/function.imagegif.html new file mode 100644 index 0000000..a46a7de --- /dev/null +++ b/function.imagegif.html @@ -0,0 +1,249 @@ +ImageGIF
PHP Manual
PrevNext

ImageGIF

(PHP3 , PHP4 )

ImageGIF -- Output image to browser or file

Description

int imagegif (int im [, string + filename])

ImageGIF() creates the GIF + file in filename from the image im. The + im argument is the return from the + imagecreate() function. +

The image format will be GIF87a unless the + image has been made transparent with + ImageColorTransparent(), in which case the + image format will be GIF89a. +

The filename argument is optional, and if left off, the raw image + stream will be output directly. By sending an image/gif + content-type using header(), you can create a + PHP script that outputs GIF images directly. +

Note: + Since all GIF support was removed from the + GD library in version 1.6, this function is + not available if you are using that version of the GD library. +

+


PrevHomeNext
ImageFontWidthUpImagePNG
\ No newline at end of file diff --git a/function.imageinterlace.html b/function.imageinterlace.html new file mode 100644 index 0000000..556b231 --- /dev/null +++ b/function.imageinterlace.html @@ -0,0 +1,182 @@ +ImageInterlace
PHP Manual
PrevNext

ImageInterlace

(PHP3 , PHP4 )

ImageInterlace -- Enable or disable interlace

Description

int imageinterlace (int im [, int + interlace])

ImageInterlace() turns the interlace bit on or off. + If interlace is 1 the im image will be interlaced, and if interlace + is 0 the interlace bit is turned off. +

This functions returns whether the interlace bit is set for the + image. +


PrevHomeNext
ImageJPEGUpImageLine
\ No newline at end of file diff --git a/function.imagejpeg.html b/function.imagejpeg.html new file mode 100644 index 0000000..fe44089 --- /dev/null +++ b/function.imagejpeg.html @@ -0,0 +1,224 @@ +ImageJPEG
PHP Manual
PrevNext

ImageJPEG

(PHP3 >= 3.0.16, PHP4 >= 4.0RC1)

ImageJPEG -- Output image to browser or file

Description

int imagejpeg (int im [, string + filename [, int + quality]])

ImageJPEG() creates the + JPEG file in filename from the image + im. The im argument + is the return from the ImageCreate() function. +

The filename argument is optional, and if left off, the raw image + stream will be output directly. To skip the filename argument in + order to provide a quality argument just use an empty string + (''). By sending an image/jpeg content-type using + header(), you can create a PHP script that + outputs JPEG images directly. +

Note: + JPEG support is only available in PHP if PHP was compiled + against GD-1.8 or later. +

+


PrevHomeNext
ImagePNGUpImageInterlace
\ No newline at end of file diff --git a/function.imageline.html b/function.imageline.html new file mode 100644 index 0000000..f2cd7e6 --- /dev/null +++ b/function.imageline.html @@ -0,0 +1,215 @@ +ImageLine
PHP Manual
PrevNext

ImageLine

(PHP3 , PHP4 )

ImageLine -- Draw a line

Description

int imageline (int im, int x1, int y1, int x2, int y2, int col)

+ ImageLine() draws a line from + x1, y1 to + x2, y2 (top left is + 0, 0) in image im of color col. +

+ See also ImageCreate() and + ImageColorAllocate(). +


PrevHomeNext
ImageInterlaceUpImageLoadFont
\ No newline at end of file diff --git a/function.imageloadfont.html b/function.imageloadfont.html new file mode 100644 index 0000000..b95d021 --- /dev/null +++ b/function.imageloadfont.html @@ -0,0 +1,300 @@ +ImageLoadFont
PHP Manual
PrevNext

ImageLoadFont

(PHP3 , PHP4 )

ImageLoadFont -- Load a new font

Description

int imageloadfont (string file)

ImageLoadFont() loads a user-defined bitmap + font and returns an identifier for the font (that is always + greater than 5, so it will not conflict with the built-in fonts). +

The font file format is currently binary and architecture + dependent. This means you should generate the font files on the + same type of CPU as the machine you are running PHP on. +

Table 1. Font file format

byte positionC data typedescription
byte 0-3intnumber of characters in the font
byte 4-7int value of first character in the font (often 32 for space) +
byte 8-11intpixel width of each character
byte 12-15intpixel height of each character
byte 16-char array with character data, one byte per pixel in each + character, for a total of (nchars*width*height) bytes. +
+

See also ImageFontWidth() and + ImageFontHeight(). +


PrevHomeNext
ImageLineUpImagePolygon
\ No newline at end of file diff --git a/function.imagepng.html b/function.imagepng.html new file mode 100644 index 0000000..2222d72 --- /dev/null +++ b/function.imagepng.html @@ -0,0 +1,219 @@ +ImagePNG
PHP Manual
PrevNext

ImagePNG

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

ImagePNG --  + Output a PNG image to either the browser or a file +

Description

int + imagepng + (int im [, string filename])

The ImagePng() outputs a GD image stream + (im) in PNG format to standard output + (usually the browser) or, if a filename is given by the + filename it outputs the image to the file. +


<?php
+$im = ImageCreateFromPng("test.png");
+ImagePng($im);
+?>
+      

+


PrevHomeNext
ImageGIFUpImageJPEG
\ No newline at end of file diff --git a/function.imagepolygon.html b/function.imagepolygon.html new file mode 100644 index 0000000..9447c2b --- /dev/null +++ b/function.imagepolygon.html @@ -0,0 +1,200 @@ +ImagePolygon
PHP Manual
PrevNext

ImagePolygon

(PHP3 , PHP4 )

ImagePolygon -- Draw a polygon

Description

int imagepolygon (int im, array points, int num_points, int col)

+ ImagePolygon() creates a polygon in image id. + Points is a PHP array containing the + polygon's vertices, ie. points[0] = x0, points[1] = y0, points[2] + = x1, points[3] = y1, etc. Num_points is + the total number of vertices. +

+ See also imagecreate(). +


PrevHomeNext
ImageLoadFontUpImagePSBBox
\ No newline at end of file diff --git a/function.imagepsbbox.html b/function.imagepsbbox.html new file mode 100644 index 0000000..2b08e34 --- /dev/null +++ b/function.imagepsbbox.html @@ -0,0 +1,319 @@ +ImagePSBBox
PHP Manual
PrevNext

ImagePSBBox

(PHP3 >= 3.0.9, PHP4 >= 4.0RC1)

ImagePSBBox --  + Give the bounding box of a text rectangle using PostScript Type1 + fonts +

Description

array imagepsbbox (string text, int font, int size [, int space [, int tightness [, float angle]]])

Size is expressed in pixels. +

Space allows you to change the default + value of a space in a font. This amount is added to the normal + value and can also be negative. +

Tightness allows you to control the amount + of white space between characters. This amount is added to the + normal character width and can also be negative. +

Angle is in degrees. +

Parameters space and + tightness are expressed in character space + units, where 1 unit is 1/1000th of an em-square. +

Parameters space, + tightness, and angle + are optional. +

The bounding box is calculated using information available from + character metrics, and unfortunately tends to differ slightly + from the results achieved by actually rasterizing the text. If + the angle is 0 degrees, you can expect the text to need 1 pixel + more to every direction. +

This function returns an array containing the following elements: +

0lower left x-coordinate
1lower left y-coordinate
2upper right x-coordinate
3upper right y-coordinate

+

See also imagepstext(). +


PrevHomeNext
ImagePolygonUpImagePSEncodeFont
\ No newline at end of file diff --git a/function.imagepsencodefont.html b/function.imagepsencodefont.html new file mode 100644 index 0000000..ad65b74 --- /dev/null +++ b/function.imagepsencodefont.html @@ -0,0 +1,190 @@ +ImagePSEncodeFont
PHP Manual
PrevNext

ImagePSEncodeFont

(PHP3 >= 3.0.9, PHP4 >= 4.0RC1)

ImagePSEncodeFont --  + Change the character encoding vector of a font +

Description

int imagepsencodefont (string encodingfile)

Loads a character encoding vector from from a file and changes + the fonts encoding vector to it. As a PostScript fonts default + vector lacks most of the character positions above 127, you'll + definitely want to change this if you use an other language than + english. The exact format of this file is described in T1libs + documentation. T1lib comes with two ready-to-use files, + IsoLatin1.enc and IsoLatin2.enc. +

If you find yourself using this function all the time, a much + better way to define the encoding is to set ps.default_encoding in + the configuration file + to point to the right encoding file and all fonts you load will + automatically have the right encoding. +


PrevHomeNext
ImagePSBBoxUpImagePSFreeFont
\ No newline at end of file diff --git a/function.imagepsextendfont.html b/function.imagepsextendfont.html new file mode 100644 index 0000000..624a7e3 --- /dev/null +++ b/function.imagepsextendfont.html @@ -0,0 +1,190 @@ +ImagePsExtendFont
PHP Manual
PrevNext

ImagePsExtendFont

(PHP3 >= 3.0.9, PHP4 >= 4.0RC1)

ImagePsExtendFont --  + Extend or condense a font +

Description

bool + imagepsextendfont + (int + font_index, double + extend)

Extend or condense a font (font_index), if + the value of the extend parameter is less + than one you will be condensing the font. +


PrevHomeNext
ImagePSLoadFontUpImagePsSlantFont
\ No newline at end of file diff --git a/function.imagepsfreefont.html b/function.imagepsfreefont.html new file mode 100644 index 0000000..66dc017 --- /dev/null +++ b/function.imagepsfreefont.html @@ -0,0 +1,175 @@ +ImagePSFreeFont
PHP Manual
PrevNext

ImagePSFreeFont

(PHP3 >= 3.0.9, PHP4 >= 4.0RC1)

ImagePSFreeFont -- Free memory used by a PostScript Type 1 font

Description

void imagepsfreefont (int fontindex)

See also ImagePSLoadFont(). +


PrevHomeNext
ImagePSEncodeFontUpImagePSLoadFont
\ No newline at end of file diff --git a/function.imagepsloadfont.html b/function.imagepsloadfont.html new file mode 100644 index 0000000..fd2b68f --- /dev/null +++ b/function.imagepsloadfont.html @@ -0,0 +1,181 @@ +ImagePSLoadFont
PHP Manual
PrevNext

ImagePSLoadFont

(PHP3 >= 3.0.9, PHP4 >= 4.0RC1)

ImagePSLoadFont -- Load a PostScript Type 1 font from file

Description

int imagepsloadfont (string filename)

In the case everything went right, a valid font index will be + returned and can be used for further purposes. Otherwise the + function returns false and prints a message describing what went + wrong. +

See also ImagePSFreeFont(). +


PrevHomeNext
ImagePSFreeFontUpImagePsExtendFont
\ No newline at end of file diff --git a/function.imagepsslantfont.html b/function.imagepsslantfont.html new file mode 100644 index 0000000..ac34863 --- /dev/null +++ b/function.imagepsslantfont.html @@ -0,0 +1,190 @@ +ImagePsSlantFont
PHP Manual
PrevNext

ImagePsSlantFont

(PHP3 >= 3.0.9, PHP4 >= 4.0RC1)

ImagePsSlantFont --  + Slant a font +

Description

bool + imagepsslantfont + (int + font_index, double + slant)

Slant a font given by the font_index + parameter with a slant of the value of the + slant parameter. +


PrevHomeNext
ImagePsExtendFontUpImagePSText
\ No newline at end of file diff --git a/function.imagepstext.html b/function.imagepstext.html new file mode 100644 index 0000000..9a8904d --- /dev/null +++ b/function.imagepstext.html @@ -0,0 +1,388 @@ +ImagePSText
PHP Manual
PrevNext

ImagePSText

(PHP3 >= 3.0.9, PHP4 >= 4.0RC1)

ImagePSText --  + To draw a text string over an image using PostScript Type1 fonts +

Description

array imagepstext (int image, string text, int font, int size, int foreground, int background, int x, int y [, int + space [, int + tightness [, float + angle [, int + antialias_steps]]]])

Size is expressed in pixels. +

Foreground is the color in which the text + will be painted. Background is the color + to which the text will try to fade in with antialiasing. No + pixels with the color background are + actually painted, so the background image does not need to be of + solid color. +

The coordinates given by x, + y will define the origin (or reference + point) of the first character (roughly the lower-left corner of + the character). This is different from the + ImageString(), where x, + y define the upper-right corner of the + first character. Refer to PostScipt documentation about fonts and + their measuring system if you have trouble understanding how this + works. +

Space allows you to change the default + value of a space in a font. This amount is added to the normal + value and can also be negative. +

Tightness allows you to control the amount + of white space between characters. This amount is added to the + normal character width and can also be negative. +

Angle is in degrees. +

Antialias_steps allows you to control the + number of colours used for antialiasing text. Allowed values are + 4 and 16. The higher value is recommended for text sizes lower + than 20, where the effect in text quality is quite visible. With + bigger sizes, use 4. It's less computationally intensive. +

Parameters space and + tightness are expressed in character space + units, where 1 unit is 1/1000th of an em-square. +

Parameters space, + tightness, angle + and antialias are optional. +

This function returns an array containing the following elements: +

0lower left x-coordinate
1lower left y-coordinate
2upper right x-coordinate
3upper right y-coordinate

See also imagepsbbox(). +


PrevHomeNext
ImagePsSlantFontUpImageRectangle
\ No newline at end of file diff --git a/function.imagerectangle.html b/function.imagerectangle.html new file mode 100644 index 0000000..4ab9211 --- /dev/null +++ b/function.imagerectangle.html @@ -0,0 +1,179 @@ +ImageRectangle
PHP Manual
PrevNext

ImageRectangle

(PHP3 , PHP4 )

ImageRectangle -- Draw a rectangle

Description

int imagerectangle (int im, int x1, int y1, int x2, int y2, int col)

+ ImageRectangle() creates a rectangle of color + col in image im starting at upper left coordinate x1, y1 and + ending at bottom right coordinate x2, y2. 0, 0 is the top left + corner of the image. +


PrevHomeNext
ImagePSTextUpImageSetPixel
\ No newline at end of file diff --git a/function.imagesetpixel.html b/function.imagesetpixel.html new file mode 100644 index 0000000..ca3a0ff --- /dev/null +++ b/function.imagesetpixel.html @@ -0,0 +1,210 @@ +ImageSetPixel
PHP Manual
PrevNext

ImageSetPixel

(PHP3 , PHP4 )

ImageSetPixel -- Set a single pixel

Description

int imagesetpixel (int im, int x, int y, int col)

+ ImageSetPixel() draws a pixel at + x, y (top left is + 0, 0) in image im of color + col. +

+ See also ImageCreate() and + ImageColorAllocate(). +


PrevHomeNext
ImageRectangleUpImageString
\ No newline at end of file diff --git a/function.imagestring.html b/function.imagestring.html new file mode 100644 index 0000000..7563bd1 --- /dev/null +++ b/function.imagestring.html @@ -0,0 +1,213 @@ +ImageString
PHP Manual
PrevNext

ImageString

(PHP3 , PHP4 )

ImageString -- Draw a string horizontally

Description

int imagestring (int im, int font, int x, int y, string s, int col)

+ ImageString() draws the string + s in the image identified by + im at coordinates + x, y (top left is + 0, 0) in color col. If font is 1, 2, 3, 4 + or 5, a built-in font is used. +

+ See also ImageLoadFont(). +


PrevHomeNext
ImageSetPixelUpImageStringUp
\ No newline at end of file diff --git a/function.imagestringup.html b/function.imagestringup.html new file mode 100644 index 0000000..de26024 --- /dev/null +++ b/function.imagestringup.html @@ -0,0 +1,213 @@ +ImageStringUp
PHP Manual
PrevNext

ImageStringUp

(PHP3 , PHP4 )

ImageStringUp -- Draw a string vertically

Description

int imagestringup (int im, int font, int x, int y, string s, int col)

+ ImageStringUp() draws the string + s vertically in the image identified by + im at coordinates + x, y (top left is + 0, 0) in color col. If font is 1, 2, 3, 4 + or 5, a built-in font is used. +

+ See also ImageLoadFont(). +


PrevHomeNext
ImageStringUpImageSX
\ No newline at end of file diff --git a/function.imagesx.html b/function.imagesx.html new file mode 100644 index 0000000..c6684ff --- /dev/null +++ b/function.imagesx.html @@ -0,0 +1,193 @@ +ImageSX
PHP Manual
PrevNext

ImageSX

(PHP3 , PHP4 )

ImageSX -- Get image width

Description

int imagesx (int im)

+ ImageSX() returns the width of the image + identified by im. +

+ See also ImageCreate() and + ImageSY(). +


PrevHomeNext
ImageStringUpUpImageSY
\ No newline at end of file diff --git a/function.imagesy.html b/function.imagesy.html new file mode 100644 index 0000000..fc168e7 --- /dev/null +++ b/function.imagesy.html @@ -0,0 +1,191 @@ +ImageSY
PHP Manual
PrevNext

ImageSY

(PHP3 , PHP4 )

ImageSY -- Get image height

Description

int imagesy (int im)

ImageSY() returns the height of the image + identified by im. +

See also ImageCreate() and + ImageSX(). +


PrevHomeNext
ImageSXUpImageTTFBBox
\ No newline at end of file diff --git a/function.imagettfbbox.html b/function.imagettfbbox.html new file mode 100644 index 0000000..60d5f85 --- /dev/null +++ b/function.imagettfbbox.html @@ -0,0 +1,354 @@ +ImageTTFBBox
PHP Manual
PrevNext

ImageTTFBBox

(PHP3 >= 3.0.1, PHP4 )

ImageTTFBBox --  + Give the bounding box of a text using TypeType fonts +

Description

array imagettfbbox (int size, int angle, string fontfile, string text)

This function calculates and returns the bounding box in pixels + for a TrueType text. +

text

The string to be measured.

size

The font size.

fontfile

The name of the TrueType font file. (Can also be an URL.) +

angle

Angle in degrees in which text will be + measured. +

+ ImageTTFBBox() returns an array with 8 + elements representing four points making the bounding box of the + text: +

0lower left corner, X position
1lower left corner, Y position
2lower right corner, X position
3lower right corner, Y position
4upper right corner, X position
5upper right corner, Y position
6upper left corner, X position
7upper left corner, Y position

+ The points are relative to the text + regardless of the angle, so "upper left" means in the top + left-hand corner seeing the text horizontallty. +

This function requires both the GD library and the FreeType + library. +

See also ImageTTFText(). +


PrevHomeNext
ImageSYUpImageTTFText
\ No newline at end of file diff --git a/function.imagettftext.html b/function.imagettftext.html new file mode 100644 index 0000000..0b181ba --- /dev/null +++ b/function.imagettftext.html @@ -0,0 +1,350 @@ +ImageTTFText
PHP Manual
PrevNext

ImageTTFText

(PHP3 , PHP4 )

ImageTTFText --  + Write text to the image using TrueType fonts +

Description

array imagettftext (int im, int size, int angle, int x, int y, int col, string fontfile, string text)

ImageTTFText() draws the string + text in the image identified by + im, starting at coordinates + x, y (top left is + 0, 0), at an angle of angle in color + col, using the TrueType font file + identified by fontfile. +

The coordinates given by x, + y will define the basepoint of the first + character (roughly the lower-left corner of the character). This + is different from the ImageString(), where x, + y define the upper-right corner of the first character. +

Angle is in degrees, with 0 degrees being + left-to-right reading text (3 o'clock direction), and higher + values representing a counter-clockwise rotation. (i.e., a value + of 90 would result in bottom-to-top reading text). +

Fontfile is the path to the TrueType font + you wish to use. +

Text is the text string which may include + UTF-8 character sequences (of the form: &#123;) to access + characters in a font beyond the first 255. +

Col is the color index. Using the + negative of a color index has the effect of turning off + antialiasing. +

ImageTTFText() returns an array with 8 + elements representing four points making the bounding box of the + text. The order of the points is upper left, upper right, lower + right, lower left. The points are relative to the text + regardless of the angle, so "upper left" means in the top + left-hand corner when you see the text horizontallty. +

This example script will produce a black GIF 400x30 pixels, with + the words "Testing..." in white in the font Arial. +

Example 1. ImageTTFText


<?php
+Header ("Content-type: image/gif");
+$im = imagecreate (400, 30);
+$black = ImageColorAllocate ($im, 0, 0, 0);
+$white = ImageColorAllocate ($im, 255, 255, 255);
+ImageTTFText ($im, 20, 0, 10, 20, $white, "/path/arial.ttf", 
+              "Testing... Omega: &#937;");
+ImageGif ($im);
+ImageDestroy ($im);
+?>
+      
+

This function requires both the GD library and the FreeType library. +

See also ImageTTFBBox(). +


PrevHomeNext
ImageTTFBBoxUpImageTypes
\ No newline at end of file diff --git a/function.imagetypes.html b/function.imagetypes.html new file mode 100644 index 0000000..84870a9 --- /dev/null +++ b/function.imagetypes.html @@ -0,0 +1,216 @@ +ImageTypes
PHP Manual
PrevNext

ImageTypes

(PHP4 >= 4.0.2)

ImageTypes --  + Return the image types supported by this PHP build +

Description

int imagetypes(void);

This function returns a bit-field corresponding to the image + formats supported by the version of GD linked into PHP. The + following bits are returned, IMG_GIF | IMG_JPG | IMG_PNG | + IMG_WBMP. To check for PNG support, for example, do this: +

Example 1. ImageTypes


<?php
+if (ImageTypes() & IMG_PNG) {
+    echo "PNG Support is enabled";
+}
+?>
+      
+


PrevHomeNext
ImageTTFTextUpread_exif_data
\ No newline at end of file diff --git a/function.imap-8bit.html b/function.imap-8bit.html new file mode 100644 index 0000000..adeef3a --- /dev/null +++ b/function.imap-8bit.html @@ -0,0 +1,193 @@ +imap_8bit
PHP Manual
PrevNext

imap_8bit

(PHP3 , PHP4 )

imap_8bit --  + Convert an 8bit string to a quoted-printable string +

Description

string imap_8bit (string string)

+ Convert an 8bit string to a quoted-printable string (according to + RFC2045, section + 6.7). +

Returns a quoted-printable string. +

See also imap_qprint(). +


PrevHomeNext
imap_qprintUpimap_binary
\ No newline at end of file diff --git a/function.imap-alerts.html b/function.imap-alerts.html new file mode 100644 index 0000000..b8d327e --- /dev/null +++ b/function.imap-alerts.html @@ -0,0 +1,187 @@ +imap_alerts
PHP Manual
PrevNext

imap_alerts

(PHP3 >= 3.0.12, PHP4 >= 4.0b4)

imap_alerts --  + This function returns all IMAP alert messages (if any) that have + occurred during this page request or since the alert stack was + reset +

Description

array imap_alerts (void)

This function returns an array of all of the IMAP alert messages + generated since the last imap_alerts() call, + or the beginning of the page. When + imap_alerts() is called, the alert stack is + subsequently cleared. The IMAP specification requires that these + messages be passed to the user. +


PrevHomeNext
imap_errorsUpimap_status
\ No newline at end of file diff --git a/function.imap-append.html b/function.imap-append.html new file mode 100644 index 0000000..010582b --- /dev/null +++ b/function.imap-append.html @@ -0,0 +1,261 @@ +imap_append
PHP Manual
PrevNext

imap_append

(PHP3 , PHP4 )

imap_append --  + Append a string message to a specified mailbox +

Description

int imap_append (int imap_stream, string mbox, string message [, string + flags])

Returns true on sucess, false on error. +

imap_append() appends a string message to the + specified mailbox mbox. If the optional + flags is specified, writes the + flags to that mailbox also. +

When talking to the Cyrus IMAP server, you must use "\r\n" as + your end-of-line terminator instead of "\n" or the operation will + fail. +

+

Example 1. imap_append() example


$stream = imap_open("{your.imap.host}INBOX.Drafts","username", "password");
+
+$check = imap_check($stream);
+print "Msg Count before append: ". $check->Nmsgs."\n";
+
+imap_append($stream,"{your.imap.host}INBOX.Drafts"
+                   ,"From: me@my.host\r\n"
+                   ."To: you@your.host\r\n"
+                   ."Subject: test\r\n"
+                   ."\r\n"
+                   ."this is a test message, please ignore\r\n"
+                   );
+
+$check = imap_check($stream);
+print "Msg Count after append : ". $check->Nmsgs."\n";
+
+imap_close($stream);
+      
+


PrevHomeNext
IMAP, POP3 and NNTP functionsUpimap_base64
\ No newline at end of file diff --git a/function.imap-base64.html b/function.imap-base64.html new file mode 100644 index 0000000..022bf2e --- /dev/null +++ b/function.imap-base64.html @@ -0,0 +1,190 @@ +imap_base64
PHP Manual
PrevNext

imap_base64

(PHP3 , PHP4 )

imap_base64 -- Decode BASE64 encoded text

Description

string imap_base64 (string text)

imap_base64() function decodes BASE-64 encoded + text (see RFC2045, + Section 6.8). The decoded message is returned as a string. +

See also imap_binary(). +


PrevHomeNext
imap_appendUpimap_body
\ No newline at end of file diff --git a/function.imap-binary.html b/function.imap-binary.html new file mode 100644 index 0000000..ba98240 --- /dev/null +++ b/function.imap-binary.html @@ -0,0 +1,191 @@ +imap_binary
PHP Manual
PrevNext

imap_binary

(PHP3 >= 3.0.2, PHP4 )

imap_binary --  + Convert an 8bit string to a base64 string +

Description

string imap_binary (string string)

+ Convert an 8bit string to a base64 string (according to RFC2045, Section 6.8). +

Returns a base64 string. +

See also imap_base64(). +


PrevHomeNext
imap_8bitUpimap_scanmailbox
\ No newline at end of file diff --git a/function.imap-body.html b/function.imap-body.html new file mode 100644 index 0000000..2d6d2b9 --- /dev/null +++ b/function.imap-body.html @@ -0,0 +1,230 @@ +imap_body
PHP Manual
PrevNext

imap_body

(PHP3 , PHP4 )

imap_body -- Read the message body

Description

string imap_body (int imap_stream, int msg_number [, int flags])

imap_body() returns the body of the message, + numbered msg_number in the current + mailbox. The optional flags are a bit mask + with one or more of the following: +

  • FT_UID - The msgno is a UID +

  • FT_PEEK - Do not set the \Seen flag if not already set +

  • FT_INTERNAL - The return string is in internal format, will + not canonicalize to CRLF. +

+

imap_body() will only return a verbatim copy of the + message body. To extract single parts of a multipart MIME-encoded + message you have to use imap_fetch_structure() to + analyze its structure and imap_fetch_body() to + extract a copy of a single body component. +


PrevHomeNext
imap_base64Upimap_check
\ No newline at end of file diff --git a/function.imap-check.html b/function.imap-check.html new file mode 100644 index 0000000..382f601 --- /dev/null +++ b/function.imap-check.html @@ -0,0 +1,214 @@ +imap_check
PHP Manual
PrevNext

imap_check

(PHP3 , PHP4 )

imap_check -- Check current mailbox

Description

object imap_check (int imap_stream)

Returns information about the current mailbox. Returns FALSE on + failure. +

+ The imap_check() function checks the current + mailbox status on the server and returns the information in an + object with following properties: +

  • Date - last change of mailbox contents +

  • Driver - protocol used to access this mailbox: POP3, IMAP, NNTP +

  • Mailbox - the mailbox name +

  • Nmsgs - number of messages in the mailbox +

  • Recent - number of recent messages in the mailbox +

+


PrevHomeNext
imap_bodyUpimap_close
\ No newline at end of file diff --git a/function.imap-clearflag-full.html b/function.imap-clearflag-full.html new file mode 100644 index 0000000..45d6ae6 --- /dev/null +++ b/function.imap-clearflag-full.html @@ -0,0 +1,198 @@ +imap_clearflag_full
PHP Manual
PrevNext

imap_clearflag_full

(PHP3 >= 3.0.3, PHP4 )

imap_clearflag_full -- Clears flags on messages

Description

string + imap_clearflag_full + (int stream, string sequence, string flag, string options)

This function causes a store to delete the specified flag to the + flags set for the messages in the specified sequence. + The flags which you can unset are "\\Seen", "\\Answered", + "\\Flagged", "\\Deleted", "\\Draft", and "\\Recent" (as defined + by RFC2060). +

The options are a bit mask with one or more of the following: +


+ST_UID          The sequence argument contains UIDs instead of
+                sequence numbers
+      

+


PrevHomeNext
imap_setflag_fullUpimap_sort
\ No newline at end of file diff --git a/function.imap-close.html b/function.imap-close.html new file mode 100644 index 0000000..ba34e6b --- /dev/null +++ b/function.imap-close.html @@ -0,0 +1,182 @@ +imap_close
PHP Manual
PrevNext

imap_close

(PHP3 , PHP4 )

imap_close -- Close an IMAP stream

Description

int imap_close (int imap_stream [, int + flags])

+ Close the imap stream. Takes an optional + flag CL_EXPUNGE, which will silently + expunge the mailbox before closing, removing all messages marked for + deletion. +


PrevHomeNext
imap_checkUpimap_createmailbox
\ No newline at end of file diff --git a/function.imap-createmailbox.html b/function.imap-createmailbox.html new file mode 100644 index 0000000..a91b4cd --- /dev/null +++ b/function.imap-createmailbox.html @@ -0,0 +1,304 @@ +imap_createmailbox
PHP Manual
PrevNext

imap_createmailbox

(PHP3 , PHP4 )

imap_createmailbox -- Create a new mailbox

Description

int imap_createmailbox (int imap_stream, string mbox)

+ imap_createmailbox() creates a new mailbox + specified by mbox. Names containing + international characters should be encoded by imap_utf7_encode() +

Returns true on success and false on error. +

See also imap_renamemailbox(), + imap_deletemailbox() and + imap_open() for the format + of mbox names. +

+

Example 1. imap_createmailbox() example


$mbox = imap_open("{your.imap.host}","username","password",OP_HALFOPEN)
+     || die("can't connect: ".imap_last_error());
+
+$name1 = "phpnewbox";
+$name2 = imap_utf7_encode("phpnewböx");
+
+$newname = $name1;
+
+echo "Newname will be '$name1'<br>\n";
+
+# we will now create a new mailbox "phptestbox" in your inbox folder,
+# check its status after creation and finaly remove it to restore
+# your inbox to its initial state 
+if(@imap_createmailbox($mbox,imap_utf7_encode("{your.imap.host}INBOX.$newname"))) {
+  $status = @imap_status($mbox,"{your.imap.host}INBOX.$newname",SA_ALL);
+  if($status) {
+    print("your new mailbox '$name1' has the following status:<br>\n");
+    print("Messages:   ". $status->messages   )."<br>\n";
+    print("Recent:     ". $status->recent     )."<br>\n";
+    print("Unseen:     ". $status->unseen     )."<br>\n";
+    print("UIDnext:    ". $status->uidnext    )."<br>\n";
+    print("UIDvalidity:". $status->uidvalidity)."<br>\n";
+    
+    if(imap_renamemailbox($mbox,"{your.imap.host}INBOX.$newname","{your.imap.host}INBOX.$name2")) {
+      echo "renamed new mailbox from '$name1' to '$name2'<br>\n";
+      $newname=$name2;
+    } else {
+      print "imap_renamemailbox on new mailbox failed: ".imap_last_error()."<br>\n";
+    }
+  } else {
+    print  "imap_status on new mailbox failed: ".imap_last_error()."<br>\n";
+  }
+  if(@imap_deletemailbox($mbox,"{your.imap.host}INBOX.$newname")) {
+    print "new mailbox removed to restore initial state<br>\n";
+  } else {
+    print  "imap_deletemailbox on new mailbox failed: ".implode("<br>\n",imap_errors())."<br>\n";
+  }
+  
+} else {
+  print  "could not create new mailbox: ".implode("<br>\n",imap_errors())."<br>\n";
+}
+
+imap_close($mbox);
+      
+


PrevHomeNext
imap_closeUpimap_delete
\ No newline at end of file diff --git a/function.imap-delete.html b/function.imap-delete.html new file mode 100644 index 0000000..b4824ad --- /dev/null +++ b/function.imap-delete.html @@ -0,0 +1,280 @@ +imap_delete
PHP Manual
PrevNext

imap_delete

(PHP3 , PHP4 )

imap_delete --  + Mark a messge for deletion from current mailbox +

Description

int imap_delete (int imap_stream, int msg_number [, int + flags])

Returns true. +

+ imap_delete() function marks message pointed + by msg_number for deletion. The optional + flags parameter only has a single option, + FT_UID, which tells the function to treat + the msg_number argument as a + UID. Messages marked for deletion will + stay in the mailbox until either + imap_expunge() is called or + imap_close() is called with the optional + parameter CL_EXPUNGE. +

+

Example 1. Imap_delete() Beispiel


$mbox = imap_open ("{your.imap.host}INBOX", "username", "password")
+    || die ("can't connect: " . imap_last_error());
+
+$check = imap_mailboxmsginfo ($mbox);
+print "Messages before delete: " . $check->Nmsgs . "<br>\n" ;
+imap_delete ($mbox, 1);
+$check = imap_mailboxmsginfo ($mbox);
+print "Messages after  delete: " . $check->Nmsgs . "<br>\n" ;
+imap_expunge ($mbox);
+$check = imap_mailboxmsginfo ($mbox);
+print "Messages after expunge: " . $check->Nmsgs . "<br>\n" ;
+imap_close ($mbox);
+      
+


PrevHomeNext
imap_createmailboxUpimap_deletemailbox
\ No newline at end of file diff --git a/function.imap-deletemailbox.html b/function.imap-deletemailbox.html new file mode 100644 index 0000000..917a472 --- /dev/null +++ b/function.imap-deletemailbox.html @@ -0,0 +1,221 @@ +imap_deletemailbox
PHP Manual
PrevNext

imap_deletemailbox

(PHP3 , PHP4 )

imap_deletemailbox -- Delete a mailbox

Description

int imap_deletemailbox (int imap_stream, string mbox)

+ imap_deletemailbox() deletes the specified + mailbox (see imap_open() for the format + of mbox names). +

Returns true on success and false on error. +

See also imap_createmailbox(), + imap_renamemailbox(), and + imap_open() for the format of + mbox. +


PrevHomeNext
imap_deleteUpimap_expunge
\ No newline at end of file diff --git a/function.imap-errors.html b/function.imap-errors.html new file mode 100644 index 0000000..b5f6d6b --- /dev/null +++ b/function.imap-errors.html @@ -0,0 +1,186 @@ +imap_errors
PHP Manual
PrevNext

imap_errors

(PHP3 >= 3.0.12, PHP4 >= 4.0b4)

imap_errors --  + This function returns all of the IMAP errors (if any) that have + occurred during this page request or since the error stack was + reset. +

Description

array imap_errors (void)

This function returns an array of all of the IMAP error messages + generated since the last imap_errors() call, + or the beginning of the page. When + imap_errors() is called, the error stack is + subsequently cleared. +


PrevHomeNext
imap_last_errorUpimap_alerts
\ No newline at end of file diff --git a/function.imap-expunge.html b/function.imap-expunge.html new file mode 100644 index 0000000..3e83e19 --- /dev/null +++ b/function.imap-expunge.html @@ -0,0 +1,200 @@ +imap_expunge
PHP Manual
PrevNext

imap_expunge

(PHP3 , PHP4 )

imap_expunge -- Delete all messages marked for deletion

Description

int imap_expunge (int imap_stream)

+ imap_expunge() deletes all the messages marked + for deletion by imap_delete(), + imap_mail_move(), or + imap_setflag_full(). +

Returns true. +


PrevHomeNext
imap_deletemailboxUpimap_fetchbody
\ No newline at end of file diff --git a/function.imap-fetch-overview.html b/function.imap-fetch-overview.html new file mode 100644 index 0000000..ec5f2ae --- /dev/null +++ b/function.imap-fetch-overview.html @@ -0,0 +1,324 @@ +imap_fetch_overview
PHP Manual
PrevNext

imap_fetch_overview

(PHP3 >= 3.0.4, PHP4 )

imap_fetch_overview --  + Read an overview of the information in the headers of the given message +

Description

array imap_fetch_overview (int imap_stream, string sequence [, int flags])

This function fetches mail headers for the given + sequence and returns an overview of their + contents. sequence will contain a sequence + of message indices or UIDs, if flags + contains FT_UID. The returned value is an array of objects + describing one message header each: +

  • subject - the messages subject +

  • from - who sent it +

  • date - when was it sent +

  • message_id - Message-ID +

  • references - is a reference to this message id +

  • size - size in bytes +

  • uid - UID the message has in the mailbox +

  • msgno - message sequence number in the maibox +

  • recent - this message is flagged as recent +

  • flagged - this message is flagged +

  • answered - this message is flagged as answered +

  • deleted - this message is flagged for deletion +

  • seen - this message is flagged as already read +

  • draft - this message is flagged as being a draft +

+

Example 1. imap_fetch_overview() example


$mbox = imap_open("{your.imap.host:143}","username","password")
+     || die("can't connect: ".imap_last_error());
+ 
+$overview = imap_fetch_overview($mbox,"2,4:6",0);
+ 
+if(is_array($overview)) {
+        reset($overview);
+        while( list($key,$val) = each($overview)) {
+                print     $val->msgno
+                . " - " . $val->date
+                . " - " . $val->subject
+                . "\n";
+        }
+}
+ 
+imap_close($mbox);
+      
+


PrevHomeNext
imap_utf8Upimap_mime_header_decode
\ No newline at end of file diff --git a/function.imap-fetchbody.html b/function.imap-fetchbody.html new file mode 100644 index 0000000..08ae2fa --- /dev/null +++ b/function.imap-fetchbody.html @@ -0,0 +1,212 @@ +imap_fetchbody
PHP Manual
PrevNext

imap_fetchbody

(PHP3 , PHP4 )

imap_fetchbody --  + Fetch a particular section of the body of the message +

Description

string imap_fetchbody (int imap_stream, int msg_number, string part_number [, flags + flags])

This function causes a fetch of a particular section of the body + of the specified messages as a text string and returns that text + string. The section specification is a string of integers + delimited by period which index into a body part list as per the + IMAP4 specification. Body parts are not decoded by this function. +

The options for imap_fetchbody() is a bitmask + with one or more of the following: +

  • FT_UID - The msg_number is a UID +

  • FT_PEEK - Do not set the \Seen flag if not already set +

  • FT_INTERNAL - The return string is in "internal" format, + without any attempt to canonicalize CRLF. +

+


PrevHomeNext
imap_expungeUpimap_fetchstructure
\ No newline at end of file diff --git a/function.imap-fetchheader.html b/function.imap-fetchheader.html new file mode 100644 index 0000000..f729749 --- /dev/null +++ b/function.imap-fetchheader.html @@ -0,0 +1,206 @@ +imap_fetchheader
PHP Manual
PrevNext

imap_fetchheader

(PHP3 >= 3.0.3, PHP4 )

imap_fetchheader -- Returns header for a message

Description

string imap_fetchheader (int imap_stream, int msgno, int flags)

This function causes a fetch of the complete, unfiltered + RFC822 + format header of the specified message as a text string and + returns that text string. +

The options are: +


+FT_UID          The msgno argument is a UID 
+FT_INTERNAL     The return string is in "internal" format,
+                without any attempt to canonicalize to CRLF
+                newlines
+FT_PREFETCHTEXT The RFC822.TEXT should be pre-fetched at the
+                same time.  This avoids an extra RTT on an
+                IMAP connection if a full message text is
+                desired (e.g. in a "save to local file"
+                operation)
+      

+


PrevHomeNext
imap_sortUpimap_uid
\ No newline at end of file diff --git a/function.imap-fetchstructure.html b/function.imap-fetchstructure.html new file mode 100644 index 0000000..cb3cdea --- /dev/null +++ b/function.imap-fetchstructure.html @@ -0,0 +1,612 @@ +imap_fetchstructure
PHP Manual
PrevNext

imap_fetchstructure

(PHP3 , PHP4 )

imap_fetchstructure --  + Read the structure of a particular message +

Description

object + imap_fetchstructure + (int imap_stream, int msg_number [, int + flags])

This function fetches all the structured information for a given + message. The optional flags parameter only + has a single option, FT_UID, which tells + the function to treat the msg_number + argument as a UID. The returned object + includes the envelope, internal date, size, flags and body + structure along with a similar object for each mime + attachement. The structure of the returned objects is as follows: +

Table 1. + Returned Objects for imap_fetchstructure() +

typePrimary body type
encodingBody transfer encoding
ifsubtypeTrue if there is a subtype string
subtypeMIME subtype
ifdescriptionTrue if there is a description string
descriptionContent description string
ifidTrue if there is an identification string
idIdentification string
linesNumber of lines
bytesNumber of bytes
ifdispositionTrue if there is a disposition string
dispositionDisposition string
ifdparametersTrue if the dparameters array exists
dparametersDisposition parameter array
ifparametersTrue if the parameters array exists
parametersMIME parameters array
partsArray of objects describing each message part
+

  1. dparameters is an array of objects where each object has an + "attribute" and a "value" property. +

  2. Parameter is an array of objects where each object has an + "attributte" and a "value" property. +

  3. Parts is an array of objects identical in structure to the + top-level object, with the limitation that it cannot contain + further 'parts' objects. +

Table 2. Primary body type

0text
1multipart
2message
3application
4audio
5image
6video
7other
+

Table 3. Transfer encodings

07BIT
18BIT
2BINARY
3BASE64
4QUOTED-PRINTABLE
5OTHER
+


PrevHomeNext
imap_fetchbodyUpimap_headerinfo
\ No newline at end of file diff --git a/function.imap-getmailboxes.html b/function.imap-getmailboxes.html new file mode 100644 index 0000000..0cc05ed --- /dev/null +++ b/function.imap-getmailboxes.html @@ -0,0 +1,360 @@ +imap_getmailboxes
PHP Manual
PrevNext

imap_getmailboxes

(PHP3 >= 3.0.12, PHP4 >= 4.0b4)

imap_getmailboxes --  + Read the list of mailboxes, returning detailed information on + each one +

Description

array imap_getmailboxes (int imap_stream, string ref, string pattern)

Returns an array of objects containing mailbox information. Each + object has the attributes name, specifying + the full name of the mailbox; delimiter, + which is the hierarchy delimiter for the part of the hierarchy + this mailbox is in; and + attributes. Attributes + is a bitmask that can be tested against: +

  • LATT_NOINFERIORS - This mailbox has no "children" (there are + no mailboxes below this one). +

  • LATT_NOSELECT - This is only a container, not a mailbox - you + cannot open it. +

  • LATT_MARKED - This mailbox is marked. Only used by UW-IMAPD. +

  • + LATT_UNMARKED - This mailbox is not marked. Only used by + UW-IMAPD. +

+

Mailbox names containing international Characters outside the + printable ASCII range will be encoded and may be decoded by + imap_utf7_decode(). +

ref should normally be just the server + specification as described in imap_open(), and + pattern specifies where in the mailbox + hierarchy to start searching. If you want all mailboxes, pass + '*' for pattern. +

There are two special characters you can pass as part of the + pattern: '*' and '%'. '*' means to return + all mailboxes. If you pass pattern as '*', + you will get a list of the entire mailbox hierarchy. '%' means to + return the current level only. '%' as the + pattern parameter will return only the top + level mailboxes; '~/mail/%' on UW_IMAPD will return every mailbox + in the ~/mail directory, but none in subfolders of that + directory. +

Example 1. imap_getmailboxes() example


$mbox = imap_open("{your.imap.host}","username","password",OP_HALFOPEN)
+      || die("can't connect: ".imap_last_error());
+ 
+$list = imap_getmailboxes($mbox,"{your.imap.host}","*");
+if(is_array($list)) {
+  reset($list);
+  while (list($key, $val) = each($list))
+  {
+    print "($key) ";
+    print imap_utf7_decode($val->name).",";
+    print "'".$val->delimiter."',";
+    print $val->attributes."<br>\n";
+  }
+} else
+  print "imap_getmailboxes failed: ".imap_last_error()."\n";
+ 
+imap_close($mbox);                                                                
+      
+

See also imap_getsubscribed(). +


PrevHomeNext
imap_listmailboxUpimap_listsubscribed
\ No newline at end of file diff --git a/function.imap-getsubscribed.html b/function.imap-getsubscribed.html new file mode 100644 index 0000000..a4fc2e3 --- /dev/null +++ b/function.imap-getsubscribed.html @@ -0,0 +1,180 @@ +imap_getsubscribed
PHP Manual
PrevNext

imap_getsubscribed

(PHP3 >= 3.0.12, PHP4 >= 4.0b4)

imap_getsubscribed -- List all the subscribed mailboxes

Description

array imap_getsubscribed (int imap_stream, string ref, string pattern)

This function is identical to + imap_getmailboxes(), except that it only + returns mailboxes that the user is subscribed to. +


PrevHomeNext
imap_listsubscribedUpimap_mail_copy
\ No newline at end of file diff --git a/function.imap-header.html b/function.imap-header.html new file mode 100644 index 0000000..6f32b67 --- /dev/null +++ b/function.imap-header.html @@ -0,0 +1,178 @@ +imap_header
PHP Manual
PrevNext

imap_header

(PHP3 , PHP4 )

imap_header -- Read the header of the message

Description

object imap_header (int imap_stream, int msg_number [, int + fromlength [, int + subjectlength [, string + defaulthost]]])

This is an alias to imap_headerinfo() + and is identical to this in any way. +


PrevHomeNext
imap_headerinfoUpimap_rfc822_parse_headers
\ No newline at end of file diff --git a/function.imap-headerinfo.html b/function.imap-headerinfo.html new file mode 100644 index 0000000..eb4775d --- /dev/null +++ b/function.imap-headerinfo.html @@ -0,0 +1,281 @@ +imap_headerinfo
PHP Manual
PrevNext

imap_headerinfo

(PHP3 , PHP4 )

imap_headerinfo -- Read the header of the message

Description

object imap_headerinfo (int imap_stream, int msg_number [, int + fromlength [, int + subjectlength [, string + defaulthost]]])

This function returns an object of various header elements. +

+


+       remail, date, Date, subject, Subject, in_reply_to, message_id,
+       newsgroups, followup_to, references
+
+message flags:
+   Recent -  'R' if recent and seen, 
+             'N' if recent and not seen, 
+             ' ' if not recent
+   Unseen -  'U' if not seen AND not recent, 
+             ' ' if seen OR not seen and recent
+   Answered -'A' if answered, 
+             ' ' if unanswered
+   Deleted - 'D' if deleted, 
+             ' ' if not deleted
+   Draft -   'X' if draft, 
+             ' ' if not draft
+   Flagged - 'F' if flagged, 
+             ' ' if not flagged
+
+NOTE that the Recent/Unseen behavior is a little odd. If you want to
+know if a message is Unseen, you must check for
+
+Unseen == 'U' || Recent == 'N'
+
+toaddress (full to: line, up to 1024 characters)
+
+to[] (returns an array of objects from the To line, containing):
+   personal
+   adl
+   mailbox
+   host
+
+fromaddress (full from: line, up to 1024 characters)
+
+from[] (returns an array of objects from the From line, containing):
+   personal
+   adl
+   mailbox
+   host
+
+ccaddress (full cc: line, up to 1024 characters)
+cc[] (returns an array of objects from the Cc line, containing):
+   personal
+   adl
+   mailbox
+   host
+
+bccaddress (full bcc line, up to 1024 characters)
+bcc[] (returns an array of objects from the Bcc line, containing):
+   personal
+   adl
+   mailbox
+   host
+
+reply_toaddress (full reply_to: line, up to 1024 characters)
+reply_to[] (returns an array of objects from the Reply_to line,
+containing):
+   personal
+   adl
+   mailbox
+   host
+
+senderaddress (full sender: line, up to 1024 characters)
+sender[] (returns an array of objects from the sender line, containing):
+   personal
+   adl
+   mailbox
+   host
+
+return_path (full return-path: line, up to 1024 characters)
+return_path[] (returns an array of objects from the return_path line,
+containing):
+   personal
+   adl
+   mailbox
+   host
+
+udate (mail message date in unix time)
+
+fetchfrom (from line formatted to fit fromlength 
+characters)
+
+fetchsubject (subject line formatted to fit subjectlength characters)
+      

+


PrevHomeNext
imap_fetchstructureUpimap_header
\ No newline at end of file diff --git a/function.imap-headers.html b/function.imap-headers.html new file mode 100644 index 0000000..50dd35b --- /dev/null +++ b/function.imap-headers.html @@ -0,0 +1,175 @@ +imap_headers
PHP Manual
PrevNext

imap_headers

(PHP3 , PHP4 )

imap_headers --  + Returns headers for all messages in a mailbox +

Description

array imap_headers (int imap_stream)

Returns an array of string formatted with header info. One + element per mail message. +


PrevHomeNext
imap_rfc822_parse_headersUpimap_listmailbox
\ No newline at end of file diff --git a/function.imap-last-error.html b/function.imap-last-error.html new file mode 100644 index 0000000..223fd6f --- /dev/null +++ b/function.imap-last-error.html @@ -0,0 +1,182 @@ +imap_last_error
PHP Manual
PrevNext

imap_last_error

(PHP3 >= 3.0.12, PHP4 >= 4.0b4)

imap_last_error --  + This function returns the last IMAP error (if any) that occurred + during this page request +

Description

string imap_last_error (void)

This function returns the full text of the last IMAP error + message that occurred on the current page. The error stack is + untouched; calling imap_last_error() + subsequently, with no intervening errors, will return the same + error. +


PrevHomeNext
imap_searchUpimap_errors
\ No newline at end of file diff --git a/function.imap-listmailbox.html b/function.imap-listmailbox.html new file mode 100644 index 0000000..5e40c81 --- /dev/null +++ b/function.imap-listmailbox.html @@ -0,0 +1,241 @@ +imap_listmailbox
PHP Manual
PrevNext

imap_listmailbox

(PHP3 , PHP4 )

imap_listmailbox -- Read the list of mailboxes

Description

array imap_listmailbox (int imap_stream, string ref, string pattern)

Returns an array containing the names of the mailboxes. + See imap_getmailboxes() for a description + of ref and pattern. +

Example 1. imap_listmailbox() example


$mbox = imap_open("{your.imap.host}","username","password",OP_HALFOPEN)
+      || die("can't connect: ".imap_last_error());
+ 
+$list = imap_listmailbox($mbox,"{your.imap.host}","*");
+if(is_array($list)) {
+  reset($list);
+  while (list($key, $val) = each($list))
+    print imap_utf7_decode($val)."<br>\n";
+} else
+  print "imap_listmailbox failed: ".imap_last_error()."\n";
+ 
+imap_close($mbox);                                                                
+      
+


PrevHomeNext
imap_headersUpimap_getmailboxes
\ No newline at end of file diff --git a/function.imap-listsubscribed.html b/function.imap-listsubscribed.html new file mode 100644 index 0000000..1b81ee6 --- /dev/null +++ b/function.imap-listsubscribed.html @@ -0,0 +1,181 @@ +imap_listsubscribed
PHP Manual
PrevNext

imap_listsubscribed

(PHP3 , PHP4 )

imap_listsubscribed -- List all the subscribed mailboxes

Description

array imap_listsubscribed (int imap_stream, string ref, string pattern)

Returns an array of all the mailboxes that you have + subscribed. This is almost identical to + imap_listmailbox(), but will only return + mailboxes the user you logged in as has subscribed. +


PrevHomeNext
imap_getmailboxesUpimap_getsubscribed
\ No newline at end of file diff --git a/function.imap-mail-compose.html b/function.imap-mail-compose.html new file mode 100644 index 0000000..7122251 --- /dev/null +++ b/function.imap-mail-compose.html @@ -0,0 +1,244 @@ +imap_mail_compose
PHP Manual
PrevNext

imap_mail_compose

(PHP3 >= 3.0.5, PHP4 )

imap_mail_compose --  + Create a MIME message based on given envelope and body sections +

Description

string imap_mail_compose (array envelope, array body)

Example 1. imap_mail_compose() example


<?php
+
+$envelope["from"]="musone@afterfive.com";
+$envelope["to"]="musone@darkstar";
+$envelope["cc"]="musone@edgeglobal.com";
+
+$part1["type"]=TYPEMULTIPART;
+$part1["subtype"]="mixed";
+
+$filename="/tmp/imap.c.gz";
+$fp=fopen($filename,"r");
+$contents=fread($fp,filesize($filename));
+fclose($fp);
+
+$part2["type"]=TYPEAPPLICATION;
+$part2["encoding"]=ENCBINARY;
+$part2["subtype"]="octet-stream";
+$part2["description"]=basename($filename);
+$part2["contents.data"]=$contents;
+
+$part3["type"]=TYPETEXT;
+$part3["subtype"]="plain";
+$part3["description"]="description3";
+$part3["contents.data"]="contents.data3\n\n\n\t";
+
+$body[1]=$part1;
+$body[2]=$part2;
+$body[3]=$part3;
+
+echo nl2br(imap_mail_compose($envelope,$body));
+
+?>
+      
+


PrevHomeNext
imap_mime_header_decodeUpimap_mail
\ No newline at end of file diff --git a/function.imap-mail-copy.html b/function.imap-mail-copy.html new file mode 100644 index 0000000..0b00e63 --- /dev/null +++ b/function.imap-mail-copy.html @@ -0,0 +1,213 @@ +imap_mail_copy
PHP Manual
PrevNext

imap_mail_copy

(PHP3 , PHP4 )

imap_mail_copy -- Copy specified messages to a mailbox

Description

int imap_mail_copy (int imap_stream, string msglist, string mbox [, int + flags])

Returns true on success and false on error. +

+ Copies mail messages specified by msglist + to specified mailbox. msglist is a range + not just message numbers (as described in + RFC2060). +

Flags is a bitmask of one or more of +

  • CP_UID - the sequence numbers contain UIDS +

  • CP_MOVE - Delete the messages from the current mailbox after + copying +

+


PrevHomeNext
imap_getsubscribedUpimap_mail_move
\ No newline at end of file diff --git a/function.imap-mail-move.html b/function.imap-mail-move.html new file mode 100644 index 0000000..35db0a0 --- /dev/null +++ b/function.imap-mail-move.html @@ -0,0 +1,207 @@ +imap_mail_move
PHP Manual
PrevNext

imap_mail_move

(PHP3 , PHP4 )

imap_mail_move -- Move specified messages to a mailbox

Description

int imap_mail_move (int imap_stream, string msglist, string mbox [, int + flags])

+ Moves mail messages specified by msglist + to specified mailbox. msglist is a range + not just message numbers (as described in + RFC2060). +

Flags is a bitmask and may contain the single option +

  • CP_UID - the sequence numbers contain UIDS +

+

Returns true on success and false on error. +


PrevHomeNext
imap_mail_copyUpimap_num_msg
\ No newline at end of file diff --git a/function.imap-mail.html b/function.imap-mail.html new file mode 100644 index 0000000..c04cfee --- /dev/null +++ b/function.imap-mail.html @@ -0,0 +1,178 @@ +imap_mail
PHP Manual
PrevNext

imap_mail

(PHP3 >= 3.0.14, PHP4 >= 4.0b4)

imap_mail --  + Send an email message +

Description

string imap_mail (string to, string subject, string message [, string + additional_headers [, string + cc [, string + bcc [, string + rpath]]]])

This function is currently only available in PHP 3. +


PrevHomeNext
imap_mail_composeUpInformix functions
\ No newline at end of file diff --git a/function.imap-mailboxmsginfo.html b/function.imap-mailboxmsginfo.html new file mode 100644 index 0000000..2675312 --- /dev/null +++ b/function.imap-mailboxmsginfo.html @@ -0,0 +1,352 @@ +imap_mailboxmsginfo
PHP Manual
PrevNext

imap_mailboxmsginfo

(PHP3 >= 3.0.2, PHP4 )

imap_mailboxmsginfo -- Get information about the current mailbox

Description

object imap_mailboxmsginfo (int imap_stream)

Returns information about the current mailbox. Returns FALSE on + failure. +

+ The imap_mailboxmsginfo() function checks the + current mailbox status on the server. It is similar to + imap_status(), but will additionally sum up the + size of all messages in the mailbox, which will take some additional + time to execute. It returns the information + in an object with following properties. +

Table 1. Mailbox properties

Datedate of last change
Driverdriver
Mailboxname of the mailbox
Nmsgsnumber of messages
Recentnumber of recent messages
Unreadnumber of unread messages
Deletednumber of deleted messages
Sizemailbox size
+

Example 1. imap_mailboxmsginfo() example


<?php
+
+$mbox = imap_open("{your.imap.host}INBOX","username", "password")
+      || die("can't connect: ".imap_last_error());
+ 
+$check = imap_mailboxmsginfo($mbox);
+ 
+if($check) {
+    print "Date: "    . $check->Date    ."<br>\n" ;
+    print "Driver: "  . $check->Driver  ."<br>\n" ;
+    print "Mailbox: " . $check->Mailbox ."<br>\n" ;
+    print "Messages: ". $check->Nmsgs   ."<br>\n" ;
+    print "Recent: "  . $check->Recent  ."<br>\n" ;
+    print "Unread: "  . $check->Unread  ."<br>\n" ;
+    print "Deleted: " . $check->Deleted ."<br>\n" ;
+    print "Size: "    . $check->Size    ."<br>\n" ;
+} else {
+    print "imap_check() failed: ".imap_lasterror(). "<br>\n";
+}
+ 
+imap_close($mbox);
+
+?>
+      
+


PrevHomeNext
imap_scanmailboxUpimap_rfc822_write_address
\ No newline at end of file diff --git a/function.imap-mime-header-decode.html b/function.imap-mime-header-decode.html new file mode 100644 index 0000000..69f8176 --- /dev/null +++ b/function.imap-mime-header-decode.html @@ -0,0 +1,238 @@ +imap_mime_header_decode
PHP Manual
PrevNext

imap_mime_header_decode

(PHP3 CVS only, PHP4 >= 4.0RC1)

imap_mime_header_decode -- Decode MIME header elements

Description

array imap_header_decode (string text)

imap_mime_header_decode() function decodes + MIME message header extensions that are non ASCII text + (see RFC2047) + The decoded elements are returned in an array of objects, + where each object has two properties, "charset" & "text". + If the element hasn't been encoded, and in other words is in + plain US-ASCII,the "charset" property of that element is set to + "default". +

Example 1. imap_mime_header_decode() example


$text="=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= <keld@dkuug.dk>";
+
+$elements=imap_mime_header_decode($text);
+for($i=0;$i<count($elements);$i++) {
+	echo "Charset: {$elements[$i]->charset}\n";
+	echo "Text: {$elements[$i]->text}\n\n";
+}
+
+      
+

In the above example we would have two elements, whereas the first + element had previously been encoded with ISO-8859-1, and the second + element would be plain US-ASCII. +


PrevHomeNext
imap_fetch_overviewUpimap_mail_compose
\ No newline at end of file diff --git a/function.imap-msgno.html b/function.imap-msgno.html new file mode 100644 index 0000000..471f7ce --- /dev/null +++ b/function.imap-msgno.html @@ -0,0 +1,182 @@ +imap_msgno
PHP Manual
PrevNext

imap_msgno

(PHP3 >= 3.0.3, PHP4 )

imap_msgno --  + This function returns the message sequence number for the given + UID +

Description

int imap_msgno (int imap_stream, int uid)

This function returns the message sequence number for the given + UID. It is the inverse of imap_uid(). +


PrevHomeNext
imap_uidUpimap_search
\ No newline at end of file diff --git a/function.imap-num-msg.html b/function.imap-num-msg.html new file mode 100644 index 0000000..f1f1279 --- /dev/null +++ b/function.imap-num-msg.html @@ -0,0 +1,174 @@ +imap_num_msg
PHP Manual
PrevNext

imap_num_msg

(PHP3 , PHP4 )

imap_num_msg --  + Gives the number of messages in the current mailbox +

Description

int imap_num_msg (int imap_stream)

Return the number of messages in the current mailbox. +


PrevHomeNext
imap_mail_moveUpimap_num_recent
\ No newline at end of file diff --git a/function.imap-num-recent.html b/function.imap-num-recent.html new file mode 100644 index 0000000..fbcd00f --- /dev/null +++ b/function.imap-num-recent.html @@ -0,0 +1,173 @@ +imap_num_recent
PHP Manual
PrevNext

imap_num_recent

(PHP3 , PHP4 )

imap_num_recent -- Gives the number of recent messages in current + mailbox

Description

int imap_num_recent (int imap_stream)

Returns the number of recent messages in the current mailbox. +


PrevHomeNext
imap_num_msgUpimap_open
\ No newline at end of file diff --git a/function.imap-open.html b/function.imap-open.html new file mode 100644 index 0000000..f157d46 --- /dev/null +++ b/function.imap-open.html @@ -0,0 +1,371 @@ +imap_open
PHP Manual
PrevNext

imap_open

(PHP3 , PHP4 )

imap_open -- Open an IMAP stream to a mailbox

Description

int imap_open (string mailbox, string username, string password [, int + flags])

Returns an IMAP stream on success and false on error. This + function can also be used to open streams to POP3 and NNTP + servers, but some functions and features are not available + on IMAP servers. +

A mailbox name consists of a server part and a mailbox path on + this server. The special name INBOX stands for the current users + personal mailbox. The server part, which is enclosed in '{' and + '}', consists of the servers name or ip address, a protocol + secification (beginning with '/') and an optional port specifier + beginnung with ':'. The server part is mandatory in all mailbox + parameters. Mailbox names that contain international characters + besides those in the printable ASCII space have to be encoded + with imap_utf7_encode(). +

The options are a bit mask with one or more of the following: +

  • OP_READONLY - Open mailbox read-only +

  • OP_ANONYMOUS - Dont use or update a + .newsrc for news (NNTP only) +

  • OP_HALFOPEN - For IMAP and NNTP names, open a connection but + dont open a mailbox +

  • CL_EXPUNGE - Expunge mailbox automatically upon mailbox close +

+

To connect to an IMAP server running on port 143 on the + local machine, do the following: +

 
+$mbox = imap_open ("{localhost:143}INBOX", "user_id", "password");
+      

+ To connect to a POP3 server on port 110 on the local server, use: +


$mbox = imap_open ("{localhost/pop3:110}INBOX", "user_id", "password");
+      

+ To connect to an NNTP server on port 119 on the local server, use: +


$nntp = imap_open ("{localhost/nntp:119}comp.test", "", "");
+      

+ To connect to a remote server replace "localhost" with the name + or the IP address of the server you want to connect to. +

Example 1. imap_open() example


$mbox = imap_open ("{your.imap.host:143}", "username", "password");
+
+echo "<p><h1>Mailboxes</h1>\n";
+$folders = imap_listmailbox ($mbox, "{your.imap.host:143}", "*");
+
+if ($folders == false) {
+    echo "Call failed<br>\n";
+} else {
+    while (list ($key, $val) = each ($folders)) {
+        echo $val."<br>\n";
+    }
+}
+
+echo "<p><h1>Headers in INBOX</h1>\n";
+$headers = imap_headers ($mbox);
+
+if ($headers == false) {
+    echo "Call failed<br>\n";
+} else {
+    while (list ($key,$val) = each ($headers)) {
+        echo $val."<br>\n";
+    }
+}
+
+imap_close($mbox);
+      
+


PrevHomeNext
imap_num_recentUpimap_ping
\ No newline at end of file diff --git a/function.imap-ping.html b/function.imap-ping.html new file mode 100644 index 0000000..ac91e0d --- /dev/null +++ b/function.imap-ping.html @@ -0,0 +1,184 @@ +imap_ping
PHP Manual
PrevNext

imap_ping

(PHP3 , PHP4 )

imap_ping -- Check if the IMAP stream is still active

Description

int imap_ping (int imap_stream)

+ Returns true if the stream is still alive, false otherwise. +

imap_ping() function pings the stream to see + it is still active. It may discover new mail; this is the + preferred method for a periodic "new mail check" as well as a + "keep alive" for servers which have inactivity timeout. + (As PHP scripts do not tend to run that long, i can hardly + imagine that this function will be usefull to anyone.) +


PrevHomeNext
imap_openUpimap_renamemailbox
\ No newline at end of file diff --git a/function.imap-qprint.html b/function.imap-qprint.html new file mode 100644 index 0000000..2f61359 --- /dev/null +++ b/function.imap-qprint.html @@ -0,0 +1,192 @@ +imap_qprint
PHP Manual
PrevNext

imap_qprint

(PHP3 , PHP4 )

imap_qprint -- Convert a quoted-printable string to an 8 bit + string

Description

string imap_qprint (string string)

+ Convert a quoted-printable string to an 8 bit string (according + to RFC2045, section + 6.7). +

Returns an 8 bit (binary) string. +

See also imap_8bit(). +


PrevHomeNext
imap_unsubscribeUpimap_8bit
\ No newline at end of file diff --git a/function.imap-renamemailbox.html b/function.imap-renamemailbox.html new file mode 100644 index 0000000..432b150 --- /dev/null +++ b/function.imap-renamemailbox.html @@ -0,0 +1,218 @@ +imap_renamemailbox
PHP Manual
PrevNext

imap_renamemailbox

(PHP3 , PHP4 )

imap_renamemailbox -- Rename an old mailbox to new mailbox

Description

int imap_renamemailbox (int imap_stream, string old_mbox, string new_mbox)

+ This function renames on old mailbox to new mailbox (see + imap_open() for the format of + mbox names). +

Returns true on success and false on error. +

See also imap_createmailbox(), + imap_deletemailbox(), and + imap_open() for the format of + mbox. +


PrevHomeNext
imap_pingUpimap_reopen
\ No newline at end of file diff --git a/function.imap-reopen.html b/function.imap-reopen.html new file mode 100644 index 0000000..79229e1 --- /dev/null +++ b/function.imap-reopen.html @@ -0,0 +1,225 @@ +imap_reopen
PHP Manual
PrevNext

imap_reopen

(PHP3 , PHP4 )

imap_reopen -- Reopen IMAP stream to new mailbox

Description

int imap_reopen (int imap_stream, string mailbox [, string + flags])

+ This function reopens the specified stream to a new mailbox on + an IMAP or NNTP server. +

The options are a bit mask with one or more of the following: +

  • OP_READONLY - Open mailbox read-only +

  • OP_ANONYMOUS - Dont use or update a + .newsrc for news (NNTP only) +

  • OP_HALFOPEN - For IMAP and NNTP names, open a connection but + dont open a mailbox. +

  • CL_EXPUNGE - Expunge mailbox automatically upon mailbox close + (see also imap_delete() and + imap_expunge()) +

+

Returns true on success and false on error. +


PrevHomeNext
imap_renamemailboxUpimap_subscribe
\ No newline at end of file diff --git a/function.imap-rfc822-parse-adrlist.html b/function.imap-rfc822-parse-adrlist.html new file mode 100644 index 0000000..fed8adb --- /dev/null +++ b/function.imap-rfc822-parse-adrlist.html @@ -0,0 +1,258 @@ +imap_rfc822_parse_adrlist
PHP Manual
PrevNext

imap_rfc822_parse_adrlist

(PHP3 >= 3.0.2, PHP4 )

imap_rfc822_parse_adrlist -- Parses an address string

Description

array + imap_rfc822_parse_adrlist + (string address, string default_host)

This function parses the address string as defined in + RFC822 and + for each address, returns an array of objects. + The objects properties are: +

  • mailbox - the mailbox name (username) +

  • host - the host name +

  • personal - the personal name +

  • adl - at domain source route +

+

Example 1. imap_rfc822_parse_adrlist() example


$address_string = "Hartmut Holzgraefe <hartmut@cvs.php.net>, postmaster@somedomain.net, root";
+$address_array  = imap_rfc822_parse_adrlist($address_string,"somedomain.net");
+if(! is_array($address_array)) die("somethings wrong\n");
+ 
+reset($address_array);
+while(list($key,$val)=each($address_array)){
+  print "mailbox : ".$val->mailbox."<br>\n";
+  print "host    : ".$val->host."<br>\n";
+  print "personal: ".$val->personal."<br>\n";
+  print "adl     : ".$val->adl."<p>\n";
+} 
+      
+


PrevHomeNext
imap_rfc822_write_addressUpimap_setflag_full
\ No newline at end of file diff --git a/function.imap-rfc822-parse-headers.html b/function.imap-rfc822-parse-headers.html new file mode 100644 index 0000000..562d7c2 --- /dev/null +++ b/function.imap-rfc822-parse-headers.html @@ -0,0 +1,181 @@ +imap_rfc822_parse_headers
PHP Manual
PrevNext

imap_rfc822_parse_headers

(PHP4 >= 4.0RC1)

imap_rfc822_parse_headers -- Parse mail headers from a string

Description

object imap_rfc822_parse_headers (string headers [, string + defaulthost])

This function returns an object of various header elements, + similar to imap_header(), except without the + flags and other elements that come from the IMAP server. +


PrevHomeNext
imap_headerUpimap_headers
\ No newline at end of file diff --git a/function.imap-rfc822-write-address.html b/function.imap-rfc822-write-address.html new file mode 100644 index 0000000..214bc92 --- /dev/null +++ b/function.imap-rfc822-write-address.html @@ -0,0 +1,223 @@ +imap_rfc822_write_address
PHP Manual
PrevNext

imap_rfc822_write_address

(PHP3 >= 3.0.2, PHP4 )

imap_rfc822_write_address --  + Returns a properly formatted email address given the mailbox, + host, and personal info. +

Description

string + imap_rfc822_write_address + (string mailbox, string host, string personal)

Returns a properly formatted email address as defined in + RFC822 + given the mailbox, host, and personal info. +

Example 1. imap_rfc822_write_address() example


print imap_rfc822_write_address("hartmut","cvs.php.net","Hartmut Holzgraefe")."\n";      
+      
+


PrevHomeNext
imap_mailboxmsginfoUpimap_rfc822_parse_adrlist
\ No newline at end of file diff --git a/function.imap-scanmailbox.html b/function.imap-scanmailbox.html new file mode 100644 index 0000000..62201ac --- /dev/null +++ b/function.imap-scanmailbox.html @@ -0,0 +1,195 @@ +imap_scanmailbox
PHP Manual
PrevNext

imap_scanmailbox

(PHP3 , PHP4 )

imap_scanmailbox --  + Read the list of mailboxes, takes a string to search for in the + text of the mailbox +

Description

array imap_scanmailbox (int imap_stream, string content)

Returns an array containing the names of the mailboxes that have + string in the text of the mailbox. + This function is simmilar to imap_listmailbox(), + but it will additionally check for the presence of the string + content inside the mailbox data. +


PrevHomeNext
imap_binaryUpimap_mailboxmsginfo
\ No newline at end of file diff --git a/function.imap-search.html b/function.imap-search.html new file mode 100644 index 0000000..327a359 --- /dev/null +++ b/function.imap-search.html @@ -0,0 +1,322 @@ +imap_search
PHP Manual
PrevNext

imap_search

(PHP3 >= 3.0.12, PHP4 >= 4.0b4)

imap_search --  + This function returns an array of messages matching the given + search criteria +

Description

array imap_search (int imap_stream, string criteria, int flags)

This function performs a search on the mailbox currently opened + in the given imap stream. criteria is a + string, delimited by spaces, in which the following keywords are + allowed. Any multi-word arguments (eg. FROM "joey smith") must be + quoted. +

  • ALL - return all messages matching the rest of the criteria +

  • ANSWERED - match messages with the \\ANSWERED flag set +

  • BCC "string" - match messages with "string" in the Bcc: field +

  • BEFORE "date" - match messages with Date: before "date" +

  • BODY "string" - match messages with "string" in the body of the message +

  • CC "string" - match messages with "string" in the Cc: field +

  • DELETED - match deleted messages +

  • FLAGGED - match messages with the \\FLAGGED (sometimes + referred to as Important or Urgent) flag set +

  • FROM "string" - match messages with "string" in the From: field +

  • KEYWORD "string" - match messages with "string" as a keyword +

  • NEW - match new messages +

  • OLD - match old messages +

  • ON "date" - match messages with Date: matching "date" +

  • RECENT - match messages with the \\RECENT flag set +

  • SEEN - match messages that have been read (the \\SEEN flag is set) +

  • SINCE "date" - match messages with Date: after "date" +

  • SUBJECT "string" - match messages with "string" in the Subject: +

  • TEXT "string" - match messages with text "string" +

  • TO "string" - match messages with "string" in the To: +

  • UNANSWERED - match messages that have not been answered +

  • UNDELETED - match messages that are not deleted +

  • UNFLAGGED - match messages that are not flagged +

  • UNKEYWORD "string" - match messages that do not have the + keyword "string" +

  • UNSEEN - match messages which have not been read yet +

+

For example, to match all unanswered messages sent by Mom, you'd + use: "UNANSWERED FROM mom". Searches appear to be case + insensitive. This list of criteria is from a reading of the UW + c-client source code and may be uncomplete or + inaccurate (see also RFC2060, section 6.4.4). +

Valid values for flags are SE_UID, which causes the returned + array to contain UIDs instead of messages sequence numbers. +


PrevHomeNext
imap_msgnoUpimap_last_error
\ No newline at end of file diff --git a/function.imap-setflag-full.html b/function.imap-setflag-full.html new file mode 100644 index 0000000..27db2de --- /dev/null +++ b/function.imap-setflag-full.html @@ -0,0 +1,246 @@ +imap_setflag_full
PHP Manual
PrevNext

imap_setflag_full

(PHP3 >= 3.0.3, PHP4 )

imap_setflag_full -- Sets flags on messages

Description

string imap_setflag_full (int stream, string sequence, string flag, string options)

This function causes a store to add the specified flag to the + flags set for the messages in the specified sequence. +

The flags which you can set are "\\Seen", "\\Answered", + "\\Flagged", "\\Deleted", "\\Draft", and "\\Recent" (as defined + by RFC2060). +

The options are a bit mask with one or more of the following: +


+ST_UID          The sequence argument contains UIDs instead of
+                sequence numbers
+      

+

Example 1. imap_setflag_full() example


$mbox = imap_open("{your.imap.host:143}","username","password")
+     || die("can't connect: ".imap_last_error());
+ 
+$status = imap_setflag_full($mbox,"2,5","\\Seen \\Flagged");
+ 
+print gettype($status)."\n";
+print $status."\n";
+ 
+imap_close($mbox);
+      
+


PrevHomeNext
imap_rfc822_parse_adrlistUpimap_clearflag_full
\ No newline at end of file diff --git a/function.imap-sort.html b/function.imap-sort.html new file mode 100644 index 0000000..21c6653 --- /dev/null +++ b/function.imap-sort.html @@ -0,0 +1,226 @@ +imap_sort
PHP Manual
PrevNext

imap_sort

(PHP3 >= 3.0.3, PHP4 )

imap_sort -- Sort an array of message headers

Description

array imap_sort (int stream, int criteria, int reverse, int options)

Returns an array of message numbers sorted by the given + parameters. +

Reverse is 1 for reverse-sorting. +

Criteria can be one (and only one) of the following: +


+SORTDATE        message Date
+SORTARRIVAL     arrival date
+SORTFROM        mailbox in first From address
+SORTSUBJECT     message Subject
+SORTTO          mailbox in first To address 
+SORTCC          mailbox in first cc address 
+SORTSIZE        size of message in octets
+      

+

The flags are a bitmask of one or more of the following: +


+SE_UID          Return UIDs instead of sequence numbers
+SE_NOPREFETCH   Don't prefetch searched messages.
+      

+


PrevHomeNext
imap_clearflag_fullUpimap_fetchheader
\ No newline at end of file diff --git a/function.imap-status.html b/function.imap-status.html new file mode 100644 index 0000000..af8f409 --- /dev/null +++ b/function.imap-status.html @@ -0,0 +1,273 @@ +imap_status
PHP Manual
PrevNext

imap_status

(PHP3 >= 3.0.4, PHP4 )

imap_status --  + This function returns status information on a mailbox other than + the current one +

Description

object imap_status (int imap_stream, string mailbox, int options)

This function returns an object containing status + information. Valid flags are: +

  • SA_MESSAGES - set status->messages to the number of messages + in the mailbox +

  • SA_RECENT - set status->recent to the number of recent + messages in the mailbox +

  • SA_UNSEEN - set status->unseen to the number of unseen (new) + messages in the mailbox +

  • SA_UIDNEXT - set status->uidnext to the next uid to be used in + the mailbox +

  • SA_UIDVALIDITY - set status->uidvalidity to a constant that + changes when uids for the mailbox may no longer be valid +

  • SA_ALL - set all of the above +

+

status->flags is also set, which contains a bitmask which can be + checked against any of the above constants. +

Example 1. imap_status() example


$mbox = imap_open("{your.imap.host}","username","password",OP_HALFOPEN)
+      || die("can't connect: ".imap_last_error());
+ 
+$status = imap_status($mbox,"{your.imap.host}INBOX",SA_ALL);
+if($status) {
+  print("Messages:   ". $status->messages   )."<br>\n";
+  print("Recent:     ". $status->recent     )."<br>\n";
+  print("Unseen:     ". $status->unseen     )."<br>\n";
+  print("UIDnext:    ". $status->uidnext    )."<br>\n";
+  print("UIDvalidity:". $status->uidvalidity)."<br>\n"; 
+} else
+  print "imap_status failed: ".imap_lasterror()."\n";
+ 
+imap_close($mbox);
+      
+


PrevHomeNext
imap_alertsUpimap_utf7_decode
\ No newline at end of file diff --git a/function.imap-subscribe.html b/function.imap-subscribe.html new file mode 100644 index 0000000..7df87f1 --- /dev/null +++ b/function.imap-subscribe.html @@ -0,0 +1,176 @@ +imap_subscribe
PHP Manual
PrevNext

imap_subscribe

(PHP3 , PHP4 )

imap_subscribe -- Subscribe to a mailbox

Description

int imap_subscribe (int imap_stream, string mbox)

+ Subscribe to a new mailbox. +

Returns true on success and false on error. +


PrevHomeNext
imap_reopenUpimap_undelete
\ No newline at end of file diff --git a/function.imap-uid.html b/function.imap-uid.html new file mode 100644 index 0000000..73c89fb --- /dev/null +++ b/function.imap-uid.html @@ -0,0 +1,185 @@ +imap_uid
PHP Manual
PrevNext

imap_uid

(PHP3 >= 3.0.3, PHP4 )

imap_uid --  + This function returns the UID for the given message sequence + number +

Description

int imap_uid (int imap_stream, int msgno)

This function returns the UID for the given message sequence + number. An UID is an unique identifier that will not change over + time while a message sequence number may change whenever the + content of the mailbox changes. This function is the inverse of + imap_msgno(). +


PrevHomeNext
imap_fetchheaderUpimap_msgno
\ No newline at end of file diff --git a/function.imap-undelete.html b/function.imap-undelete.html new file mode 100644 index 0000000..2dae614 --- /dev/null +++ b/function.imap-undelete.html @@ -0,0 +1,192 @@ +imap_undelete
PHP Manual
PrevNext

imap_undelete

(PHP3 , PHP4 )

imap_undelete --  + Unmark the message which is marked deleted +

Description

int imap_undelete (int imap_stream, int msg_number)

+ This function removes the deletion flag for a specified message, + which is set by imap_delete() or + imap_mail_move(). +

Returns true on success and false on error. +


PrevHomeNext
imap_subscribeUpimap_unsubscribe
\ No newline at end of file diff --git a/function.imap-unsubscribe.html b/function.imap-unsubscribe.html new file mode 100644 index 0000000..e314017 --- /dev/null +++ b/function.imap-unsubscribe.html @@ -0,0 +1,176 @@ +imap_unsubscribe
PHP Manual
PrevNext

imap_unsubscribe

(PHP3 , PHP4 )

imap_unsubscribe -- Unsubscribe from a mailbox

Description

int imap_unsubscribe (int imap_stream, string mbox)

+ Unsubscribe from a specified mailbox. +

Returns true on success and false on error. +


PrevHomeNext
imap_undeleteUpimap_qprint
\ No newline at end of file diff --git a/function.imap-utf7-decode.html b/function.imap-utf7-decode.html new file mode 100644 index 0000000..7c094ae --- /dev/null +++ b/function.imap-utf7-decode.html @@ -0,0 +1,196 @@ +imap_utf7_decode
PHP Manual
PrevNext

imap_utf7_decode

(PHP3 >= 3.0.15, PHP4 >= 4.0b4)

imap_utf7_decode --  + Decodes a modified UTF-7 encoded string. +

Description

string imap_utf7_decode (string text)

+ Decodes modified UTF-7 text into 8bit data. +

Returns the decoded 8bit data, or false if the input string was + not valid modified UTF-7. This function is needed to decode + mailbox names that contain international characters outside of + the printable ASCII range. The modified UTF-7 encoding is defined + in RFC 2060, section + 5.1.3 (original UTF-7 was defned in RFC1642). +


PrevHomeNext
imap_statusUpimap_utf7_encode
\ No newline at end of file diff --git a/function.imap-utf7-encode.html b/function.imap-utf7-encode.html new file mode 100644 index 0000000..785a5e1 --- /dev/null +++ b/function.imap-utf7-encode.html @@ -0,0 +1,194 @@ +imap_utf7_encode
PHP Manual
PrevNext

imap_utf7_encode

(PHP3 >= 3.0.15, PHP4 >= 4.0b4)

imap_utf7_encode --  + Converts 8bit data to modified UTF-7 text. +

Description

string imap_utf7_encode (string data)

Converts 8bit data to modified UTF-7 + text. This is needed to encode mailbox names that contain + international characters outside of the printable ASCII + range. The modified UTF-7 encoding is defined in RFC 2060, section 5.1.3 + (original UTF-7 was defned in RFC1642). +

Returns the modified UTF-7 text. +


PrevHomeNext
imap_utf7_decodeUpimap_utf8
\ No newline at end of file diff --git a/function.imap-utf8.html b/function.imap-utf8.html new file mode 100644 index 0000000..40cde91 --- /dev/null +++ b/function.imap-utf8.html @@ -0,0 +1,185 @@ +imap_utf8
PHP Manual
PrevNext

imap_utf8

(PHP3 >= 3.0.13, PHP4 >= 4.0RC1)

imap_utf8 --  + Converts text to UTF8 +

Description

string imap_utf8 (string text)

Converts the given text to + UTF8 (as defined in + RFC2044). +


PrevHomeNext
imap_utf7_encodeUpimap_fetch_overview
\ No newline at end of file diff --git a/function.implode.html b/function.implode.html new file mode 100644 index 0000000..f106826 --- /dev/null +++ b/function.implode.html @@ -0,0 +1,234 @@ +implode
PHP Manual
PrevNext

implode

(PHP3 , PHP4 )

implode -- Join array elements with a string

Description

string implode (string glue, array pieces)

Returns a string containing a string representation of all the + array elements in the same order, with the glue string between + each element. +

Example 1. Implode() example


$colon_separated = implode (":", $array);
+      
+

See also explode(), join(), + and split(). +


PrevHomeNext
htmlspecialcharsUpjoin
\ No newline at end of file diff --git a/function.in-array.html b/function.in-array.html new file mode 100644 index 0000000..efacc4a --- /dev/null +++ b/function.in-array.html @@ -0,0 +1,223 @@ +in_array
PHP Manual
PrevNext

in_array

(PHP4 )

in_array -- Return true if a value exists in an array

Description

bool in_array (mixed needle, array haystack)

Searches haystack for + needle and returns true if it is found in + the array, false otherwise. +

Example 1. In_array() example


$os = array ("Mac", "NT", "Irix", "Linux");
+if (in_array ("Irix", $os))
+    print "Got Irix";
+      
+


PrevHomeNext
extractUpkey
\ No newline at end of file diff --git a/function.include-once.html b/function.include-once.html new file mode 100644 index 0000000..4858066 --- /dev/null +++ b/function.include-once.html @@ -0,0 +1,254 @@ +include_once
PHP Manual
PrevChapter 11. Control StructuresNext

include_once()

The include_once() statement includes and evaluates + the specified file during the execution of the script. + This is a behavior similar to the include() statement, + with the important difference that if the code from a file has already + been included, it will not be included again. +

As mentioned in the require_once() description, the + include_once() should be used in the cases in which + the same file might be included and evaluated more than once during a + particular execution of a script, and you want to be sure that it is + included exactly once to avoid problems with function redefinitions, + variable value reassignments, etc. +

For more examples on using require_once() and + include_once(), look at the PEAR code included in + the latest PHP source code distributions. +

See also: require(), + include(), require_once(), + get_required_files(), + get_included_files(), readfile(), + and virtual(). +


PrevHomeNext
require_once()UpFunctions
\ No newline at end of file diff --git a/function.include.html b/function.include.html new file mode 100644 index 0000000..fe72558 --- /dev/null +++ b/function.include.html @@ -0,0 +1,713 @@ +include
PHP Manual
PrevChapter 11. Control StructuresNext

include()

The include() statement includes and evaluates + the specified file. +

If "URL fopen wrappers" are enabled in PHP (which they are in the + default configuration), you can specify the file to be + include()ed using an URL instead of a local + pathname. See Remote + files and fopen() for more information. +

An important note about how this works is that when a file is + include()ed or require()ed, + parsing drops out of PHP mode and into HTML mode at the beginning + of the target file, and resumes again at the end. For this reason, + any code inside the target file which should be executed as PHP + code must be enclosed within valid PHP start and end + tags. +

This happens each time the include() statement + is encountered, so you can use an include() + statement within a looping structure to include a number of + different files. +


$files = array ('first.inc', 'second.inc', 'third.inc');
+for ($i = 0; $i < count($files); $i++) {
+    include $files[$i];
+}
+     

+

include() differs from + require() in that the include statement is + re-evaluated each time it is encountered (and only when it is + being executed), whereas the require() + statement is replaced by the required file when it is first + encountered, whether the contents of the file will be evaluated or + not (for example, if it is inside an if statement whose + condition evaluated to false). +

Because include() is a special language + construct, you must enclose it within a statement block if it is + inside a conditional block. +


/* This is WRONG and will not work as desired. */
+ 
+if ($condition)
+    include($file);
+else
+    include($other);
+ 
+/* This is CORRECT. */
+ 
+if ($condition) {
+    include($file);
+} else {
+    include($other);
+}
+     

+

In both PHP 3 and PHP 4, it is possible to execute a + return statement inside an + include()ed file, in order to terminate + processing in that file and return to the script which called + it. Some differences in the way this works exist, however. The + first is that in PHP 3, the return may not + appear inside a block unless it's a function block, in which case + the return applies to that function and not the + whole file. In PHP 4, however, this restriction does not + exist. Also, PHP 4 allows you to return values from + include()ed files. You can take the value of + the include() call as you would a normal + function. This generates a parse error in PHP 3. +

Example 11-1. include() in PHP 3 and PHP 4

Assume the existence of the following file (named + test.inc) in the same directory as the main + file: +

<?php
+echo "Before the return <br>\n";
+if (1) {
+    return 27;
+}
+echo "After the return <br>\n";
+?>
+     
+

Assume that the main file (main.html) + contains the following: +

<?php
+$retval = include ('test.inc');
+echo "File returned: '$retval'<br>\n";
+?>
+     
+

When main.html is called in PHP 3, it will + generate a parse error on line 2; you can't take the value of an + include() in PHP 3. In PHP 4, however, the + result will be: +

Before the return
+File returned: '27'
+     
+

Now, assume that main.html has been altered + to contain the following: +

<?php
+include ('test.inc');
+echo "Back in main.html<br>\n";
+?>
+     
+

In PHP 4, the output will be: +

Before the return
+Back in main.html
+     
+ However, PHP 3 will give the following output: +

Before the return 
+27Back in main.html
+
+Parse error: parse error in /home/torben/public_html/phptest/main.html on line 5
+     
+

The above parse error is a result of the fact that the + return statement is enclosed in a non-function + block within test.inc. When the return is + moved outside of the block, the output is: +

Before the return
+27Back in main.html
+     
+

The spurious '27' is due to the fact that PHP 3 does not support + returning values from files like that. +

When a file is include()ed, the code it + contains inherits the variable scope of the line on which the + include() occurs. Any variables available at + that line in the calling file will be available within the called + file. If the include() occurs inside a + function within the calling file, then all of the code contained + in the called file will behave as though it had been defined + inside that function. +

If the include()ed file is called via HTTP + using the fopen wrappers, and if the target server interprets the + target file as PHP code, variables may be passed to the + include()ed file using an URL request string as + used with HTTP GET. This is not strictly speaking the same thing + as include()ing the file and having it inherit + the parent file's variable scope; the script is actually being run + on the remote server and the result is then being included into + the local script. +


/* This example assumes that someserver is configured to parse .php
+ * files and not .txt files. Also, 'works' here means that the variables 
+ * $varone and $vartwo are available within the include()ed file. */
+
+/* Won't work; file.txt wasn't handled by someserver. */
+include ("http://someserver/file.txt?varone=1&vartwo=2");
+
+/* Won't work; looks for a file named 'file.php?varone=1&vartwo=2'
+ * on the local filesystem. */
+include ("file.php?varone=1&vartwo=2");               
+
+/* Works. */
+include ("http://someserver/file.php?varone=1&vartwo=2"); 
+
+$varone = 1;
+$vartwo = 2;
+include ("file.txt");  /* Works. */
+include ("file.php");  /* Works. */
+     

+

See also require(), require_once(), + include_once(), readfile(), + and virtual(). +


PrevHomeNext
require()Uprequire_once()
\ No newline at end of file diff --git a/function.ini-alter.html b/function.ini-alter.html new file mode 100644 index 0000000..9a5e2e9 --- /dev/null +++ b/function.ini-alter.html @@ -0,0 +1,218 @@ +ini_alter
PHP Manual
PrevNext

ini_alter

(PHP4 )

ini_alter -- Change the value of a configuration option

Description

string ini_alter (string varname, string newvalue)

Changes the value of a configuration option, returns + false on failure, and the previous value of the + configuration option on success. +

Note: + This is an alias of ini_set() +

See also ini_get(), + ini_restore(), + ini_set() +


PrevHomeNext
getrusageUpini_get
\ No newline at end of file diff --git a/function.ini-get.html b/function.ini-get.html new file mode 100644 index 0000000..eeb981a --- /dev/null +++ b/function.ini-get.html @@ -0,0 +1,199 @@ +ini_get
PHP Manual
PrevNext

ini_get

(PHP4 )

ini_get -- Get the value of a configuration option

Description

string ini_get (string varname)

Returns the value of the configuration option on success, + false on failure. +

See also ini_alter(), + ini_restore(), + ini_set() +


PrevHomeNext
ini_alterUpini_restore
\ No newline at end of file diff --git a/function.ini-restore.html b/function.ini-restore.html new file mode 100644 index 0000000..e384002 --- /dev/null +++ b/function.ini-restore.html @@ -0,0 +1,195 @@ +ini_restore
PHP Manual
PrevNext

ini_restore

(PHP4 )

ini_restore -- Restore the value of a configuration option

Description

string ini_restore (string varname)

Restores a given configuration option to its original value. +

See also ini_alter(), + ini_get(), + ini_set() +


PrevHomeNext
ini_getUpini_set
\ No newline at end of file diff --git a/function.ini-set.html b/function.ini-set.html new file mode 100644 index 0000000..63701d8 --- /dev/null +++ b/function.ini-set.html @@ -0,0 +1,199 @@ +ini_set
PHP Manual
PrevNext

ini_set

(PHP4 >= 4.0RC1)

ini_set -- Set the value of a configuration option

Description

string ini_set (string varname, string newvalue)

Sets the value of the given configuration option. Returns the old + value on success, false on failure. +

See also ini_alter(), + ini_get(), + ini_restore() +


PrevHomeNext
ini_restoreUpphpcredits
\ No newline at end of file diff --git a/function.intval.html b/function.intval.html new file mode 100644 index 0000000..e2e6093 --- /dev/null +++ b/function.intval.html @@ -0,0 +1,219 @@ +intval
PHP Manual
PrevNext

intval

(PHP3 , PHP4 )

intval -- Get integer value of a variable

Description

int intval (mixed var [, int + base])

Returns the integer value of var, + using the specified base for the conversion (the default is + base 10). +

Var may be any scalar type. You cannot use + intval() on arrays or objects. +

See also doubleval(), + strval(), settype() and + Type + juggling. +


PrevHomeNext
gettypeUpis_array
\ No newline at end of file diff --git a/function.ip2long.html b/function.ip2long.html new file mode 100644 index 0000000..9119b9e --- /dev/null +++ b/function.ip2long.html @@ -0,0 +1,232 @@ +ip2long
PHP Manual
PrevNext

ip2long

(PHP4 >= 4.0RC1)

ip2long --  + Converts a string containing an (IPv4) Internet Protocol dotted address + into a proper address. +

Description

int ip2long (string ip_address)

The function ip2long() generates an IPv4 Internet + network address from its Internet standard format (dotted string) + representation. +

Example 1. Ip2long() Example


<?
+$ip = gethostbyname("www.php.net");
+$out = "The following URLs are equivalent:<br>\n";
+$out .= "http://www.php.net/, http://".$ip."/, and http://".ip2long($ip)."/<br>\n";
+echo $out;
+?>
+     
+

See also: long2ip() +


PrevHomeNext
getservbyportUplong2ip
\ No newline at end of file diff --git a/function.iptcparse.html b/function.iptcparse.html new file mode 100644 index 0000000..2932c82 --- /dev/null +++ b/function.iptcparse.html @@ -0,0 +1,185 @@ +iptcparse
PHP Manual
PrevNext

iptcparse

(PHP3 >= 3.0.6, PHP4 )

iptcparse --  + Parse a binary IPTC http://www.xe.net/iptc/ + block into single tags. +

Description

array iptcparse (string iptcblock)

This function parses a binary IPTC block into its single tags. It + returns an array using the tagmarker as an index and the value as + the value. It returns false on error or if no IPTC data was + found. See GetImageSize() for a sample. +


PrevHomeNext
ignore_user_abortUpleak
\ No newline at end of file diff --git a/function.is-array.html b/function.is-array.html new file mode 100644 index 0000000..6859c1d --- /dev/null +++ b/function.is-array.html @@ -0,0 +1,236 @@ +is_array
PHP Manual
PrevNext

is_array

(PHP3 , PHP4 )

is_array -- Finds whether a variable is an array

Description

int is_array (mixed var)

Returns true if var is an array, false + otherwise. +

See also is_double(), + is_float(), + is_int(), + is_integer(), + is_real(), + is_string(), + is_long(), and + is_object(). +


PrevHomeNext
intvalUpis_bool
\ No newline at end of file diff --git a/function.is-bool.html b/function.is-bool.html new file mode 100644 index 0000000..2cdb376 --- /dev/null +++ b/function.is-bool.html @@ -0,0 +1,248 @@ +is_bool
PHP Manual
PrevNext

is_bool

(PHP4 >= 4.0b4)

is_bool --  + Finds out whether a variable is a boolean +

Description

int + is_bool + (mixed + var)

Returns true if the var parameter is + a boolean. +

See also is_array(), + is_double(), + is_float(), + is_int(), + is_integer(), + is_real(), + is_string(), + is_long(), and + is_object(). +


PrevHomeNext
is_arrayUpis_double
\ No newline at end of file diff --git a/function.is-dir.html b/function.is-dir.html new file mode 100644 index 0000000..519e824 --- /dev/null +++ b/function.is-dir.html @@ -0,0 +1,198 @@ +is_dir
PHP Manual
PrevNext

is_dir

(PHP3 , PHP4 )

is_dir -- Tells whether the filename is a directory

Description

bool is_dir (string filename)

Returns true if the filename exists and is a directory. +

The results of this function are cached. See + clearstatcache() for more details. +

See also is_file() and + is_link(). +


PrevHomeNext
set_file_bufferUpis_executable
\ No newline at end of file diff --git a/function.is-double.html b/function.is-double.html new file mode 100644 index 0000000..88dcddd --- /dev/null +++ b/function.is-double.html @@ -0,0 +1,243 @@ +is_double
PHP Manual
PrevNext

is_double

(PHP3 , PHP4 )

is_double -- Finds whether a variable is a double

Description

int is_double (mixed var)

Returns true if var is a double, + false otherwise. +

See also is_array(), + is_bool(), + is_float(), + is_int(), + is_integer(), + is_real(), + is_string(), + is_long(), and + is_object(). +


PrevHomeNext
is_boolUpis_float
\ No newline at end of file diff --git a/function.is-executable.html b/function.is-executable.html new file mode 100644 index 0000000..81c33a3 --- /dev/null +++ b/function.is-executable.html @@ -0,0 +1,198 @@ +is_executable
PHP Manual
PrevNext

is_executable

(PHP3 , PHP4 )

is_executable -- Tells whether the filename is executable

Description

bool is_executable (string filename)

Returns true if the filename exists and is executable. +

The results of this function are cached. See + clearstatcache() for more details. +

See also is_file() and + is_link(). +


PrevHomeNext
is_dirUpis_file
\ No newline at end of file diff --git a/function.is-file.html b/function.is-file.html new file mode 100644 index 0000000..8ad0395 --- /dev/null +++ b/function.is-file.html @@ -0,0 +1,200 @@ +is_file
PHP Manual
PrevNext

is_file

(PHP3 , PHP4 )

is_file --  + Tells whether the filename is a regular file +

Description

bool is_file (string filename)

Returns true if the filename exists and is a regular file. +

The results of this function are cached. See + clearstatcache() for more details. +

See also is_dir() and + is_link(). +


PrevHomeNext
is_executableUpis_link
\ No newline at end of file diff --git a/function.is-float.html b/function.is-float.html new file mode 100644 index 0000000..d07821b --- /dev/null +++ b/function.is-float.html @@ -0,0 +1,243 @@ +is_float
PHP Manual
PrevNext

is_float

(PHP3 , PHP4 )

is_float -- Finds whether a variable is a float

Description

int is_float (mixed var)

This function is an alias for is_double(). +

See also is_double(), + is_bool(), + is_real(), + is_int(), + is_integer(), + is_string(), + is_object(), + is_array(), and + is_long(). +


PrevHomeNext
is_doubleUpis_int
\ No newline at end of file diff --git a/function.is-int.html b/function.is-int.html new file mode 100644 index 0000000..2ace8ba --- /dev/null +++ b/function.is-int.html @@ -0,0 +1,243 @@ +is_int
PHP Manual
PrevNext

is_int

(PHP3 , PHP4 )

is_int -- Find whether a variable is an integer

Description

int is_int (mixed var)

This function is an alias for is_long(). +

See also is_bool(), + is_double(), + is_float(), + is_integer(), + is_string(), + is_real(), + is_object(), + is_array(), and + is_long(). +


PrevHomeNext
is_floatUpis_integer
\ No newline at end of file diff --git a/function.is-integer.html b/function.is-integer.html new file mode 100644 index 0000000..0ad5258 --- /dev/null +++ b/function.is-integer.html @@ -0,0 +1,244 @@ +is_integer
PHP Manual
PrevNext

is_integer

(PHP3 , PHP4 )

is_integer -- Find whether a variable is an integer

Description

int is_integer (mixed var)

This function is an alias for + is_long(). +

See also is_bool(), + is_double(), + is_float(), + is_int(), + is_string(), + is_real(), + is_object(), + is_array(), and + is_long(). +


PrevHomeNext
is_intUpis_long
\ No newline at end of file diff --git a/function.is-link.html b/function.is-link.html new file mode 100644 index 0000000..ffe01b3 --- /dev/null +++ b/function.is-link.html @@ -0,0 +1,212 @@ +is_link
PHP Manual
PrevNext

is_link

(PHP3 , PHP4 )

is_link --  + Tells whether the filename is a symbolic link +

Description

bool is_link (string filename)

Returns true if the filename exists and is a symbolic link. +

The results of this function are cached. See + clearstatcache() for more details. +

See also is_dir() and + is_file(). +

Note: + This function does not work on Windows systems +


PrevHomeNext
is_fileUpis_readable
\ No newline at end of file diff --git a/function.is-long.html b/function.is-long.html new file mode 100644 index 0000000..a8dedd4 --- /dev/null +++ b/function.is-long.html @@ -0,0 +1,243 @@ +is_long
PHP Manual
PrevNext

is_long

(PHP3 , PHP4 )

is_long -- Finds whether a variable is an integer

Description

int is_long (mixed var)

Returns true if var is an integer (long), + false otherwise. +

See also is_bool(), + is_double(), + is_float(), + is_int(), + is_real(), + is_string(), + is_object(), + is_array(), and + is_integer(). +


PrevHomeNext
is_integerUpis_numeric
\ No newline at end of file diff --git a/function.is-numeric.html b/function.is-numeric.html new file mode 100644 index 0000000..d79beee --- /dev/null +++ b/function.is-numeric.html @@ -0,0 +1,245 @@ +is_numeric
PHP Manual
PrevNext

is_numeric

(PHP4 >= 4.0RC1)

is_numeric --  + Finds whether a variable is a number or a numeric string +

Description

int is_numeric (mixed var)

Returns true if var is a number or a + numeric string, false otherwise. +

See also is_bool(), + is_double(), + is_float(), + is_int(), + is_real(), + is_string(), + is_object(), + is_array(), and + is_integer(). +


PrevHomeNext
is_longUpis_object
\ No newline at end of file diff --git a/function.is-object.html b/function.is-object.html new file mode 100644 index 0000000..fdd89ec --- /dev/null +++ b/function.is-object.html @@ -0,0 +1,243 @@ +is_object
PHP Manual
PrevNext

is_object

(PHP3 , PHP4 )

is_object -- Finds whether a variable is an object

Description

int is_object (mixed var)

Returns true if var is an object, false + otherwise. +

See also is_bool(), + is_long(), + is_int(), + is_integer(), + is_float(), + is_double(), + is_real(), + is_string(), and + is_array(). +


PrevHomeNext
is_numericUpis_real
\ No newline at end of file diff --git a/function.is-readable.html b/function.is-readable.html new file mode 100644 index 0000000..ba5081e --- /dev/null +++ b/function.is-readable.html @@ -0,0 +1,198 @@ +is_readable
PHP Manual
PrevNext

is_readable

(PHP3 , PHP4 )

is_readable --  + Tells whether the filename is readable +

Description

bool is_readable (string filename)

Returns true if the filename exists and is readable. +

Keep in mind that PHP may be accessing the file as the user + id that the web server runs as (often 'nobody'). Safe mode + limitations are not taken into account. +

The results of this function are cached. See + clearstatcache() for more details. +

See also is_writeable(). +


PrevHomeNext
is_linkUpis_writeable
\ No newline at end of file diff --git a/function.is-real.html b/function.is-real.html new file mode 100644 index 0000000..a0a68b5 --- /dev/null +++ b/function.is-real.html @@ -0,0 +1,243 @@ +is_real
PHP Manual
PrevNext

is_real

(PHP3 , PHP4 )

is_real -- Finds whether a variable is a real

Description

int is_real (mixed var)

This function is an alias for is_double(). +

See also is_bool(), + is_long(), + is_int(), + is_integer(), + is_float(), + is_double(), + is_object(), + is_string(), and + is_array(). +


PrevHomeNext
is_objectUpis_resource
\ No newline at end of file diff --git a/function.is-resource.html b/function.is-resource.html new file mode 100644 index 0000000..8d9ee54 --- /dev/null +++ b/function.is-resource.html @@ -0,0 +1,193 @@ +is_resource
PHP Manual
PrevNext

is_resource

(PHP4 >= 4.0b4)

is_resource --  + Finds whether a variable is a resource +

Description

int + is_resource + (mixed + var)

is_resource() returns true if the variable + given by the var parameter is a resource, + otherwise it returns false. +

Resources are things like file or database result handles that + are allocated and freed by internal PHP functions and that may + need some cleanup when they are no longer in use but haven't been + freed by user code. +


PrevHomeNext
is_realUpis_string
\ No newline at end of file diff --git a/function.is-string.html b/function.is-string.html new file mode 100644 index 0000000..42afb69 --- /dev/null +++ b/function.is-string.html @@ -0,0 +1,243 @@ +is_string
PHP Manual
PrevNext

is_string

(PHP3 , PHP4 )

is_string -- Finds whether a variable is a string

Description

int is_string (mixed var)

Returns true if var is a string, + false otherwise. +

See also is_bool(), + is_long(), + is_int(), + is_integer(), + is_float(), + is_double(), + is_real(), + is_object(), and + is_array(). +


PrevHomeNext
is_resourceUpisset
\ No newline at end of file diff --git a/function.is-subclass-of.html b/function.is-subclass-of.html new file mode 100644 index 0000000..bf151bc --- /dev/null +++ b/function.is-subclass-of.html @@ -0,0 +1,203 @@ +is_subclass_of
PHP Manual
PrevNext

is_subclass_of

(PHP4 >= 4.0b4)

is_subclass_of --  + Determines if an object belongs to a subclass + of the specified class +

Description

bool is_subclass_of (object obj, string superclass)

This function returns true if the object obj, + belongs to a class which is a subclass of + superclass, false otherwise. +

See also get_class(), + get_parent_class() +


PrevHomeNext
get_parent_classUpmethod_exists
\ No newline at end of file diff --git a/function.is-uploaded-file.html b/function.is-uploaded-file.html new file mode 100644 index 0000000..8cb68f9 --- /dev/null +++ b/function.is-uploaded-file.html @@ -0,0 +1,206 @@ +is_uploaded_file
PHP Manual
PrevNext

is_uploaded_file

(PHP3 CVS only, PHP4 CVS only)

is_uploaded_file -- Tells whether the file was uploaded via HTTP POST.

Description

bool is_uploaded_file (string filename)

This function is available only in versions of PHP 3 after PHP + 3.0.16, and in versions of PHP 4 after 4.0.2. +

Returns true if the file named by filename was + uploaded via HTTP POST. This is useful to help ensure that a + malicious user hasn't tried to trick the script into working on + files upon which it should not be working--for instance, + /etc/passwd. +

This sort of check is especially important if there is any chance + that anything done with uploaded files could reveal their + contents to the user, or even to other users on the same + system. +

See also move_uploaded_file(), and the section + Handling file uploads + for a simple usage example. +


PrevHomeNext
is_writeableUplink
\ No newline at end of file diff --git a/function.is-writeable.html b/function.is-writeable.html new file mode 100644 index 0000000..29b9b55 --- /dev/null +++ b/function.is-writeable.html @@ -0,0 +1,198 @@ +is_writeable
PHP Manual
PrevNext

is_writeable

(PHP3 , PHP4 )

is_writeable -- Tells whether the filename is writeable

Description

bool is_writeable (string filename)

Returns true if the filename exists and is writeable. The + filename argument may be a directory name allowing you to check + if a directory is writeable. +

Keep in mind that PHP may be accessing the file as the user id + that the web server runs as (often 'nobody'). Safe mode + limitations are not taken into account. +

The results of this function are cached. See + clearstatcache() for more details. +

See also is_readable(). +


PrevHomeNext
is_readableUpis_uploaded_file
\ No newline at end of file diff --git a/function.isset.html b/function.isset.html new file mode 100644 index 0000000..0ade27d --- /dev/null +++ b/function.isset.html @@ -0,0 +1,234 @@ +isset
PHP Manual
PrevNext

isset

(unknown)

isset -- Determine whether a variable is set

Description

int isset (mixed var)

Returns true if var exists; + false otherwise. +

If a variable has been unset with unset(), + it will no longer be isset(). +


$a = "test";
+echo isset ($a); // true
+unset ($a);
+echo isset ($a); // false
+      

+

See also empty() and + unset(). +


PrevHomeNext
is_stringUpprint_r
\ No newline at end of file diff --git a/function.jddayofweek.html b/function.jddayofweek.html new file mode 100644 index 0000000..1ba79af --- /dev/null +++ b/function.jddayofweek.html @@ -0,0 +1,237 @@ +JDDayOfWeek
PHP Manual
PrevNext

JDDayOfWeek

(PHP3 , PHP4 )

JDDayOfWeek -- Returns the day of the week

Description

mixed jddayofweek (int julianday, int mode)

Returns the day of the week. Can return a string or an int + depending on the mode. +

Table 1. Calendar week modes

ModeMeaning
0 Returns the day number as an int (0=sunday, 1=monday, etc) +
1 Returns string containing the day of week + (english-gregorian) +
2 Returns a string containing the abbreviated day of week + (english-gregorian) +
+


PrevHomeNext
JDMonthNameUpeaster_date
\ No newline at end of file diff --git a/function.jdmonthname.html b/function.jdmonthname.html new file mode 100644 index 0000000..8174780 --- /dev/null +++ b/function.jdmonthname.html @@ -0,0 +1,269 @@ +JDMonthName
PHP Manual
PrevNext

JDMonthName

(PHP3 , PHP4 )

JDMonthName -- Returns a month name

Description

string jdmonthname (int julianday, int mode)

Returns a string containing a month name. + mode tells this function which calendar to + convert the Julian Day Count to, and what type of month names are + to be returned. +

Table 1. Calendar modes

ModeMeaning
0Gregorian - abbreviated
1Gregorian
2Julian - abbreviated
3Julian
4Jewish
5French Republican
+


PrevHomeNext
FrenchToJDUpJDDayOfWeek
\ No newline at end of file diff --git a/function.jdtofrench.html b/function.jdtofrench.html new file mode 100644 index 0000000..75d7c87 --- /dev/null +++ b/function.jdtofrench.html @@ -0,0 +1,174 @@ +JDToFrench
PHP Manual
PrevNext

JDToFrench

(PHP3 , PHP4 )

JDToFrench --  + Converts a Julian Day Count to the French Republican Calendar +

Description

string jdtofrench (int month, int day, int year)

Converts a Julian Day Count to the French Republican Calendar. +


PrevHomeNext
JewishToJDUpFrenchToJD
\ No newline at end of file diff --git a/function.jdtogregorian.html b/function.jdtogregorian.html new file mode 100644 index 0000000..93e1817 --- /dev/null +++ b/function.jdtogregorian.html @@ -0,0 +1,173 @@ +JDToGregorian
PHP Manual
PrevNext

JDToGregorian

(PHP3 , PHP4 )

JDToGregorian -- Converts Julian Day Count to Gregorian date

Description

string jdtogregorian (int julianday)

Converts Julian Day Count to a string containing the Gregorian + date in the format of "month/day/year". +


PrevHomeNext
Calendar functionsUpGregorianToJD
\ No newline at end of file diff --git a/function.jdtojewish.html b/function.jdtojewish.html new file mode 100644 index 0000000..96f47d7 --- /dev/null +++ b/function.jdtojewish.html @@ -0,0 +1,174 @@ +JDToJewish
PHP Manual
PrevNext

JDToJewish

(PHP3 , PHP4 )

JDToJewish --  + Converts a Julian Day Count to the Jewish Calendar +

Description

string jdtojewish (int julianday)

Converts a Julian Day Count the the Jewish Calendar. +


PrevHomeNext
JulianToJDUpJewishToJD
\ No newline at end of file diff --git a/function.jdtojulian.html b/function.jdtojulian.html new file mode 100644 index 0000000..e844153 --- /dev/null +++ b/function.jdtojulian.html @@ -0,0 +1,175 @@ +JDToJulian
PHP Manual
PrevNext

JDToJulian

(PHP3 , PHP4 )

JDToJulian --  + Converts a Julian Day Count to a Julian Calendar Date +

Description

string jdtojulian (int julianday)

Converts Julian Day Count to a string containing the Julian + Calendar Date in the format of "month/day/year". +


PrevHomeNext
GregorianToJDUpJulianToJD
\ No newline at end of file diff --git a/function.jdtounix.html b/function.jdtounix.html new file mode 100644 index 0000000..c8f5b3f --- /dev/null +++ b/function.jdtounix.html @@ -0,0 +1,209 @@ +jdtounix
PHP Manual
PrevNext

jdtounix

(PHP4 >= 4.0RC2)

jdtounix -- Convert Julian Day to UNIX timestamp

Description

int jdtounix (int jday)

This function will return a UNIX timestamp corresponding to the + Julian Day given in jday or false if + jday is not inside the UNIX epoch + (Gregorian years between 1970 and 2037 or 2440588 <= + jday <= 2465342 ) +

See also jdtounix(). +

Note: + This function is only available in PHP versions after PHP4RC1. +


PrevHomeNext
unixtojdUpCCVS API Functions
\ No newline at end of file diff --git a/function.jewishtojd.html b/function.jewishtojd.html new file mode 100644 index 0000000..a286eee --- /dev/null +++ b/function.jewishtojd.html @@ -0,0 +1,181 @@ +JewishToJD
PHP Manual
PrevNext

JewishToJD

(PHP3 , PHP4 )

JewishToJD --  + Converts a date in the Jewish Calendar to Julian Day Count +

Description

int jewishtojd (int month, int day, int year)

Valid Range Although this software can handle dates all the way + back to the year 1 (3761 B.C.), such use may not be meaningful. +

The Jewish calendar has been in use for several thousand years, + but in the early days there was no formula to determine the start + of a month. A new month was started when the new moon was first + observed. +


PrevHomeNext
JDToJewishUpJDToFrench
\ No newline at end of file diff --git a/function.join.html b/function.join.html new file mode 100644 index 0000000..377bb9b --- /dev/null +++ b/function.join.html @@ -0,0 +1,204 @@ +join
PHP Manual
PrevNext

join

(PHP3 , PHP4 )

join -- Join array elements with a string

Description

string join (string glue, array pieces)

join() is an alias to + implode(), and is identical in every way. +

See also explode(), implode(), + and split(). +


PrevHomeNext
implodeUplevenshtein
\ No newline at end of file diff --git a/function.juliantojd.html b/function.juliantojd.html new file mode 100644 index 0000000..e172b24 --- /dev/null +++ b/function.juliantojd.html @@ -0,0 +1,182 @@ +JulianToJD
PHP Manual
PrevNext

JulianToJD

(PHP3 , PHP4 )

JulianToJD --  + Converts a Julian Calendar date to Julian Day Count +

Description

int juliantojd (int month, int day, int year)

Valid Range for Julian Calendar 4713 B.C. to 9999 A.D. +

Although this software can handle dates all the way back to 4713 + B.C., such use may not be meaningful. The calendar was created in + 46 B.C., but the details did not stabilize until at least 8 A.D., + and perhaps as late at the 4th century. Also, the beginning of a + year varied from one culture to another - not all accepted + January as the first month. +


PrevHomeNext
JDToJulianUpJDToJewish
\ No newline at end of file diff --git a/function.key.html b/function.key.html new file mode 100644 index 0000000..6009409 --- /dev/null +++ b/function.key.html @@ -0,0 +1,191 @@ +key
PHP Manual
PrevNext

key

(PHP3 , PHP4 )

key -- Fetch a key from an associative array

Description

mixed key (array array)

Key() returns the index element of the + current array position. +

See also current() and next(). +


PrevHomeNext
in_arrayUpkrsort
\ No newline at end of file diff --git a/function.krsort.html b/function.krsort.html new file mode 100644 index 0000000..69e2f39 --- /dev/null +++ b/function.krsort.html @@ -0,0 +1,306 @@ +krsort
PHP Manual
PrevNext

krsort

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

krsort -- Sort an array by key in reverse order

Description

int krsort (array array [, int + sort_flags])

Sorts an array by key in reverse order, maintaining key to data + correlations. This is useful mainly for associative arrays. +

Example 1. Krsort() example


$fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
+krsort ($fruits);
+reset ($fruits);
+while (list ($key, $val) = each ($fruits)) {
+    echo "$key -> $val\n";
+}
+      
+

This example would display: +


fruits[d] = lemon
+fruits[c] = apple
+fruits[b] = banana
+fruits[a] = orange
+      

+

You may modify the behavior of the sort using the optional + parameter sort_flags, for details + see sort(). +

See also asort(), arsort(), + ksort() sort(), + natsort()and rsort(). +


PrevHomeNext
keyUpksort
\ No newline at end of file diff --git a/function.ksort.html b/function.ksort.html new file mode 100644 index 0000000..3134a06 --- /dev/null +++ b/function.ksort.html @@ -0,0 +1,300 @@ +ksort
PHP Manual
PrevNext

ksort

(PHP3 , PHP4 )

ksort -- Sort an array by key

Description

int ksort (array array [, int + sort_flags])

Sorts an array by key, maintaining key to data correlations. This + is useful mainly for associative arrays. +

Example 1. Ksort() example


$fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
+ksort ($fruits);
+reset ($fruits);
+while (list ($key, $val) = each ($fruits)) {
+    echo "$key -> $val\n";
+}
+      
+

This example would display: +


fruits[a] = orange
+fruits[b] = banana
+fruits[c] = apple
+fruits[d] = lemon
+      

+

You may modify the behavior of the sort using the optional + parameter sort_flags, for details + see sort(). +

See also asort(), arsort(), + sort(), natsort(), and + rsort(). +


PrevHomeNext
krsortUplist
\ No newline at end of file diff --git a/function.lcg-value.html b/function.lcg-value.html new file mode 100644 index 0000000..282faed --- /dev/null +++ b/function.lcg-value.html @@ -0,0 +1,178 @@ +lcg_value
PHP Manual
PrevNext

lcg_value

(PHP4 >= 4.0b4)

lcg_value -- Combined linear congruential generator

Description

double lcg_value(void);

lcg_value() returns a pseudo random number in + the range of (0, 1). The function combines two CGs with periods + of 2^31 - 85 and 2^31 - 249. The period of this function is equal + to the product of both primes. +


PrevHomeNext
hexdecUplog
\ No newline at end of file diff --git a/function.ldap-add.html b/function.ldap-add.html new file mode 100644 index 0000000..e23daab --- /dev/null +++ b/function.ldap-add.html @@ -0,0 +1,255 @@ +ldap_add
PHP Manual
PrevNext

ldap_add

(PHP3 , PHP4 )

ldap_add -- Add entries to LDAP directory

Description

int ldap_add (int link_identifier, string dn, array entry)

returns true on success and false on error. +

+ The ldap_add() function is used to add entries + in the LDAP directory. The DN of the entry to be added is + specified by dn. Array entry specifies the information about the + entry. The values in the entries are indexed by individual + attributes. In case of multiple values for an attribute, they are + indexed using integers starting with 0. +


+    entry["attribute1"] = value
+    entry["attribute2"][0] = value1
+    entry["attribute2"][1] = value2
+

Example 1. Complete example with authenticated bind


<?php
+$ds=ldap_connect("localhost");  // assuming the LDAP server is on this host
+
+if ($ds) {
+    // bind with appropriate dn to give update access
+    $r=ldap_bind($ds,"cn=root, o=My Company, c=US", "secret");
+
+    // prepare data
+    $info["cn"]="John Jones";
+    $info["sn"]="Jones";
+    $info["mail"]="jonj@here.and.now";
+    $info["objectclass"]="person";
+
+    // add data to directory
+    $r=ldap_add($ds, "cn=John Jones, o=My Company, c=US", $info);
+
+    ldap_close($ds);
+} else {
+    echo "Unable to connect to LDAP server"; 
+}
+?>
+

PrevHomeNext
LDAP functionsUpldap_bind
\ No newline at end of file diff --git a/function.ldap-bind.html b/function.ldap-bind.html new file mode 100644 index 0000000..98798d2 --- /dev/null +++ b/function.ldap-bind.html @@ -0,0 +1,180 @@ +ldap_bind
PHP Manual
PrevNext

ldap_bind

(PHP3 , PHP4 )

ldap_bind -- Bind to LDAP directory

Description

int ldap_bind (int link_identifier [, string bind_rdn [, string bind_password]])

Binds to the LDAP directory with specified RDN and + password. Returns true on success and false on error.

+ ldap_bind() does a bind operation on the + directory. bind_rdn and bind_password are optional. If not + specified, anonymous bind is attempted.


PrevHomeNext
ldap_addUpldap_close
\ No newline at end of file diff --git a/function.ldap-close.html b/function.ldap-close.html new file mode 100644 index 0000000..0a43fb2 --- /dev/null +++ b/function.ldap-close.html @@ -0,0 +1,203 @@ +ldap_close
PHP Manual
PrevNext

ldap_close

(PHP3 , PHP4 )

ldap_close -- Close link to LDAP server

Description

int ldap_close (int link_identifier)

Returns true on success, false on error.

ldap_close() closes the link to the LDAP + server that's associated with the specified + link_identifier.

This call is internally identical to + ldap_unbind(). The LDAP API uses the call + ldap_unbind(), so perhaps you should use this + in preference to ldap_close().


PrevHomeNext
ldap_bindUpldap_compare
\ No newline at end of file diff --git a/function.ldap-compare.html b/function.ldap-compare.html new file mode 100644 index 0000000..9eec4ce --- /dev/null +++ b/function.ldap-compare.html @@ -0,0 +1,300 @@ +ldap_compare
PHP Manual
PrevNext

ldap_compare

(PHP4 >= 4.0.2)

ldap_compare -- Compare value of attribute found in entry specified with DN

Description

int ldap_compare (int link_identifier, string dn, string attribute, string value)

Returns true if value matches otherwise returns false. Returns -1 on error. +

ldap_compare() is used to compare value + of attribute to value of same attribute in LDAP directory + entry specified with dn. +

The following example demonstrates how to check whether or not given password matches + the one defined in DN specified entry. +

Example 1. Complete example of password check


<?php
+
+$ds=ldap_connect("localhost");  // assuming the LDAP server is on this host
+      
+if ($ds) {
+
+    // bind 
+    if(ldap_bind($ds)) {
+
+        // prepare data
+        $dn = "cn=Matti Meikku, ou=My Unit, o=My Company, c=FI";
+        $value = "secretpassword";
+        $attr = "password";	
+
+        // compare value
+        $r=ldap_compare($ds, $dn, $attr, $value);
+
+        if ($r === -1) {
+            echo "Error: ".ldap_error($ds);
+        } elseif ($r === TRUE) {
+            echo "Password correct.";
+        } elseif ($r === FALSE) {
+            echo "Wrong guess! Password incorrect.";
+        }
+
+    } else {
+        echo "Unable to bind to LDAP server.";
+    }          
+
+    ldap_close($ds);
+
+} else {
+    echo "Unable to connect to LDAP server.";
+}
+?>
+
+     

Note: + ldap_compare() can NOT be used to compare BINARY values! +

Note: + This function was added in 4.0.2. +


PrevHomeNext
ldap_closeUpldap_connect
\ No newline at end of file diff --git a/function.ldap-connect.html b/function.ldap-connect.html new file mode 100644 index 0000000..b7b059a --- /dev/null +++ b/function.ldap-connect.html @@ -0,0 +1,199 @@ +ldap_connect
PHP Manual
PrevNext

ldap_connect

(PHP3 , PHP4 )

ldap_connect -- Connect to an LDAP server

Description

int ldap_connect ([string hostname [, int port]])

Returns a positive LDAP link identifier on success, or false on + error.

+ ldap_connect() establishes a connection to a + LDAP server on a specified hostname and + port. Both the arguments are optional. If + no arguments are specified then the link identifier of the + already opened link will be returned. If only + hostname is specified, then the port + defaults to 389.


PrevHomeNext
ldap_compareUpldap_count_entries
\ No newline at end of file diff --git a/function.ldap-count-entries.html b/function.ldap-count-entries.html new file mode 100644 index 0000000..420a626 --- /dev/null +++ b/function.ldap-count-entries.html @@ -0,0 +1,185 @@ +ldap_count_entries
PHP Manual
PrevNext

ldap_count_entries

(PHP3 , PHP4 )

ldap_count_entries -- Count the number of entries in a search

Description

int ldap_count_entries (int link_identifier, int result_identifier)

Returns number of entries in the result or false on error.

+ ldap_count_entries() returns the number of + entries stored in the result of previous search + operations. result_identifier identifies + the internal ldap result.


PrevHomeNext
ldap_connectUpldap_delete
\ No newline at end of file diff --git a/function.ldap-delete.html b/function.ldap-delete.html new file mode 100644 index 0000000..4238215 --- /dev/null +++ b/function.ldap-delete.html @@ -0,0 +1,177 @@ +ldap_delete
PHP Manual
PrevNext

ldap_delete

(PHP3 , PHP4 )

ldap_delete -- Delete an entry from a directory

Description

int ldap_delete (int link_identifier, string dn)

Returns true on success and false on error.

ldap_delete() function delete a particular + entry in LDAP directory specified by dn.


PrevHomeNext
ldap_count_entriesUpldap_dn2ufn
\ No newline at end of file diff --git a/function.ldap-dn2ufn.html b/function.ldap-dn2ufn.html new file mode 100644 index 0000000..a0f28e1 --- /dev/null +++ b/function.ldap-dn2ufn.html @@ -0,0 +1,175 @@ +ldap_dn2ufn
PHP Manual
PrevNext

ldap_dn2ufn

(PHP3 , PHP4 )

ldap_dn2ufn -- Convert DN to User Friendly Naming format

Description

string ldap_dn2ufn (string dn)

ldap_dn2ufn() function is used to turn a DN + into a more user-friendly form, stripping off type names.


PrevHomeNext
ldap_deleteUpldap_err2str
\ No newline at end of file diff --git a/function.ldap-err2str.html b/function.ldap-err2str.html new file mode 100644 index 0000000..30fa684 --- /dev/null +++ b/function.ldap-err2str.html @@ -0,0 +1,234 @@ +ldap_err2str
PHP Manual
PrevNext

ldap_err2str

(PHP3 >= 3.0.13, PHP4 >= 4.0RC2)

ldap_err2str --  + Convert LDAP error number into string error message +

Description

string ldap_err2str (int errno)

returns string error message.

This function returns the string error message explaining the + error number errno. While LDAP errno numbers are standardized, + different libraries return different or even localized textual + error messages. Never check for a specific error message text, + but always use an error number to check.

See also ldap_errno() and + ldap_error(). + +

Example 1. Enumerating all LDAP error messages


<?php
+  for($i=0; $i<100; $i++) {
+    printf("Error $i: %s<br>\n", ldap_err2str($i));
+  }
+?>
+


PrevHomeNext
ldap_dn2ufnUpldap_errno
\ No newline at end of file diff --git a/function.ldap-errno.html b/function.ldap-errno.html new file mode 100644 index 0000000..8fe0672 --- /dev/null +++ b/function.ldap-errno.html @@ -0,0 +1,254 @@ +ldap_errno
PHP Manual
PrevNext

ldap_errno

(PHP3 >= 3.0.12, PHP4 >= 4.0RC2)

ldap_errno --  + Return the LDAP error number of the last LDAP command +

Description

int ldap_errno (int link_id)

return the LDAP error number of the last LDAP command for this + link.

This function returns the standardized error number returned by + the last LDAP command for the given link identifier. This number + can be converted into a textual error message using + ldap_err2str().

Unless you lower your warning level in your php3.ini sufficiently + or prefix your LDAP commands with @ (at) characters to suppress + warning output, the errors generated will also show up in your + HTML output. +

Example 1. Generating and catching an error


<?php
+// This example contains an error, which we will catch.
+$ld = ldap_connect("localhost");
+$bind = ldap_bind($ld);
+// syntax error in filter expression (errno 87),
+// must be "objectclass=*" to work.
+$res =  @ldap_search($ld, "o=Myorg, c=DE", "objectclass");
+if (!$res) {
+    printf("LDAP-Errno: %s<br>\n", ldap_errno($ld));
+    printf("LDAP-Error: %s<br>\n", ldap_error($ld));
+    die("Argh!<br>\n");
+}
+$info = ldap_get_entries($ld, $res);
+printf("%d matching entries.<br>\n", $info["count"]);
+?>
+

see also ldap_err2str() and + ldap_error().


PrevHomeNext
ldap_err2strUpldap_error
\ No newline at end of file diff --git a/function.ldap-error.html b/function.ldap-error.html new file mode 100644 index 0000000..9f22749 --- /dev/null +++ b/function.ldap-error.html @@ -0,0 +1,207 @@ +ldap_error
PHP Manual
PrevNext

ldap_error

(PHP3 >= 3.0.12, PHP4 >= 4.0RC2)

ldap_error --  + Return the LDAP error message of the last LDAP command +

Description

string ldap_error (int link_id)

returns string error message.

This function returns the string error message explaining the + error generated by the last LDAP command for the given link + identifier. While LDAP errno numbers are standardized, different + libraries return different or even localized textual error + messages. Never check for a specific error message text, but + always use an error number to check.

Unless you lower your warning level in your + php3.ini sufficiently or prefix your LDAP + commands with @ (at) characters to suppress + warning output, the errors generated will also show up in your + HTML output.

see also ldap_err2str() and + ldap_errno().


PrevHomeNext
ldap_errnoUpldap_explode_dn
\ No newline at end of file diff --git a/function.ldap-explode-dn.html b/function.ldap-explode-dn.html new file mode 100644 index 0000000..62b06b9 --- /dev/null +++ b/function.ldap-explode-dn.html @@ -0,0 +1,202 @@ +ldap_explode_dn
PHP Manual
PrevNext

ldap_explode_dn

(PHP3 , PHP4 )

ldap_explode_dn -- Splits DN into its component parts

Description

array ldap_explode_dn (string dn, int with_attrib)

ldap_explode_dn() function is used to split + the a DN returned by ldap_get_dn() and breaks + it up into its component parts. Each part is known as Relative + Distinguished Name, or RDN. ldap_explode_dn() + returns an array of all those components. + with_attrib is used to request if the RDNs + are returned with only values or their attributes as well. To + get RDNs with the attributes (i.e. in attribute=value format) set + with_attrib to 0 and to get only values + set it to 1.


PrevHomeNext
ldap_errorUpldap_first_attribute
\ No newline at end of file diff --git a/function.ldap-first-attribute.html b/function.ldap-first-attribute.html new file mode 100644 index 0000000..0a6323d --- /dev/null +++ b/function.ldap-first-attribute.html @@ -0,0 +1,220 @@ +ldap_first_attribute
PHP Manual
PrevNext

ldap_first_attribute

(PHP3 , PHP4 )

ldap_first_attribute -- Return first attribute

Description

string ldap_first_attribute (int link_identifier, int result_entry_identifier, int ber_identifier)

Returns the first attribute in the entry on success and false on + error. +

+ Similar to reading entries, attributes are also read one by one + from a particular entry. + ldap_first_attribute() returns the first + attribute in the entry pointed by the entry identifier. + Remaining attributes are retrieved by calling + ldap_next_attribute() successively. + ber_identifier is the identifier to + internal memory location pointer. It is passed by reference. The + same ber_identifier is passed to the + ldap_next_attribute() function, which modifies + that pointer. +

see also ldap_get_attributes()


PrevHomeNext
ldap_explode_dnUpldap_first_entry
\ No newline at end of file diff --git a/function.ldap-first-entry.html b/function.ldap-first-entry.html new file mode 100644 index 0000000..9d1c814 --- /dev/null +++ b/function.ldap-first-entry.html @@ -0,0 +1,205 @@ +ldap_first_entry
PHP Manual
PrevNext

ldap_first_entry

(PHP3 , PHP4 )

ldap_first_entry -- Return first result id

Description

int ldap_first_entry (int link_identifier, int result_identifier)

Returns the result entry identifier for the first entry on + success and false on error.

+ Entries in the LDAP result are read sequentially using the + ldap_first_entry() and + ldap_next_entry() + functions. ldap_first_entry() returns the + entry identifier for first entry in the result. This entry + identifier is then supplied to + lap_next_entry() routine to get successive + entries from the result.

see also ldap_get_entries().


PrevHomeNext
ldap_first_attributeUpldap_free_result
\ No newline at end of file diff --git a/function.ldap-free-result.html b/function.ldap-free-result.html new file mode 100644 index 0000000..ba0c201 --- /dev/null +++ b/function.ldap-free-result.html @@ -0,0 +1,194 @@ +ldap_free_result
PHP Manual
PrevNext

ldap_free_result

(PHP3 , PHP4 )

ldap_free_result -- Free result memory

Description

int ldap_free_result (int result_identifier)

Returns true on success and false on error.

+ ldap_free_result() frees up the memory + allocated internally to store the result and pointed by the + result_identifier. All result memory will + be automatically freed when the script terminates.

Typically all the memory allocated for the ldap result gets freed + at the end of the script. In case the script is making successive + searches which return large result sets, + ldap_free_result() could be called to keep the + runtime memory usage by the script low.


PrevHomeNext
ldap_first_entryUpldap_get_attributes
\ No newline at end of file diff --git a/function.ldap-get-attributes.html b/function.ldap-get-attributes.html new file mode 100644 index 0000000..56232b7 --- /dev/null +++ b/function.ldap-get-attributes.html @@ -0,0 +1,276 @@ +ldap_get_attributes
PHP Manual
PrevNext

ldap_get_attributes

(PHP3 , PHP4 )

ldap_get_attributes -- Get attributes from a search result entry

Description

array ldap_get_attributes (int link_identifier, int + result_entry_identifier)

Returns a complete entry information in a multi-dimensional array + on success and false on error.

ldap_get_attributes() function is used to + simplify reading the attributes and values from an entry in the + search result. The return value is a multi-dimensional array of + attributes and values.

Having located a specific entry in the directory, you can find + out what information is held for that entry by using this + call. You would use this call for an application which "browses" + directory entries and/or where you do not know the structure of + the directory entries. In many applications you will be searching + for a specific attribute such as an email address or a surname, + and won't care what other data is held.


+return_value["count"] = number of attributes in the entry
+return_value[0] = first attribute
+return_value[n] = nth attribute
+
+return_value["attribute"]["count"] = number of values for attribute
+return_value["attribute"][0] = first value of the attribute
+return_value["attribute"][i] = ith value of the attribute
+

+ +

Example 1. Show the list of attributes held for a particular directory + entry


// $ds is the link identifier for the directory
+
+// $sr is a valid search result from a prior call to
+// one of the ldap directory search calls
+
+$entry = ldap_first_entry($ds, $sr);
+
+$attrs = ldap_get_attributes($ds, $entry);
+
+echo $attrs["count"]." attributes held for this entry:<p>";
+
+for ($i=0; $i<$attrs["count"]; $i++)
+    echo $attrs[$i]."<br>";
+

see also ldap_first_attribute() and + ldap_next_attribute()


PrevHomeNext
ldap_free_resultUpldap_get_dn
\ No newline at end of file diff --git a/function.ldap-get-dn.html b/function.ldap-get-dn.html new file mode 100644 index 0000000..1f00233 --- /dev/null +++ b/function.ldap-get-dn.html @@ -0,0 +1,177 @@ +ldap_get_dn
PHP Manual
PrevNext

ldap_get_dn

(PHP3 , PHP4 )

ldap_get_dn -- Get the DN of a result entry

Description

string ldap_get_dn (int link_identifier, int result_entry_identifier)

Returns the DN of the result entry and false on error.

ldap_get_dn() function is used to find out the + DN of an entry in the result.


PrevHomeNext
ldap_get_attributesUpldap_get_entries
\ No newline at end of file diff --git a/function.ldap-get-entries.html b/function.ldap-get-entries.html new file mode 100644 index 0000000..af2efb8 --- /dev/null +++ b/function.ldap-get-entries.html @@ -0,0 +1,229 @@ +ldap_get_entries
PHP Manual
PrevNext

ldap_get_entries

(PHP3 , PHP4 )

ldap_get_entries -- Get all result entries

Description

array ldap_get_entries (int link_identifier, int result_identifier)

Returns a complete result information in a multi-dimenasional + array on success and false on error.

+ ldap_get_entries() function is used to + simplify reading multiple entries from the result and then + reading the attributes and multiple values. The entire + information is returned by one function call in a + multi-dimensional array. The structure of the array is as + follows.

The attribute index is converted to lowercase. (Attributes are + case-insensitive for directory servers, but not when used as + array indices) + +


+return_value["count"] = number of entries in the result
+return_value[0] : refers to the details of first entry
+
+return_value[i]["dn"] =  DN of the ith entry in the result
+
+return_value[i]["count"] = number of attributes in ith entry
+return_value[i][j] = jth attribute in the ith entry in the result
+
+return_value[i]["attribute"]["count"] = number of values for 
+    attribute in ith entry
+return_value[i]["attribute"][j] = jth value of attribute in ith entry
+

see also ldap_first_entry() and + ldap_next_entry()


PrevHomeNext
ldap_get_dnUpldap_get_values
\ No newline at end of file diff --git a/function.ldap-get-values-len.html b/function.ldap-get-values-len.html new file mode 100644 index 0000000..0341129 --- /dev/null +++ b/function.ldap-get-values-len.html @@ -0,0 +1,211 @@ +ldap_get_values_len
PHP Manual
PrevNext

ldap_get_values_len

(PHP3 >= 3.0.13, PHP4 >= 4.0RC2)

ldap_get_values_len -- Get all binary values from a result entry

Description

array ldap_get_values_len (int link_identifier, int result_entry_identifier, string attribute)

Returns an array of values for the attribute on success and false + on error.

+ ldap_get_values_len() function is used to read all + the values of the attribute in the entry in the result. entry is + specified by the + result_entry_identifier. The number of + values can be found by indexing "count" in the resultant + array. Individual values are accessed by integer index in the + array. The first index is 0.

This function is used exactly like + ldap_get_values() except that it handles + binary data and not string data.

Note: + This function was added in 4.0. +


PrevHomeNext
ldap_get_valuesUpldap_list
\ No newline at end of file diff --git a/function.ldap-get-values.html b/function.ldap-get-values.html new file mode 100644 index 0000000..7ae8438 --- /dev/null +++ b/function.ldap-get-values.html @@ -0,0 +1,282 @@ +ldap_get_values
PHP Manual
PrevNext

ldap_get_values

(PHP3 , PHP4 )

ldap_get_values -- Get all values from a result entry

Description

array ldap_get_values (int link_identifier, int result_entry_identifier, string attribute)

Returns an array of values for the attribute on success and false + on error.

+ ldap_get_values() function is used to read all + the values of the attribute in the entry in the result. entry is + specified by the + result_entry_identifier. The number of + values can be found by indexing "count" in the resultant + array. Individual values are accessed by integer index in the + array. The first index is 0.

This call needs a result_entry_identifier, + so needs to be preceded by one of the ldap search calls and one + of the calls to get an individual entry.

You application will either be hard coded to look for certain + attributes (such as "surname" or "mail") or you will have to use + the ldap_get_attributes() call to work out + what attributes exist for a given entry.

LDAP allows more than one entry for an attribute, so it can, for + example, store a number of email addresses for one person's + directory entry all labeled with the attribute "mail" + +


+return_value["count"] = number of values for attribute
+return_value[0] = first value of attribute
+return_value[i] = ith value of attribute
+

+ +

Example 1. List all values of the "mail" attribute for a + directory entry


// $ds is a valid link identifier for a directory server
+
+// $sr is a valid search result from a prior call to
+//     one of the ldap directory search calls
+
+// $entry is a valid entry identifier from a prior call to
+//        one of the calls that returns a directory entry
+
+$values = ldap_get_values($ds, $entry,"mail");
+
+echo $values["count"]." email addresses for this entry.<p>";
+
+for ($i=0; $i < $values["count"]; $i++)
+    echo $values[$i]."<br>";
+


PrevHomeNext
ldap_get_entriesUpldap_get_values_len
\ No newline at end of file diff --git a/function.ldap-list.html b/function.ldap-list.html new file mode 100644 index 0000000..f003608 --- /dev/null +++ b/function.ldap-list.html @@ -0,0 +1,280 @@ +ldap_list
PHP Manual
PrevNext

ldap_list

(PHP3 , PHP4 )

ldap_list -- Single-level search

Description

int ldap_list (int link_identifier, string base_dn, string filter [, array + attributes [, int + attrsonly [, int + sizelimit [, int + timelimit [, int + deref]]]]])

Returns a search result identifier or false on error.

ldap_list() performs the search for a specified + filter on the directory with the scope LDAP_SCOPE_ONELEVEL.

LDAP_SCOPE_ONELEVEL means that the search should only return + information that is at the level immediately below the base dn + given in the call. (Equivalent to typing "ls" and getting a list + of files and folders in the current working directory.)

This call takes 5 optional parameters. See ldap_search() + notes. +

Note: + These optional parameters were added in 4.0.2: + attrsonly, + sizelimit, + timelimit, + deref. +

+ +

Example 1. Produce a list of all organizational units of an organization +


// $ds is a valid link identifier for a directory server
+
+$basedn = "o=My Company, c=US";
+$justthese = array("ou");
+
+$sr=ldap_list($ds, $basedn, "ou=*", $justthese);
+
+$info = ldap_get_entries($ds, $sr);
+
+for ($i=0; $i<$info["count"]; $i++)
+    echo $info[$i]["ou"][0] ;
+


PrevHomeNext
ldap_get_values_lenUpldap_modify
\ No newline at end of file diff --git a/function.ldap-mod-add.html b/function.ldap-mod-add.html new file mode 100644 index 0000000..8f14ac8 --- /dev/null +++ b/function.ldap-mod-add.html @@ -0,0 +1,182 @@ +ldap_mod_add
PHP Manual
PrevNext

ldap_mod_add

(PHP3 >= 3.0.8, PHP4 )

ldap_mod_add -- Add attribute values to current attributes

Description

int ldap_mod_add (int link_identifier, string dn, array entry)

returns true on success and false on error.

This function adds attribute(s) to the specified dn. It + performs the modification at the attribute level as opposed to the + object level. Object-level additions are done by the + ldap_add() function.


PrevHomeNext
ldap_modifyUpldap_mod_del
\ No newline at end of file diff --git a/function.ldap-mod-del.html b/function.ldap-mod-del.html new file mode 100644 index 0000000..804978b --- /dev/null +++ b/function.ldap-mod-del.html @@ -0,0 +1,179 @@ +ldap_mod_del
PHP Manual
PrevNext

ldap_mod_del

(PHP3 >= 3.0.8, PHP4 )

ldap_mod_del -- Delete attribute values from current attributes

Description

int ldap_mod_del (int link_identifier, string dn, array entry)

returns true on success and false on error.

This function removes attribute(s) from the specified dn. It + performs the modification at the attribute level as opposed to the + object level. Object-level deletions are done by the + ldap_del() function.


PrevHomeNext
ldap_mod_addUpldap_mod_replace
\ No newline at end of file diff --git a/function.ldap-mod-replace.html b/function.ldap-mod-replace.html new file mode 100644 index 0000000..e484cea --- /dev/null +++ b/function.ldap-mod-replace.html @@ -0,0 +1,182 @@ +ldap_mod_replace
PHP Manual
PrevNext

ldap_mod_replace

(PHP3 >= 3.0.8, PHP4 )

ldap_mod_replace -- Replace attribute values with new ones

Description

int ldap_mod_replace (int link_identifier, string dn, array entry)

returns true on success and false on error.

This function replaces attribute(s) from the specified dn. It + performs the modification at the attribute level as opposed to the + object level. Object-level modifications are done by the + ldap_modify() function.


PrevHomeNext
ldap_mod_delUpldap_next_attribute
\ No newline at end of file diff --git a/function.ldap-modify.html b/function.ldap-modify.html new file mode 100644 index 0000000..6876384 --- /dev/null +++ b/function.ldap-modify.html @@ -0,0 +1,184 @@ +ldap_modify
PHP Manual
PrevNext

ldap_modify

(PHP3 , PHP4 )

ldap_modify -- Modify an LDAP entry

Description

int ldap_modify (int link_identifier, string dn, array entry)

Returns true on success and false on error.

ldap_modify() function is used to modify the + existing entries in the LDAP directory. The structure of the + entry is same as in ldap_add().


PrevHomeNext
ldap_listUpldap_mod_add
\ No newline at end of file diff --git a/function.ldap-next-attribute.html b/function.ldap-next-attribute.html new file mode 100644 index 0000000..0a5e61c --- /dev/null +++ b/function.ldap-next-attribute.html @@ -0,0 +1,211 @@ +ldap_next_attribute
PHP Manual
PrevNext

ldap_next_attribute

(PHP3 , PHP4 )

ldap_next_attribute -- Get the next attribute in result

Description

string ldap_next_attribute (int link_identifier, int result_entry_identifier, int ber_identifier)

Returns the next attribute in an entry on success and false on + error.

+ ldap_next_attribute() is called to retrieve + the attributes in an entry. The internal state of the pointer is + maintained by the ber_identifier. It is + passed by reference to the function. The first call to + ldap_next_attribute() is made with the + result_entry_identifier returned from + ldap_first_attribute().

see also ldap_get_attributes()


PrevHomeNext
ldap_mod_replaceUpldap_next_entry
\ No newline at end of file diff --git a/function.ldap-next-entry.html b/function.ldap-next-entry.html new file mode 100644 index 0000000..420ad54 --- /dev/null +++ b/function.ldap-next-entry.html @@ -0,0 +1,218 @@ +ldap_next_entry
PHP Manual
PrevNext

ldap_next_entry

(PHP3 , PHP4 )

ldap_next_entry -- Get next result entry

Description

int ldap_next_entry (int link_identifier, int result_entry_identifier)

Returns entry identifier for the next entry in the result whose + entries are being read starting with + ldap_first_entry(). If there are no more + entries in the result then it returns false.

+ ldap_next_entry() function is used to retrieve + the entries stored in the result. Successive calls to the + ldap_next_entry() return entries one by one + till there are no more entries. The first call to + ldap_next_entry() is made after the call to + ldap_first_entry() with the result_identifier + as returned from the ldap_first_entry().

see also ldap_get_entries()


PrevHomeNext
ldap_next_attributeUpldap_read
\ No newline at end of file diff --git a/function.ldap-read.html b/function.ldap-read.html new file mode 100644 index 0000000..e2f96da --- /dev/null +++ b/function.ldap-read.html @@ -0,0 +1,237 @@ +ldap_read
PHP Manual
PrevNext

ldap_read

(PHP3 , PHP4 )

ldap_read -- Read an entry

Description

int ldap_read (int link_identifier, string base_dn, string filter [, array + attributes [, int + attrsonly [, int + sizelimit [, int + timelimit [, int + deref]]]]])

Returns a search result identifier or false on error.

+ ldap_read() performs the search for a + specified filter on the directory with the scope + LDAP_SCOPE_BASE. So it is equivalent to reading an entry from the + directory.

An empty filter is not allowed. If you want to retrieve + absolutely all information for this entry, use a filter of + "objectClass=*". If you know which entry types are used on the + directory server, you might use an appropriate filter such as + "objectClass=inetOrgPerson".

This call takes 5 optional parameters. See ldap_search() + notes. +

Note: + These optional parameters were added in 4.0.2: + attrsonly, + sizelimit, + timelimit, + deref. +


PrevHomeNext
ldap_next_entryUpldap_search
\ No newline at end of file diff --git a/function.ldap-search.html b/function.ldap-search.html new file mode 100644 index 0000000..cc1f830 --- /dev/null +++ b/function.ldap-search.html @@ -0,0 +1,377 @@ +ldap_search
PHP Manual
PrevNext

ldap_search

(PHP3 , PHP4 )

ldap_search -- Search LDAP tree

Description

int ldap_search (int link_identifier, string base_dn, string filter [, array + attributes [, int + attrsonly [, int + sizelimit [, int + timelimit [, int + deref]]]]])

Returns a search result identifier or false on error.

+ ldap_search() performs the search for a + specified filter on the directory with the scope of + LDAP_SCOPE_SUBTREE. This is equivalent to searching the entire + directory. base_dn specifies the base DN + for the directory.

There is a optional fourth parameter, that can be added to + restrict the attributes and values returned by the server to just + those required. This is much more efficient than the default + action (which is to return all attributes and their associated + values). The use of the fourth parameter should therefore be + considered good practice.

The fourth parameter is a standard PHP string array of the + required attributes, eg array("mail","sn","cn") Note that the + "dn" is always returned irrespective of which attributes types + are requested.

Note too that some directory server hosts will be configured to + return no more than a preset number of entries. If this occurs, + the server will indicate that it has only returned a partial + results set. This occurs also if the sixth parameter + sizelimit has been used to limit the count + of fetched entries. +

The fifth parameter attrsonly should be + set to 1 if only attribute types are wanted. + If set to 0 both attributes types and attribute values are fetched + which is the default behaviour. +

With the sixth parameter sizelimit it is + possible to limit the count of entries fetched. + Setting this to 0 means no limit. + NOTE: This parameter can NOT override server-side preset sizelimit. + You can set it lower though. +

The seventh parameter timelimit sets the number + of seconds how long is spend on the search. + Setting this to 0 means no limit. + NOTE: This parameter can NOT override server-side preset timelimit. + You can set it lower though. +

The eigth parameter deref specifies how aliases + should be handled during the search. It can be one of the following: +

  • LDAP_DEREF_NEVER - (default) aliases are never dereferenced. +

  • LDAP_DEREF_SEARCHING - aliases should be dereferenced during the search + but not when locating the base object of the search. +

  • LDAP_DEREF_FINDING - aliases should be dereferenced when + locating the base object but not during the search. +

  • LDAP_DEREF_ALWAYS - aliases should be dereferenced always. +

+

These optional parameters were added in 4.0.2: + attrsonly, + sizelimit, + timelimit, + deref. +

The search filter can be simple or advanced, using boolean + operators in the format described in the LDAP doumentation (see + the Netscape Directory SDK + for full information on filters).

The example below retrieves the organizational unit, surname, + given name and email address for all people in "My Company" where + the surname or given name contains the substring $person. This + example uses a boolean filter to tell the server to look for + information in more than one attribute. + +

Example 1. LDAP search


// $ds is a valid link identifier for a directory server
+
+// $person is all or part of a person's name, eg "Jo"
+
+$dn = "o=My Company, c=US";
+$filter="(|(sn=$person*)(givenname=$person*))";
+$justthese = array( "ou", "sn", "givenname", "mail");
+
+$sr=ldap_search($ds, $dn, $filter, $justthese);
+
+$info = ldap_get_entries($ds, $sr);
+
+print $info["count"]." entries returned<p>";
+


PrevHomeNext
ldap_readUpldap_unbind
\ No newline at end of file diff --git a/function.ldap-unbind.html b/function.ldap-unbind.html new file mode 100644 index 0000000..25a0104 --- /dev/null +++ b/function.ldap-unbind.html @@ -0,0 +1,177 @@ +ldap_unbind
PHP Manual
PrevNext

ldap_unbind

(PHP3 , PHP4 )

ldap_unbind -- Unbind from LDAP directory

Description

int ldap_unbind (int link_identifier)

Returns true on success and false on error.

ldap_unbind() function unbinds from the LDAP + directory.


PrevHomeNext
ldap_searchUpMail functions
\ No newline at end of file diff --git a/function.leak.html b/function.leak.html new file mode 100644 index 0000000..d26403c --- /dev/null +++ b/function.leak.html @@ -0,0 +1,180 @@ +leak
PHP Manual
PrevNext

leak

(PHP3 , PHP4 )

leak -- Leak memory

Description

void leak (int bytes)

Leak() leaks the specified amount of memory. +

This is useful when debugging the memory manager, which + automatically cleans up "leaked" memory when each request is + completed. +


PrevHomeNext
iptcparseUppack
\ No newline at end of file diff --git a/function.levenshtein.html b/function.levenshtein.html new file mode 100644 index 0000000..e9c9737 --- /dev/null +++ b/function.levenshtein.html @@ -0,0 +1,354 @@ +levenshtein
PHP Manual
PrevNext

levenshtein

(PHP3 CVS only, PHP4 >= 4.0.1)

levenshtein --  + Calculate Levenshtein distance between two strings +

Description

int levenshtein (string str1, string str2)

int levenshtein (string str1, string str2, int cost_ins, int cost_rep, int cost_del)

int levenshtein (string str1, string str2, function cost)

This function returns the Levenshtein-Distance between the + two argument strings or -1, if one of the argument strings + is longer than the limit of 255 characters (255 should be + more than enough for name or dictionary comparison, and + nobody serious would be doing genetic analysis with PHP). +

The Levenshtein distance is defined as the minimal number of + characters you have to replace, insert or delete to transform + str1 into str2. + The complexity of the algorithm is O(m*n), + where n and m are the + length of str1 and + str2 (rather good when compared to + similar_text(), which is O(max(n,m)**3), + but still expensive). +

In its simpelest form the function will take only the two + strings as parameter and will calculate just the number of + insert, replace and delete operations needed to transform + str1 into str2. +

+ A second variant will take three additional parameters that + define the cost of insert, replace and delete operations. + This is more general and adaptive than variant one, but not + as efficient. +

+ The third variant (which is not implemented yet) will be + the most general and adaptive, but also the slowest alternative. + It will call a user-supplied function that will determine the + cost for every possible operation. +

The user-supplied function will be called with the following + arguments: +

  • operation to apply: 'I', 'R' or 'D' +

  • actual character in string 1 +

  • actual character in string 2 +

  • position in string 1 +

  • position in string 2 +

  • remaining characters in string 1 +

  • remaining characters in string 2 +

+ The user-supplied function has to return a positive integer + describing the cost for this particular operation, but it + may decide to use only some of the supplied arguments. +

+ The user-supplied function approach offers the possibility to + take into account the relevance of and/or difference between + certain symbols (characters) or even the context those symbols + appear in to determine the cost of insert, replace and delete + operations, but at the cost of loosing all optimizations done + regarding cpu register utilization and cache misses that have + been worked into the other two variants. +

See also soundex(), + similar_text() + and metaphone(). +


PrevHomeNext
joinUpltrim
\ No newline at end of file diff --git a/function.link.html b/function.link.html new file mode 100644 index 0000000..2ee3e9a --- /dev/null +++ b/function.link.html @@ -0,0 +1,209 @@ +link
PHP Manual
PrevNext

link

(PHP3 , PHP4 )

link -- Create a hard link

Description

int link (string target, string link)

Link() creates a hard link.

See also the symlink() to create soft links, + and readlink() along with + linkinfo(). +

Note: + This function does not work on Windows systems +


PrevHomeNext
is_uploaded_fileUplinkinfo
\ No newline at end of file diff --git a/function.linkinfo.html b/function.linkinfo.html new file mode 100644 index 0000000..c116dbd --- /dev/null +++ b/function.linkinfo.html @@ -0,0 +1,219 @@ +linkinfo
PHP Manual
PrevNext

linkinfo

(PHP3 , PHP4 )

linkinfo -- Gets information about a link

Description

int linkinfo (string path)

Linkinfo() returns the st_dev field of the + UNIX C stat structure returned by the lstat system call. This + function is used to verify if a link (pointed to by + path) really exists (using the same method + as the S_ISLNK macro defined in stat.h). Returns 0 or FALSE in + case of error. +

See also symlink(), link(), + and readlink(). +

Note: + This function does not work on Windows systems +


PrevHomeNext
linkUpmkdir
\ No newline at end of file diff --git a/function.list.html b/function.list.html new file mode 100644 index 0000000..07d564f --- /dev/null +++ b/function.list.html @@ -0,0 +1,256 @@ +list
PHP Manual
PrevNext

list

(unknown)

list --  + Assign variables as if they were an array +

Description

void list(...);

Like array(), this is not really a function, + but a language construct. list() is used to + assign a list of variables in one operation. +

Example 1. List() example


<table>
+ <tr>
+  <th>Employee name</th>
+  <th>Salary</th>
+ </tr>
+
+<?php
+
+$result = mysql ($conn, "SELECT id, name, salary FROM employees");
+while (list ($id, $name, $salary) = mysql_fetch_row ($result)) {
+    print (" <tr>\n".
+           "  <td><a href=\"info.php3?id=$id\">$name</a></td>\n".
+           "  <td>$salary</td>\n".
+           " </tr>\n");
+}
+
+?>
+
+</table>
+      
+

See also each() and array(). +


PrevHomeNext
ksortUpnatsort
\ No newline at end of file diff --git a/function.listen.html b/function.listen.html new file mode 100644 index 0000000..2ac1951 --- /dev/null +++ b/function.listen.html @@ -0,0 +1,274 @@ +listen
PHP Manual
PrevNext

listen

(PHP4 >= 4.0.2)

listen -- Listens for a connection on a socket

Description

int listen (int socket, int backlog)

After the socket socket has been created + using socket() and bound to a name with + bind(), it may be told to listen for incoming + connections on socket. A maximum of + backlog incoming connections will be + queued for processing. +

listen() is applicable only to sockets with + type SOCK_STREAM or + SOCK_SEQPACKET. +

Returns zero on success, or a negative error code on + failure. This code may be passed to strerror() + to get a textual explanation of the error. +

See also + accept_connect(), + bind(), + connect(), + socket(), + socket_get_status(), and + strerror(). +


PrevHomeNext
connectUpsocket
\ No newline at end of file diff --git a/function.localtime.html b/function.localtime.html new file mode 100644 index 0000000..5e20c15 --- /dev/null +++ b/function.localtime.html @@ -0,0 +1,252 @@ +localtime
PHP Manual
PrevNext

localtime

(PHP4 >= 4.0RC2)

localtime -- Get the local time

Description

array localtime ([int + timestamp [, bool + is_associative]])

The localtime() function returns an array + identical to that of the structure returned by the C function + call. The first argument to localtime() is + the timestamp, if this is not given the current time is used. + The second argument to the localtime() is the + is_associative, if this is set to 0 or not + supplied than the array is returned as a regular, numerically + indexed array. If the argument is set to 1 then + localtime() is an associative array containing + all the different elements of the structure returned by the C + function call to localtime. The names of the different keys of + the associative array are as follows: +

  • "tm_sec" - seconds +

  • "tm_min" - minutes +

  • "tm_hour" - hour +

  • "tm_mday" - day of the month +

  • "tm_mon" - month of the year +

  • "tm_year" - Year, not y2k compliant +

  • "tm_wday" - Day of the week +

  • "tm_yday" - Day of the year +

  • "tm_isdst" - Is daylight savings time in effect +

+


PrevHomeNext
gmstrftimeUpmicrotime
\ No newline at end of file diff --git a/function.log.html b/function.log.html new file mode 100644 index 0000000..f7e1648 --- /dev/null +++ b/function.log.html @@ -0,0 +1,172 @@ +log
PHP Manual
PrevNext

log

(PHP3 , PHP4 )

log -- Natural logarithm

Description

float log (float arg)

Returns the natural logarithm of arg. +


PrevHomeNext
lcg_valueUplog10
\ No newline at end of file diff --git a/function.log10.html b/function.log10.html new file mode 100644 index 0000000..60834f6 --- /dev/null +++ b/function.log10.html @@ -0,0 +1,177 @@ +log10
PHP Manual
PrevNext

log10

(PHP3 , PHP4 )

log10 -- Base-10 logarithm

Description

float log10 (float arg)

Returns the base-10 logarithm of arg. +


PrevHomeNext
logUpmax
\ No newline at end of file diff --git a/function.long2ip.html b/function.long2ip.html new file mode 100644 index 0000000..6838429 --- /dev/null +++ b/function.long2ip.html @@ -0,0 +1,189 @@ +long2ip
PHP Manual
PrevNext

long2ip

(PHP4 >= 4.0RC1)

long2ip --  + Converts an (IPv4) Internet network address into a string in Internet + standard dotted format +

Description

string long2ip (int proper_address)

The function long2ip() generates an Internet address + in dotted format (i.e.: aaa.bbb.ccc.ddd) from the proper address + representation. +

See also: ip2long() +


PrevHomeNext
ip2longUpopenlog
\ No newline at end of file diff --git a/function.lstat.html b/function.lstat.html new file mode 100644 index 0000000..aee7b9f --- /dev/null +++ b/function.lstat.html @@ -0,0 +1,263 @@ +lstat
PHP Manual
PrevNext

lstat

(PHP3 >= 3.0.4, PHP4 )

lstat --  + Gives information about a file or symbolic link +

Description

array lstat (string filename)

Gathers the statistics of the file or symbolic link named by + filename. This function is identical to the + stat() function except that if the + filename parameter is a symbolic link, the + status of the symbolic link is returned, not the status of the + file pointed to by the symbolic link. +

Returns an array with the statistics of the file with the + following elements: +

  1. device

  2. inode

  3. inode protection mode

  4. number of links

  5. user id of owner

  6. group id owner

  7. device type if inode device *

  8. size in bytes

  9. time of last access

  10. time of last modification

  11. time of last change

  12. blocksize for filesystem I/O *

  13. number of blocks allocated

+ * - only valid on systems supporting the st_blksize type--other + systems (i.e. Windows) return -1

The results of this function are cached. See + clearstatcache() for more details. +


PrevHomeNext
statUprealpath
\ No newline at end of file diff --git a/function.ltrim.html b/function.ltrim.html new file mode 100644 index 0000000..f2c4433 --- /dev/null +++ b/function.ltrim.html @@ -0,0 +1,199 @@ +ltrim
PHP Manual
PrevNext

ltrim

(PHP3 , PHP4 )

ltrim --  + Strip whitespace from the beginning of a string +

Description

string ltrim (string str)

This function strips whitespace from the start of a string and + returns the stripped string. The whitespace + characters it currently strips are: "\n", "\r", "\t", "\v", "\0", + and a plain space. +

See also chop(), rtrim(), and + trim(). +


PrevHomeNext
levenshteinUpmd5
\ No newline at end of file diff --git a/function.mail.html b/function.mail.html new file mode 100644 index 0000000..153c6f7 --- /dev/null +++ b/function.mail.html @@ -0,0 +1,269 @@ +mail
PHP Manual
PrevNext

mail

(PHP3 , PHP4 )

mail -- send mail

Description

bool mail (string to, string subject, string message [, string additional_headers])

Mail() automatically mails the message specified + in message to the receiver specified in + to. Multiple recipients can be specified by + putting a comma between each address in to.

Example 1. Sending mail.


mail("rasmus@lerdorf.on.ca", "My Subject", "Line 1\nLine 2\nLine 3");
+      

If a fourth string argument is passed, this string is inserted at + the end of the header. This is typically used to add extra + headers. Multiple extra headers are separated with a newline.

Example 2. Sending mail with extra headers.


mail("nobody@aol.com", "the subject", $message,
+     "From: webmaster@$SERVER_NAME\nReply-To: webmaster@$SERVER_NAME\nX-Mailer: PHP/" . phpversion());
+      


PrevHomeNext
Mail functionsUpezmlm_hash
\ No newline at end of file diff --git a/function.max.html b/function.max.html new file mode 100644 index 0000000..71d7ca6 --- /dev/null +++ b/function.max.html @@ -0,0 +1,195 @@ +max
PHP Manual
PrevNext

max

(PHP3 , PHP4 )

max -- Find highest value

Description

mixed max (mixed arg1, mixed arg2, mixed argn)

max() returns the numerically highest of the + parameter values. +

If the first parameter is an array, max() + returns the highest value in that array. If the first parameter + is an integer, string or double, you need at least two parameters + and max() returns the biggest of these values. + You can compare an unlimited number of values. +

If one or more of the values is a double, all the values will be + treated as doubles, and a double is returned. If none of the + values is a double, all of them will be treated as integers, and + an integer is returned. +


PrevHomeNext
log10Upmin
\ No newline at end of file diff --git a/function.mcal-append-event.html b/function.mcal-append-event.html new file mode 100644 index 0000000..a935b7d --- /dev/null +++ b/function.mcal-append-event.html @@ -0,0 +1,180 @@ +mcal_append_event
PHP Manual
PrevNext

mcal_append_event

(PHP4 >= 4.0RC1)

mcal_append_event -- Store a new event into an MCAL calendar

Description

int mcal_append_event (int mcal_stream)

+ mcal_append_event() Stores the global event + into an MCAL calendar for the given stream. +

Returns the id of the newly inserted event. +


PrevHomeNext
mcal_list_eventsUpmcal_store_event
\ No newline at end of file diff --git a/function.mcal-close.html b/function.mcal-close.html new file mode 100644 index 0000000..e71289a --- /dev/null +++ b/function.mcal-close.html @@ -0,0 +1,173 @@ +mcal_close
PHP Manual
PrevNext

mcal_close

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_close -- Close an MCAL stream

Description

int mcal_close (int mcal_stream, int flags)

+ Closes the given mcal stream. +


PrevHomeNext
mcal_reopenUpmcal_create_calendar
\ No newline at end of file diff --git a/function.mcal-create-calendar.html b/function.mcal-create-calendar.html new file mode 100644 index 0000000..ab18539 --- /dev/null +++ b/function.mcal-create-calendar.html @@ -0,0 +1,178 @@ +mcal_create_calendar
PHP Manual
PrevNext

mcal_create_calendar

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_create_calendar -- Create a new MCAL calendar

Description

int stream (string calendar)

+ Creates a new calendar named calendar. +


PrevHomeNext
mcal_closeUpmcal_rename_calendar
\ No newline at end of file diff --git a/function.mcal-date-compare.html b/function.mcal-date-compare.html new file mode 100644 index 0000000..4c3d41a --- /dev/null +++ b/function.mcal-date-compare.html @@ -0,0 +1,177 @@ +mcal_date_compare
PHP Manual
PrevNext

mcal_date_compare

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_date_compare -- Compares two dates

Description

int mcal_date_compare (int a_year, int a_month, int a_day, int b_year, int b_month, int b_day)

+ mcal_date_compare() Compares the two given + dates, returns <0, 0, >0 if a<b, a==b, a>b respectively. +


PrevHomeNext
mcal_day_of_yearUpmcal_next_recurrence
\ No newline at end of file diff --git a/function.mcal-date-valid.html b/function.mcal-date-valid.html new file mode 100644 index 0000000..4881d68 --- /dev/null +++ b/function.mcal-date-valid.html @@ -0,0 +1,179 @@ +mcal_date_valid
PHP Manual
PrevNext

mcal_date_valid

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_date_valid --  + Returns true if the given year, month, day is a valid date +

Description

int mcal_date_valid (int year, int month, int day)

+ mcal_date_valid() Returns true if the given + year, month and day is a valid date, false if not. +


PrevHomeNext
mcal_days_in_monthUpmcal_time_valid
\ No newline at end of file diff --git a/function.mcal-day-of-week.html b/function.mcal-day-of-week.html new file mode 100644 index 0000000..3dc80ab --- /dev/null +++ b/function.mcal-day-of-week.html @@ -0,0 +1,179 @@ +mcal_day_of_week
PHP Manual
PrevNext

mcal_day_of_week

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_day_of_week --  + Returns the day of the week of the given date +

Description

int mcal_ (int year, int month, int day)

+ mcal_day_of_week() returns the day of the week + of the given date. +


PrevHomeNext
mcal_time_validUpmcal_day_of_year
\ No newline at end of file diff --git a/function.mcal-day-of-year.html b/function.mcal-day-of-year.html new file mode 100644 index 0000000..2798a98 --- /dev/null +++ b/function.mcal-day-of-year.html @@ -0,0 +1,179 @@ +mcal_day_of_year
PHP Manual
PrevNext

mcal_day_of_year

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_day_of_year --  + Returns the day of the year of the given date +

Description

int mcal_ (int year, int month, int day)

+ mcal_day_of_year() returns the day of the year + of the given date. +


PrevHomeNext
mcal_day_of_weekUpmcal_date_compare
\ No newline at end of file diff --git a/function.mcal-days-in-month.html b/function.mcal-days-in-month.html new file mode 100644 index 0000000..fba9592 --- /dev/null +++ b/function.mcal-days-in-month.html @@ -0,0 +1,180 @@ +mcal_days_in_month
PHP Manual
PrevNext

mcal_days_in_month

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_days_in_month --  + Returns the number of days in the given month +

Description

int mcal_days_in_month (int month, int leap year)

+ mcal_days_in_month() Returns the number of + days in the given month, taking into account if the given year is + a leap year or not. +


PrevHomeNext
mcal_is_leap_yearUpmcal_date_valid
\ No newline at end of file diff --git a/function.mcal-delete-calendar.html b/function.mcal-delete-calendar.html new file mode 100644 index 0000000..b2ddf67 --- /dev/null +++ b/function.mcal-delete-calendar.html @@ -0,0 +1,178 @@ +mcal_delete_calendar
PHP Manual
PrevNext

mcal_delete_calendar

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_delete_calendar -- Delete an MCAL calendar

Description

int stream (string calendar)

+ Deletes the calendar named calendar. +


PrevHomeNext
mcal_rename_calendarUpmcal_fetch_event
\ No newline at end of file diff --git a/function.mcal-delete-event.html b/function.mcal-delete-event.html new file mode 100644 index 0000000..dff2a4a --- /dev/null +++ b/function.mcal-delete-event.html @@ -0,0 +1,179 @@ +mcal_delete_event
PHP Manual
PrevNext

mcal_delete_event

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_delete_event -- Delete an event from an MCAL calendar

Description

int mcal_delete_event (int mcal_stream [, int event_id])

+ mcal_delete_event() deletes the calendar event + specified by the event_id.

Returns true. +


PrevHomeNext
mcal_store_eventUpmcal_snooze
\ No newline at end of file diff --git a/function.mcal-event-add-attribute.html b/function.mcal-event-add-attribute.html new file mode 100644 index 0000000..7b377d1 --- /dev/null +++ b/function.mcal-event-add-attribute.html @@ -0,0 +1,182 @@ +mcal_event_add_attribute
PHP Manual
PrevNext

mcal_event_add_attribute

(PHP3 >= 3.0.15, PHP4 >= 4.0RC1)

mcal_event_add_attribute --  + Adds an attribute and a value to the streams global event structure +

Description

void + mcal_event_add_attribute + (int stream, string attribute, string value)

+ mcal_event_add_attribute() adds an attribute + to the stream's global event structure with the value given by + "value". +


PrevHomeNext
mcal_fetch_current_stream_eventUpmcal_expunge
\ No newline at end of file diff --git a/function.mcal-event-init.html b/function.mcal-event-init.html new file mode 100644 index 0000000..cb77e1a --- /dev/null +++ b/function.mcal-event-init.html @@ -0,0 +1,183 @@ +mcal_event_init
PHP Manual
PrevNext

mcal_event_init

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_event_init --  + Initializes a streams global event structure +

Description

int mcal_event_init (int stream)

+ mcal_event_init() initializes a streams global + event structure. this effectively sets all elements of the + structure to 0, or the default settings. +

Returns true. +


PrevHomeNext
mcal_list_alarmsUpmcal_event_set_category
\ No newline at end of file diff --git a/function.mcal-event-set-alarm.html b/function.mcal-event-set-alarm.html new file mode 100644 index 0000000..9f9de93 --- /dev/null +++ b/function.mcal-event-set-alarm.html @@ -0,0 +1,182 @@ +mcal_event_set_alarm
PHP Manual
PrevNext

mcal_event_set_alarm

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_event_set_alarm --  + Sets the alarm of the streams global event structure +

Description

int mcal_event_set_alarm (int stream, int alarm)

+ mcal_event_set_alarm() sets the streams global + event structure's alarm to the given minutes before the event. +

Returns true. +


PrevHomeNext
mcal_event_set_endUpmcal_event_set_class
\ No newline at end of file diff --git a/function.mcal-event-set-category.html b/function.mcal-event-set-category.html new file mode 100644 index 0000000..633ed03 --- /dev/null +++ b/function.mcal-event-set-category.html @@ -0,0 +1,182 @@ +mcal_event_set_category
PHP Manual
PrevNext

mcal_event_set_category

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_event_set_category --  + Sets the category of the streams global event structure +

Description

int mcal_event_set_category (int stream, string category)

+ mcal_event_set_category() sets the streams + global event structure's category to the given string. +

Returns true. +


PrevHomeNext
mcal_event_initUpmcal_event_set_title
\ No newline at end of file diff --git a/function.mcal-event-set-class.html b/function.mcal-event-set-class.html new file mode 100644 index 0000000..8f57688 --- /dev/null +++ b/function.mcal-event-set-class.html @@ -0,0 +1,183 @@ +mcal_event_set_class
PHP Manual
PrevNext

mcal_event_set_class

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_event_set_class --  + Sets the class of the streams global event structure +

Description

int mcal_event_set_class (int stream, int class)

+ mcal_event_set_class() sets the streams global + event structure's class to the given value. The class is either 1 + for public, or 0 for private. +

Returns true. +


PrevHomeNext
mcal_event_set_alarmUpmcal_is_leap_year
\ No newline at end of file diff --git a/function.mcal-event-set-description.html b/function.mcal-event-set-description.html new file mode 100644 index 0000000..d10ff0f --- /dev/null +++ b/function.mcal-event-set-description.html @@ -0,0 +1,184 @@ +mcal_event_set_description
PHP Manual
PrevNext

mcal_event_set_description

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_event_set_description --  + Sets the description of the streams global event structure +

Description

int + mcal_event_set_description + (int stream, string description)

+ mcal_event_set_description() sets the streams + global event structure's description to the given string. +

Returns true. +


PrevHomeNext
mcal_event_set_titleUpmcal_event_set_start
\ No newline at end of file diff --git a/function.mcal-event-set-end.html b/function.mcal-event-set-end.html new file mode 100644 index 0000000..718dad8 --- /dev/null +++ b/function.mcal-event-set-end.html @@ -0,0 +1,186 @@ +mcal_event_set_end
PHP Manual
PrevNext

mcal_event_set_end

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_event_set_end --  + Sets the end date and time of the streams global event structure +

Description

int mcal_event_set_end (int stream, int year, int month [, int + day [, int + hour [, int + min [, int + sec]]]])

+ mcal_event_set_end() sets the streams global + event structure's end date and time to the given values. +

Returns true. +


PrevHomeNext
mcal_event_set_startUpmcal_event_set_alarm
\ No newline at end of file diff --git a/function.mcal-event-set-recur-daily.html b/function.mcal-event-set-recur-daily.html new file mode 100644 index 0000000..5846360 --- /dev/null +++ b/function.mcal-event-set-recur-daily.html @@ -0,0 +1,182 @@ +mcal_event_set_recur_daily
PHP Manual
PrevNext

mcal_event_set_recur_daily

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_event_set_recur_daily --  + Sets the recurrence of the streams global event structure +

Description

int + mcal_event_set_recur_daily + (int stream, int year, int month, int day, int interval)

+ mcal_event_set_recur_daily() sets the streams + global event structure's recurrence to the given value to be + reoccuring on a daily basis, ending at the given date. +


PrevHomeNext
mcal_event_set_recur_noneUpmcal_event_set_recur_weekly
\ No newline at end of file diff --git a/function.mcal-event-set-recur-monthly-mday.html b/function.mcal-event-set-recur-monthly-mday.html new file mode 100644 index 0000000..e581f6e --- /dev/null +++ b/function.mcal-event-set-recur-monthly-mday.html @@ -0,0 +1,183 @@ +mcal_event_set_recur_monthly_mday
PHP Manual
PrevNext

mcal_event_set_recur_monthly_mday

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_event_set_recur_monthly_mday --  + Sets the recurrence of the streams global event structure +

Description

int + mcal_event_set_recur_monthly_mday + (int stream, int year, int month, int day, int interval)

+ mcal_event_set_recur_monthly_mday() sets the + streams global event structure's recurrence to the given value to + be reoccuring on a monthly by month day basis, ending at the + given date. +


PrevHomeNext
mcal_event_set_recur_weeklyUpmcal_event_set_recur_monthly_wday
\ No newline at end of file diff --git a/function.mcal-event-set-recur-monthly-wday.html b/function.mcal-event-set-recur-monthly-wday.html new file mode 100644 index 0000000..12e4087 --- /dev/null +++ b/function.mcal-event-set-recur-monthly-wday.html @@ -0,0 +1,183 @@ +mcal_event_set_recur_monthly_wday
PHP Manual
PrevNext

mcal_event_set_recur_monthly_wday

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_event_set_recur_monthly_wday --  + Sets the recurrence of the streams global event structure +

Description

int + mcal_event_set_recur_monthly_wday + (int stream, int year, int month, int day, int interval)

+ mcal_event_set_recur_monthly_wday() sets the + streams global event structure's recurrence to the given value to + be reoccuring on a monthly by week basis, ending at the given + date. +


PrevHomeNext
mcal_event_set_recur_monthly_mdayUpmcal_event_set_recur_yearly
\ No newline at end of file diff --git a/function.mcal-event-set-recur-none.html b/function.mcal-event-set-recur-none.html new file mode 100644 index 0000000..3738305 --- /dev/null +++ b/function.mcal-event-set-recur-none.html @@ -0,0 +1,182 @@ +mcal_event_set_recur_none
PHP Manual
PrevNext

mcal_event_set_recur_none

(PHP3 >= 3.0.15, PHP4 >= 4.0RC1)

mcal_event_set_recur_none --  + Sets the recurrence of the streams global event structure +

Description

int + mcal_event_set_recur_none + (int stream)

+ mcal_event_set_recur_none() sets the streams + global event structure to not recur (event->recur_type is set to + MCAL_RECUR_NONE). +


PrevHomeNext
mcal_next_recurrenceUpmcal_event_set_recur_daily
\ No newline at end of file diff --git a/function.mcal-event-set-recur-weekly.html b/function.mcal-event-set-recur-weekly.html new file mode 100644 index 0000000..e57f5a7 --- /dev/null +++ b/function.mcal-event-set-recur-weekly.html @@ -0,0 +1,182 @@ +mcal_event_set_recur_weekly
PHP Manual
PrevNext

mcal_event_set_recur_weekly

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_event_set_recur_weekly --  + Sets the recurrence of the streams global event structure +

Description

int + mcal_event_set_recur_weekly + (int stream, int year, int month, int day, int interval, int weekdays)

+ mcal_event_set_recur_weekly() sets the streams + global event structure's recurrence to the given value to be + reoccuring on a weekly basis, ending at the given date. +


PrevHomeNext
mcal_event_set_recur_dailyUpmcal_event_set_recur_monthly_mday
\ No newline at end of file diff --git a/function.mcal-event-set-recur-yearly.html b/function.mcal-event-set-recur-yearly.html new file mode 100644 index 0000000..db73602 --- /dev/null +++ b/function.mcal-event-set-recur-yearly.html @@ -0,0 +1,182 @@ +mcal_event_set_recur_yearly
PHP Manual
PrevNext

mcal_event_set_recur_yearly

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_event_set_recur_yearly --  + Sets the recurrence of the streams global event structure +

Description

int + mcal_event_set_recur_yearly + (int stream, int year, int month, int day, int interval)

+ mcal_event_set_recur_yearly() sets the streams + global event structure's recurrence to the given value to be + reoccuring on a yearly basis,ending at the given date. +


PrevHomeNext
mcal_event_set_recur_monthly_wdayUpmcal_fetch_current_stream_event
\ No newline at end of file diff --git a/function.mcal-event-set-start.html b/function.mcal-event-set-start.html new file mode 100644 index 0000000..ec685d7 --- /dev/null +++ b/function.mcal-event-set-start.html @@ -0,0 +1,187 @@ +mcal_event_set_start
PHP Manual
PrevNext

mcal_event_set_start

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_event_set_start --  + Sets the start date and time of the streams global event + structure +

Description

int mcal_event_set_start (int stream, int year, int month [, int + day [, int + hour [, int + min [, int + sec]]]])

+ mcal_event_set_start() sets the streams global + event structure's start date and time to the given values. +

Returns true. +


PrevHomeNext
mcal_event_set_descriptionUpmcal_event_set_end
\ No newline at end of file diff --git a/function.mcal-event-set-title.html b/function.mcal-event-set-title.html new file mode 100644 index 0000000..60edd12 --- /dev/null +++ b/function.mcal-event-set-title.html @@ -0,0 +1,182 @@ +mcal_event_set_title
PHP Manual
PrevNext

mcal_event_set_title

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_event_set_title --  + Sets the title of the streams global event structure +

Description

int mcal_event_set_title (int stream, string title)

+ mcal_event_set_title() sets the streams global + event structure's title to the given string. +

Returns true. +


PrevHomeNext
mcal_event_set_categoryUpmcal_event_set_description
\ No newline at end of file diff --git a/function.mcal-expunge.html b/function.mcal-expunge.html new file mode 100644 index 0000000..068e83d --- /dev/null +++ b/function.mcal-expunge.html @@ -0,0 +1,181 @@ +mcal_expunge
PHP Manual
PrevNext

mcal_expunge

(unknown)

mcal_expunge --  + Deletes all events marked for being expunged. +

Description

int + mcal_expunge + (int stream)

+ mcal_expunge() Deletes all events which have + been previously marked for deletion. +


PrevHomeNext
mcal_event_add_attributeUpMcrypt Encryption Functions
\ No newline at end of file diff --git a/function.mcal-fetch-current-stream-event.html b/function.mcal-fetch-current-stream-event.html new file mode 100644 index 0000000..897bc0f --- /dev/null +++ b/function.mcal-fetch-current-stream-event.html @@ -0,0 +1,274 @@ +mcal_fetch_current_stream_event
PHP Manual
PrevNext

mcal_fetch_current_stream_event

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_fetch_current_stream_event --  + Returns an object containing the current streams event structure +

Description

int + mcal_fetch_current_stream_event + (int stream)

+ mcal_event_fetch_current_stream_event() + returns the current stream's event structure as an object + containing: + +

  • int id - ID of that event.

  • int public - TRUE if the event if public, FALSE if it is + private.

  • string category - Category string of the event.

  • string title - Title string of the event.

  • string description - Description string of the event.

  • int alarm - number of minutes before the event to send an + alarm/reminder.

  • object start - Object containing a datetime entry.

  • object end - Object containing a datetime entry.

  • int recur_type - recurrence type

  • int recur_interval - recurrence interval

  • datetime recur_enddate - recurrence end date

  • int recur_data - recurrence data

+ + All datetime entries consist of an object that contains: + +

  • int year - year

  • int month - month

  • int mday - day of month

  • int hour - hour

  • int min - minutes

  • int sec - seconds

  • int alarm - minutes before event to send an alarm

+


PrevHomeNext
mcal_event_set_recur_yearlyUpmcal_event_add_attribute
\ No newline at end of file diff --git a/function.mcal-fetch-event.html b/function.mcal-fetch-event.html new file mode 100644 index 0000000..0a58485 --- /dev/null +++ b/function.mcal-fetch-event.html @@ -0,0 +1,277 @@ +mcal_fetch_event
PHP Manual
PrevNext

mcal_fetch_event

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_fetch_event --  + Fetches an event from the calendar stream +

Description

object mcal_fetch_event (int mcal_stream, int event_id [, int options])

+ mcal_fetch_event() fetches an event from the + calendar stream specified by id. +

Returns an event object consisting of: +

  • int id - ID of that event.

  • int public - TRUE if the event if public, FALSE if it is + private.

  • string category - Category string of the event.

  • string title - Title string of the event.

  • string description - Description string of the event.

  • int alarm - number of minutes before the event to send an + alarm/reminder.

  • object start - Object containing a datetime entry.

  • object end - Object containing a datetime entry.

  • int recur_type - recurrence type

  • int recur_interval - recurrence interval

  • datetime recur_enddate - recurrence end date

  • int recur_data - recurrence data

+ + All datetime entries consist of an object that contains: + +

  • int year - year

  • int month - month

  • int mday - day of month

  • int hour - hour

  • int min - minutes

  • int sec - seconds

  • int alarm - minutes before event to send an alarm


PrevHomeNext
mcal_delete_calendarUpmcal_list_events
\ No newline at end of file diff --git a/function.mcal-is-leap-year.html b/function.mcal-is-leap-year.html new file mode 100644 index 0000000..c3f7d0e --- /dev/null +++ b/function.mcal-is-leap-year.html @@ -0,0 +1,179 @@ +mcal_is_leap_year
PHP Manual
PrevNext

mcal_is_leap_year

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_is_leap_year --  + Returns if the given year is a leap year or not +

Description

int mcal_is_leap_year (int year)

+ mcal_is_leap_year() returns 1 if the given + year is a leap year, 0 if not. +


PrevHomeNext
mcal_event_set_classUpmcal_days_in_month
\ No newline at end of file diff --git a/function.mcal-list-alarms.html b/function.mcal-list-alarms.html new file mode 100644 index 0000000..d8207f2 --- /dev/null +++ b/function.mcal-list-alarms.html @@ -0,0 +1,196 @@ +mcal_list_alarms
PHP Manual
PrevNext

mcal_list_alarms

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_list_alarms --  + Return a list of events that has an alarm triggered at the given + datetime +

Description

array mcal_list_events (int mcal_stream [, int + begin_year [, int + begin_month [, int + begin_day [, int + end_year [, int + end_month [, int + end_day]]]]]])

Returns an array of event ID's that has an alarm going off + between the start and end dates, or if just a stream is given, + uses the start and end dates in the global event structure. +

+ mcal_list_events() function takes in an + optional beginning date and an end date for a calendar stream. An + array of event id's that are between the given dates or the + internal event dates are returned. +


PrevHomeNext
mcal_snoozeUpmcal_event_init
\ No newline at end of file diff --git a/function.mcal-list-events.html b/function.mcal-list-events.html new file mode 100644 index 0000000..1e826b3 --- /dev/null +++ b/function.mcal-list-events.html @@ -0,0 +1,187 @@ +mcal_list_events
PHP Manual
PrevNext

mcal_list_events

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_list_events --  + Return a list of IDs for a date or a range of dates. +

Description

array mcal_list_events (int mcal_stream, objectbegin_date [, object + end_date])

Returns an array of ID's that are between the start and end + dates, or if just a stream is given, uses the start and end dates + in the global event structure. +

+ mcal_list_events() function takes in an + beginning date and an optional end date for a calendar stream. An + array of event id's that are between the given dates or the + internal event dates are returned. +


PrevHomeNext
mcal_fetch_eventUpmcal_append_event
\ No newline at end of file diff --git a/function.mcal-next-recurrence.html b/function.mcal-next-recurrence.html new file mode 100644 index 0000000..f682b18 --- /dev/null +++ b/function.mcal-next-recurrence.html @@ -0,0 +1,180 @@ +mcal_next_recurrence
PHP Manual
PrevNext

mcal_next_recurrence

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_next_recurrence -- Returns the next recurrence of the event

Description

int mcal_next_recurrence (int stream, int weekstart, array next)

+ mcal_next_recurrence() returns an object + filled with the next date the event occurs, on or after the + supplied date. Returns empty date field if event does not occur + or something is invalid. Uses weekstart to determine what day is + considered the beginning of the week. +


PrevHomeNext
mcal_date_compareUpmcal_event_set_recur_none
\ No newline at end of file diff --git a/function.mcal-open.html b/function.mcal-open.html new file mode 100644 index 0000000..ed81ca4 --- /dev/null +++ b/function.mcal-open.html @@ -0,0 +1,197 @@ +mcal_open
PHP Manual
PrevNext

mcal_open

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_open -- Opens up an MCAL connection

Description

int mcal_open (string calendar, string username, string password, int options)

Returns an MCAL stream on success, false on error. +

mcal_open() opens up an MCAL connection to the + specified calendar store. If the optional + options is specified, passes the + options to that mailbox also. The streams + internal event structure is also initialized upon connection. +


PrevHomeNext
MCAL functionsUpmcal_popen
\ No newline at end of file diff --git a/function.mcal-popen.html b/function.mcal-popen.html new file mode 100644 index 0000000..cf7dcd1 --- /dev/null +++ b/function.mcal-popen.html @@ -0,0 +1,197 @@ +mcal_popen
PHP Manual
PrevNext

mcal_popen

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_popen -- Opens up a persistant MCAL connection

Description

int mcal_popen (string calendar, string username, string password, int options)

Returns an MCAL stream on success, false on error. +

mcal_popen() opens up an MCAL connection to the + specified calendar store. If the optional + options is specified, passes the + options to that mailbox also. The streams + internal event structure is also initialized upon connection. +


PrevHomeNext
mcal_openUpmcal_reopen
\ No newline at end of file diff --git a/function.mcal-rename-calendar.html b/function.mcal-rename-calendar.html new file mode 100644 index 0000000..1dfb926 --- /dev/null +++ b/function.mcal-rename-calendar.html @@ -0,0 +1,184 @@ +mcal_rename_calendar
PHP Manual
PrevNext

mcal_rename_calendar

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_rename_calendar -- Rename an MCAL calendar

Description

int stream (string old_name, string new_name)

+ Renames the calendar old_name to + new_name. +


PrevHomeNext
mcal_create_calendarUpmcal_delete_calendar
\ No newline at end of file diff --git a/function.mcal-reopen.html b/function.mcal-reopen.html new file mode 100644 index 0000000..25b4e0b --- /dev/null +++ b/function.mcal-reopen.html @@ -0,0 +1,196 @@ +mcal_reopen
PHP Manual
PrevNext

mcal_reopen

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_reopen -- Reopens an MCAL connection

Description

int mcal_reopen (string calendar, int options)

Reopens an MCAL stream to a new calendar. +

mcal_reopen() reopens an MCAL connection to the + specified calendar store. If the optional + options is specified, passes the + options to that mailbox also. +


PrevHomeNext
mcal_popenUpmcal_close
\ No newline at end of file diff --git a/function.mcal-snooze.html b/function.mcal-snooze.html new file mode 100644 index 0000000..e371e8e --- /dev/null +++ b/function.mcal-snooze.html @@ -0,0 +1,180 @@ +mcal_snooze
PHP Manual
PrevNext

mcal_snooze

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_snooze -- Turn off an alarm for an event

Description

int mcal_snooze (int id)

+ mcal_snooze() turns off an alarm for a + calendar event specified by the id. +

Returns true. +


PrevHomeNext
mcal_delete_eventUpmcal_list_alarms
\ No newline at end of file diff --git a/function.mcal-store-event.html b/function.mcal-store-event.html new file mode 100644 index 0000000..e5a7825 --- /dev/null +++ b/function.mcal-store-event.html @@ -0,0 +1,180 @@ +mcal_store_event
PHP Manual
PrevNext

mcal_store_event

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_store_event -- Modify an existing event in an MCAL calendar

Description

int mcal_store_event (int mcal_stream)

+ mcal_store_event() Stores the modifications + to the current global event for the given stream. +

Returns true on success and false on error. +


PrevHomeNext
mcal_append_eventUpmcal_delete_event
\ No newline at end of file diff --git a/function.mcal-time-valid.html b/function.mcal-time-valid.html new file mode 100644 index 0000000..447c935 --- /dev/null +++ b/function.mcal-time-valid.html @@ -0,0 +1,179 @@ +mcal_time_valid
PHP Manual
PrevNext

mcal_time_valid

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

mcal_time_valid --  + Returns true if the given year, month, day is a valid time +

Description

int mcal_time_valid (int hour, int minutes, int seconds)

+ mcal_time_valid() Returns true if the given + hour, minutes and seconds is a valid time, false if not. +


PrevHomeNext
mcal_date_validUpmcal_day_of_week
\ No newline at end of file diff --git a/function.mcrypt-cbc.html b/function.mcrypt-cbc.html new file mode 100644 index 0000000..8aa7693 --- /dev/null +++ b/function.mcrypt-cbc.html @@ -0,0 +1,290 @@ +mcrypt_cbc
PHP Manual
PrevNext

mcrypt_cbc

(PHP3 >= 3.0.8, PHP4 )

mcrypt_cbc -- Encrypt/decrypt data in CBC mode

Description

string mcrypt_cbc (int cipher, string key, string data, int mode [, string + iv])

string mcrypt_cbc (string cipher, string key, string data, int mode [, string + iv])

The first prototype is when linked against libmcrypt 2.2.x, the + second when linked against libmcrypt 2.4.x. +

Mcrypt_cbc() encrypts or decrypts (depending + on mode) the data + with cipher and key + in CBC cipher mode and returns the resulting string. +

Cipher is one of the MCRYPT_ciphername + constants. +

Key is the key supplied to the + algorithm. It must be kept secret. +

Data is the data which shall be + encrypted/decrypted. +

Mode is MCRYPT_ENCRYPT or MCRYPT_DECRYPT. +

IV is the optional initialization vector. +

See also: mcrypt_cfb(), + mcrypt_ecb(), and + mcrypt_ofb(). +


PrevHomeNext
mcrypt_create_ivUpmcrypt_cfb
\ No newline at end of file diff --git a/function.mcrypt-cfb.html b/function.mcrypt-cfb.html new file mode 100644 index 0000000..01ca5e8 --- /dev/null +++ b/function.mcrypt-cfb.html @@ -0,0 +1,289 @@ +mcrypt_cfb
PHP Manual
PrevNext

mcrypt_cfb

(PHP3 >= 3.0.8, PHP4 )

mcrypt_cfb -- Encrypt/decrypt data in CFB mode

Description

string mcrypt_cfb (int cipher, string key, string data, int mode, string iv)

string mcrypt_cfb (string cipher, string key, string data, int mode [, string + iv])

The first prototype is when linked against libmcrypt 2.2.x, the + second when linked against libmcrypt 2.4.x. +

Mcrypt_cfb() encrypts or decrypts (depending + on mode) the data + with cipher and key + in CFB cipher mode and returns the resulting string. +

Cipher is one of the MCRYPT_ciphername + constants. +

Key is the key supplied to the + algorithm. It must be kept secret. +

Data is the data which shall be + encrypted/decrypted. +

Mode is MCRYPT_ENCRYPT or MCRYPT_DECRYPT. +

IV is the initialization vector. +

See also: mcrypt_cbc(), + mcrypt_ecb(), and + mcrypt_ofb(). +


PrevHomeNext
mcrypt_cbcUpmcrypt_ecb
\ No newline at end of file diff --git a/function.mcrypt-create-iv.html b/function.mcrypt-create-iv.html new file mode 100644 index 0000000..06af774 --- /dev/null +++ b/function.mcrypt-create-iv.html @@ -0,0 +1,247 @@ +mcrypt_create_iv
PHP Manual
PrevNext

mcrypt_create_iv

(PHP3 >= 3.0.8, PHP4 )

mcrypt_create_iv --  + Create an initialization vector (IV) from a random source +

Description

string + mcrypt_create_iv (int size, int source)

Mcrypt_create_iv() is used to create an IV. +

mcrypt_create_iv() takes two arguments, + size determines the size of the IV, + source specifies the source of the IV. +

The source can be MCRYPT_RAND (system random number generator), + MCRYPT_DEV_RANDOM (read data from /dev/random) and + MCRYPT_DEV_URANDOM (read data from /dev/urandom). If you use + MCRYPT_RAND, make sure to call srand() before to initialize the + random number generator. +

Example 1. Mcrypt_create_iv() example


<?php
+$cipher = MCRYPT_TripleDES;
+$block_size = mcrypt_get_block_size ($cipher);
+$iv = mcrypt_create_iv ($block_size, MCRYPT_DEV_RANDOM);
+?>
+      
+


PrevHomeNext
mcrypt_get_key_sizeUpmcrypt_cbc
\ No newline at end of file diff --git a/function.mcrypt-decrypt.html b/function.mcrypt-decrypt.html new file mode 100644 index 0000000..6e3bb72 --- /dev/null +++ b/function.mcrypt-decrypt.html @@ -0,0 +1,228 @@ +mcrypt_decrypt
PHP Manual
PrevNext

mcrypt_decrypt

(PHP4 >= 4.0.2)

mcrypt_decrypt -- Decrypts crypttext with given parameters

Description

string mcrypt_decrypt (string cipher, string key, string data, string mode [, string + iv])

Mcrypt_decrypt() decrypts the data + and returns the unencrypted data. +

Cipher is one of the MCRYPT_ciphername + constants of the name of the algorithm as string. +

Key is the key with which the data + is encrypted. If it's smaller that the required keysize, it + is padded with '\0'. +

Data is the data that will be decrypted + with the given cipher and mode. If the size of the data is not + n * blocksize, the data will be padded with '\0'. +

Mode is one of the MCRYPT_MODE_modename + constants of one of "ecb", "cbc", "cfb", "ofb", "nofb" or + "stream". +

The IV parameter is used for the + initialisation in CBC, CFB, OFB modes, and in some algorithms + in STREAM mode. If you do not supply an IV, while it is needed + for an algorithm, the function issues a warning and uses an + IV with all bytes set to '\0'. +


PrevHomeNext
mcrypt_encryptUpmcrypt_module_open
\ No newline at end of file diff --git a/function.mcrypt-ecb.html b/function.mcrypt-ecb.html new file mode 100644 index 0000000..0ec9863 --- /dev/null +++ b/function.mcrypt-ecb.html @@ -0,0 +1,281 @@ +mcrypt_ecb
PHP Manual
PrevNext

mcrypt_ecb

(PHP3 >= 3.0.8, PHP4 )

mcrypt_ecb -- Encrypt/decrypt data in ECB mode

Description

string mcrypt_ecb (int cipher, string key, string data, int mode)

string mcrypt_ecb (string cipher, string key, string data, int mode [, string + iv])

The first prototype is when linked against libmcrypt 2.2.x, the + second when linked against libmcrypt 2.4.x. +

Mcrypt_ecb() encrypts or decrypts (depending + on mode) the data + with cipher and key + in ECB cipher mode and returns the resulting string. +

Cipher is one of the MCRYPT_ciphername + constants. +

Key is the key supplied to the + algorithm. It must be kept secret. +

Data is the data which shall be + encrypted/decrypted. +

Mode is MCRYPT_ENCRYPT or MCRYPT_DECRYPT. +

See also: mcrypt_cbc(), + mcrypt_cfb(), and + mcrypt_ofb(). +


PrevHomeNext
mcrypt_cfbUpmcrypt_ofb
\ No newline at end of file diff --git a/function.mcrypt-enc-get-algorithms-name.html b/function.mcrypt-enc-get-algorithms-name.html new file mode 100644 index 0000000..953a5be --- /dev/null +++ b/function.mcrypt-enc-get-algorithms-name.html @@ -0,0 +1,172 @@ +mcrypt_enc_get_algorithms_name
PHP Manual
PrevNext

mcrypt_enc_get_algorithms_name

(PHP4 >= 4.0.2)

mcrypt_enc_get_algorithms_name -- Returns the name of the opened algorithm

Description

string mcrypt_enc_get_algorithms_name (resource td)

This function returns the name of the algorithm. +


PrevHomeNext
mcrypt_enc_get_iv_sizeUpmcrypt_enc_get_modes_name
\ No newline at end of file diff --git a/function.mcrypt-enc-get-block-size.html b/function.mcrypt-enc-get-block-size.html new file mode 100644 index 0000000..e1aa50e --- /dev/null +++ b/function.mcrypt-enc-get-block-size.html @@ -0,0 +1,173 @@ +mcrypt_enc_get_block_size
PHP Manual
PrevNext

mcrypt_enc_get_block_size

(PHP4 >= 4.0.2)

mcrypt_enc_get_block_size -- Returns the blocksize of the opened algorithm

Description

int mcrypt_enc_get_block_size (resource td)

This function returns the block size of the algorithm specified by + the encryption descriptor td in bytes. +


PrevHomeNext
mcrypt_enc_is_block_modeUpmcrypt_enc_get_key_size
\ No newline at end of file diff --git a/function.mcrypt-enc-get-iv-size.html b/function.mcrypt-enc-get-iv-size.html new file mode 100644 index 0000000..f58f1bc --- /dev/null +++ b/function.mcrypt-enc-get-iv-size.html @@ -0,0 +1,175 @@ +mcrypt_enc_get_iv_size
PHP Manual
PrevNext

mcrypt_enc_get_iv_size

(PHP4 >= 4.0.2)

mcrypt_enc_get_iv_size -- Returns the size of the IV of the opened algorithm

Description

int mcrypt_enc_get_iv_size (resource td)

This function returns the size of the iv of the algorithm + specified by the encryption descriptor in bytes. If it returns + '0' then the IV is ignored in the algorithm. An IV is used in + cbc, cfb and ofb modes, and in some algorithms in stream mode. +


PrevHomeNext
mcrypt_enc_get_supported_key_sizesUpmcrypt_enc_get_algorithms_name
\ No newline at end of file diff --git a/function.mcrypt-enc-get-key-size.html b/function.mcrypt-enc-get-key-size.html new file mode 100644 index 0000000..89c4fcf --- /dev/null +++ b/function.mcrypt-enc-get-key-size.html @@ -0,0 +1,173 @@ +mcrypt_enc_get_key_size
PHP Manual
PrevNext

mcrypt_enc_get_key_size

(PHP4 >= 4.0.2)

mcrypt_enc_get_key_size -- Returns the maximum supported keysize of the opened mode

Description

int mcrypt_enc_get_key_size (resource td)

This function returns the maximum supported key size of the + algorithm specified by the encryption descriptor td in bytes. +


PrevHomeNext
mcrypt_enc_get_block_sizeUpmcrypt_enc_get_supported_key_sizes
\ No newline at end of file diff --git a/function.mcrypt-enc-get-modes-name.html b/function.mcrypt-enc-get-modes-name.html new file mode 100644 index 0000000..f7fb3fb --- /dev/null +++ b/function.mcrypt-enc-get-modes-name.html @@ -0,0 +1,172 @@ +mcrypt_enc_get_modes_name
PHP Manual
PrevNext

mcrypt_enc_get_modes_name

(PHP4 >= 4.0.2)

mcrypt_enc_get_modes_name -- Returns the name of the opened mode

Description

string mcrypt_enc_get_modes_name (resource td)

This function returns the name of the mode. +


PrevHomeNext
mcrypt_enc_get_algorithms_nameUpmcrypt_module_self_test
\ No newline at end of file diff --git a/function.mcrypt-enc-get-supported-key-sizes.html b/function.mcrypt-enc-get-supported-key-sizes.html new file mode 100644 index 0000000..612aaaf --- /dev/null +++ b/function.mcrypt-enc-get-supported-key-sizes.html @@ -0,0 +1,182 @@ +mcrypt_enc_get_supported_key_sizes
PHP Manual
PrevNext

mcrypt_enc_get_supported_key_sizes

(PHP4 >= 4.0.2)

mcrypt_enc_get_supported_key_sizes -- Returns an array with the supported keysizes of the opened algorithm

Description

array mcrypt_enc_get_supported_key_sizes (resource td)

Returns an array with the key sizes supported by the algorithm + specified by the encryption descriptor. If it returns an empty + array then all key sizes between 1 and + mcrypt_enc_get_key_size() are supported by the + algorithm. +


PrevHomeNext
mcrypt_enc_get_key_sizeUpmcrypt_enc_get_iv_size
\ No newline at end of file diff --git a/function.mcrypt-enc-is-block-algorithm-mode.html b/function.mcrypt-enc-is-block-algorithm-mode.html new file mode 100644 index 0000000..3b2ea72 --- /dev/null +++ b/function.mcrypt-enc-is-block-algorithm-mode.html @@ -0,0 +1,173 @@ +mcrypt_enc_is_block_algorithm_mode
PHP Manual
PrevNext

mcrypt_enc_is_block_algorithm_mode

(PHP4 >= 4.0.2)

mcrypt_enc_is_block_algorithm_mode -- Checks whether the encryption of the opened mode works on blocks

Description

int mcrypt_enc_is_block_algorithm_mode (resource td)

This function returns 1 if the mode is for use with block algorithms, + otherwise it returns 0. (eg. 0 for stream, and 1 for cbc, cfb, ofb). +


PrevHomeNext
mcrypt_enc_self_testUpmcrypt_enc_is_block_algorithm
\ No newline at end of file diff --git a/function.mcrypt-enc-is-block-algorithm.html b/function.mcrypt-enc-is-block-algorithm.html new file mode 100644 index 0000000..749e42f --- /dev/null +++ b/function.mcrypt-enc-is-block-algorithm.html @@ -0,0 +1,173 @@ +mcrypt_enc_is_block_algorithm
PHP Manual
PrevNext

mcrypt_enc_is_block_algorithm

(PHP4 >= 4.0.2)

mcrypt_enc_is_block_algorithm -- Checks whether the algorithm of the opened mode is a block algorithm

Description

int mcrypt_enc_is_block_algorithm (resource td)

This function returns 1 if the algorithm is a block algorithm, + or 0 if it is a stream algorithm. +


PrevHomeNext
mcrypt_enc_is_block_algorithm_modeUpmcrypt_enc_is_block_mode
\ No newline at end of file diff --git a/function.mcrypt-enc-is-block-mode.html b/function.mcrypt-enc-is-block-mode.html new file mode 100644 index 0000000..248130d --- /dev/null +++ b/function.mcrypt-enc-is-block-mode.html @@ -0,0 +1,174 @@ +mcrypt_enc_is_block_mode
PHP Manual
PrevNext

mcrypt_enc_is_block_mode

(PHP4 >= 4.0.2)

mcrypt_enc_is_block_mode -- Checks whether the opened mode outputs blocks

Description

int mcrypt_enc_is_block_mode (resource td)

This function returns 1 if the mode outputs blocks of bytes or + 0 if it outputs bytes. (eg. 1 for cbc and ecb, and 0 for cfb and + stream). +


PrevHomeNext
mcrypt_enc_is_block_algorithmUpmcrypt_enc_get_block_size
\ No newline at end of file diff --git a/function.mcrypt-enc-self-test.html b/function.mcrypt-enc-self-test.html new file mode 100644 index 0000000..2923a67 --- /dev/null +++ b/function.mcrypt-enc-self-test.html @@ -0,0 +1,174 @@ +mcrypt_enc_self_test
PHP Manual
PrevNext

mcrypt_enc_self_test

(PHP4 >= 4.0.2)

mcrypt_enc_self_test -- This function runs a self test on the opened module

Description

int mcrypt_enc_self_test (resource td)

This function runs the self test on the algorithm specified by the + descriptor td. If the self test succeeds it returns zero. In case + of an error, it returns 1. +


PrevHomeNext
mcrypt_generic_endUpmcrypt_enc_is_block_algorithm_mode
\ No newline at end of file diff --git a/function.mcrypt-encrypt.html b/function.mcrypt-encrypt.html new file mode 100644 index 0000000..d6f682f --- /dev/null +++ b/function.mcrypt-encrypt.html @@ -0,0 +1,299 @@ +mcrypt_encrypt
PHP Manual
PrevNext

mcrypt_encrypt

(PHP4 >= 4.0.2)

mcrypt_encrypt -- Encrypts plaintext with given parameters

Description

string mcrypt_encrypt (string cipher, string key, string data, string mode [, string + iv])

Mcrypt_encrypt() encrypts the data + and returns the encrypted data. +

Cipher is one of the MCRYPT_ciphername + constants of the name of the algorithm as string. +

Key is the key with which the data + will be encrypted. If it's smaller that the required keysize, it + is padded with '\0'. +

Data is the data that will be encrypted + with the given cipher and mode. If the size of the data is not + n * blocksize, the data will be padded with '\0'. The returned + crypttext can be larger that the size of the data that is given + by data. +

Mode is one of the MCRYPT_MODE_modename + constants of one of "ecb", "cbc", "cfb", "ofb", "nofb" or + "stream". +

The IV parameter is used for the + initialisation in CBC, CFB, OFB modes, and in some algorithms + in STREAM mode. If you do not supply an IV, while it is needed + for an algorithm, the function issues a warning and uses an + IV with all bytes set to '\0'. +

Example 1. Mcrypt_encrypt() Example


<?php
+$iv = mcrypt_create_iv (mcrypt_get_iv_size (MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND);
+$key = "This is a very secret key";
+$text = "Meet me at 11 o'clock behind the monument.";
+echo strlen ($text)."\n";
+
+$crypttext = mcrypt_encrypt (MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_ECB, $iv);
+echo strlen ($crypttext)."\n";
+?>
+      
+ The above example will print out: +

42
+64
+     
+


PrevHomeNext
mcrypt_get_iv_sizeUpmcrypt_decrypt
\ No newline at end of file diff --git a/function.mcrypt-generic-end.html b/function.mcrypt-generic-end.html new file mode 100644 index 0000000..c469fcb --- /dev/null +++ b/function.mcrypt-generic-end.html @@ -0,0 +1,174 @@ +mcrypt_generic_end
PHP Manual
PrevNext

mcrypt_generic_end

(PHP4 >= 4.0.2)

mcrypt_generic_end -- This function terminates encryption

Description

bool mcrypt_generic_end (resource td)

This function terminates encryption specified by the encryption + descriptor (td). Actually it clears all buffers, and closes + all the modules used. Returns FALSE on error, or TRUE on succes. +


PrevHomeNext
mdecrypt_genericUpmcrypt_enc_self_test
\ No newline at end of file diff --git a/function.mcrypt-generic-init.html b/function.mcrypt-generic-init.html new file mode 100644 index 0000000..9648e3a --- /dev/null +++ b/function.mcrypt-generic-init.html @@ -0,0 +1,210 @@ +mcrypt_generic_init
PHP Manual
PrevNext

mcrypt_generic_init

(PHP4 >= 4.0.2)

mcrypt_generic_init -- This function initializes all buffers needed for encryption

Description

int mcrypt_generic_init (resource td, string key, string iv)

The maximum length of the key should be the one obtained by + calling mcrypt_enc_get_key_size() and every + value smaller than this is legal. The IV should normally have + the size of the algorithms block size, but you must obtain the + size by calling mcrypt_enc_get_iv_size(). + IV is ignored in ECB. IV MUST exist in CFB, CBC, STREAM, nOFB + and OFB modes. It needs to be random and unique (but not secret). + The same IV must be used for encryption/decryption. If you do not + want to use it you should set it to zeros, but this is not + recommended. The function returns (-1) on error. +

You need to call this function before every + mcrypt_generic() or + mdecrypt_generic(). +


PrevHomeNext
mcrypt_module_openUpmcrypt_generic
\ No newline at end of file diff --git a/function.mcrypt-generic.html b/function.mcrypt-generic.html new file mode 100644 index 0000000..f9dd1c2 --- /dev/null +++ b/function.mcrypt-generic.html @@ -0,0 +1,176 @@ +mcrypt_generic
PHP Manual
PrevNext

mcrypt_generic

(PHP4 >= 4.0.2)

mcrypt_generic -- This function encrypts data

Description

string mcrypt_generic (resource td, string data)

This function encrypts data. The data is padded with "\0" + to make sure the length of the data is n * blocksize. This + function returns the encrypted data. Note that the length + of the returned string can in fact be longer then the input, + due to the padding of the data. +


PrevHomeNext
mcrypt_generic_initUpmdecrypt_generic
\ No newline at end of file diff --git a/function.mcrypt-get-block-size.html b/function.mcrypt-get-block-size.html new file mode 100644 index 0000000..383f52f --- /dev/null +++ b/function.mcrypt-get-block-size.html @@ -0,0 +1,222 @@ +mcrypt_get_block_size
PHP Manual
PrevNext

mcrypt_get_block_size

(PHP3 >= 3.0.8, PHP4 )

mcrypt_get_block_size -- Get the block size of the specified cipher

Description

int mcrypt_get_block_size (int cipher)

int mcrypt_get_block_size (string cipher, string module)

The first prototype is when linked against libmcrypt 2.2.x, the + second when linked against libmcrypt 2.4.x. +

Mcrypt_get_block_size() is used to get the + size of a block of the specified cipher. +

Mcrypt_get_block_size() takes one or two + arguments, the cipher and + module, and returns the size in bytes. +

See also: mcrypt_get_key_size(). +


PrevHomeNext
mcrypt_get_cipher_nameUpmcrypt_get_key_size
\ No newline at end of file diff --git a/function.mcrypt-get-cipher-name.html b/function.mcrypt-get-cipher-name.html new file mode 100644 index 0000000..b2c2dd3 --- /dev/null +++ b/function.mcrypt-get-cipher-name.html @@ -0,0 +1,266 @@ +mcrypt_get_cipher_name
PHP Manual
PrevNext

mcrypt_get_cipher_name

(PHP3 >= 3.0.8, PHP4 )

mcrypt_get_cipher_name -- Get the name of the specified cipher

Description

string mcrypt_get_cipher_name (int cipher)

string mcrypt_get_cipher_name (string cipher)

Mcrypt_get_cipher_name() is used to get the + name of the specified cipher. +

Mcrypt_get_cipher_name() takes the cipher + number as an argument (libmcrypt 2.2.x) or takes the cipher name + as an argument (libmcrypt 2.4.x) and returns the name of the cipher + or false, if the cipher does not exist. +

Example 1. Mcrypt_get_cipher_name() Example


<?php
+$cipher = MCRYPT_TripleDES;
+
+print mcrypt_get_cipher_name ($cipher);
+?>
+      
+

The above example will produce: +

TripleDES
+     
+


PrevHomeNext
Mcrypt Encryption FunctionsUpmcrypt_get_block_size
\ No newline at end of file diff --git a/function.mcrypt-get-iv-size.html b/function.mcrypt-get-iv-size.html new file mode 100644 index 0000000..d889020 --- /dev/null +++ b/function.mcrypt-get-iv-size.html @@ -0,0 +1,219 @@ +mcrypt_get_iv_size
PHP Manual
PrevNext

mcrypt_get_iv_size

(PHP4 >= 4.0.2)

mcrypt_get_iv_size -- Returns the size of the IV belonging to a specific cipher/mode combination

Description

int mcrypt_get_iv_size (string cipher, string mode)

int mcrypt_get_iv_size (resource td)

The first prototype is when linked against libmcrypt 2.2.x, the + second when linked against libmcrypt 2.4.x. +

Mcrypt_get_iv_size() returns the size of + the Initialisation Vector (IV) in bytes. On error the function + returns FALSE. If the IV is ignored in the specified cipher/mode + combination zero is returned. +

Cipher is one of the MCRYPT_ciphername + constants of the name of the algorithm as string. +

Mode is one of the MCRYPT_MODE_modename + constants of one of "ecb", "cbc", "cfb", "ofb", "nofb" or + "stream". +

Td is the algorithm specified. +


PrevHomeNext
mcrypt_list_modesUpmcrypt_encrypt
\ No newline at end of file diff --git a/function.mcrypt-get-key-size.html b/function.mcrypt-get-key-size.html new file mode 100644 index 0000000..bbd4cea --- /dev/null +++ b/function.mcrypt-get-key-size.html @@ -0,0 +1,222 @@ +mcrypt_get_key_size
PHP Manual
PrevNext

mcrypt_get_key_size

(PHP3 >= 3.0.8, PHP4 )

mcrypt_get_key_size -- Get the key size of the specified cipher

Description

int mcrypt_get_key_size (int cipher)

int mcrypt_get_key_size (string cipher, string module)

The first prototype is when linked against libmcrypt 2.2.x, the + second when linked against libmcrypt 2.4.x. +

Mcrypt_get_key_size() is used to get the size + of a key of the specified cipher. +

Mcrypt_get_key_size() takes one or two + arguments, the cipher and + module, and returns the size in bytes. +

See also: mcrypt_get_block_size(). +


PrevHomeNext
mcrypt_get_block_sizeUpmcrypt_create_iv
\ No newline at end of file diff --git a/function.mcrypt-list-algorithms.html b/function.mcrypt-list-algorithms.html new file mode 100644 index 0000000..d8f67a0 --- /dev/null +++ b/function.mcrypt-list-algorithms.html @@ -0,0 +1,242 @@ +mcrypt_list_algorithms
PHP Manual
PrevNext

mcrypt_list_algorithms

(PHP4 >= 4.0.2)

mcrypt_list_algorithms -- Get an array of all supported ciphers

Description

array mcrypt_list_algorithms ([string + lib_dir])

Mcrypt_list_algorithms() is used to get an + array of all supported algorithms in the +

lib_dir. + Mcrypt_list_algorithms() takes as optional + parameter a directory which specifies the directory where all + algorithms are located. If not specifies, the value of the + mcrypt.algorithms_dir php.ini directive is used. +

Example 1. Mcrypt_list_algorithms() Example


<?php
+$algorithms = mcrypt_list_algorithms ("/usr/local/lib/libmcrypt");
+
+foreach ($algorithms as $cipher) {
+	echo $cipher."/n";
+}
+?>
+      
+

The above example will produce a list with all supported + algorithms in the "/usr/local/lib/libmcrypt" directory. +


PrevHomeNext
mcrypt_ofbUpmcrypt_list_modes
\ No newline at end of file diff --git a/function.mcrypt-list-modes.html b/function.mcrypt-list-modes.html new file mode 100644 index 0000000..6314b6f --- /dev/null +++ b/function.mcrypt-list-modes.html @@ -0,0 +1,244 @@ +mcrypt_list_modes
PHP Manual
PrevNext

mcrypt_list_modes

(PHP4 >= 4.0.2)

mcrypt_list_modes -- Get an array of all supported modes

Description

array mcrypt_list_modes ([string + lib_dir])

Mcrypt_list_modes() is used to get an + array of all supported modes in the + lib_dir. +

Mcrypt_list_modes() takes as optional + parameter a directory which specifies the directory where all + modes are located. If not specifies, the value of the + mcrypt.modes_dir php.ini directive is used. +

Example 1. Mcrypt_list_modes() Example


<?php
+$modes = mcrypt_list_modes ();
+
+foreach ($modes as $mode) {
+	echo $mode."/n";
+}
+?>
+      
+

The above example will produce a list with all supported + algorithms in the default mode directory. If it is not set + with the ini directive mcrypt.modes_dir, the default directory + of mcrypt is used (which is /usr/local/lib/libmcrypt). +


PrevHomeNext
mcrypt_list_algorithmsUpmcrypt_get_iv_size
\ No newline at end of file diff --git a/function.mcrypt-module-get-algo-block-size.html b/function.mcrypt-module-get-algo-block-size.html new file mode 100644 index 0000000..c60d419 --- /dev/null +++ b/function.mcrypt-module-get-algo-block-size.html @@ -0,0 +1,179 @@ +mcrypt_module_get_algo_block_size
PHP Manual
PrevNext

mcrypt_module_get_algo_block_size

(PHP4 >= 4.0.2)

mcrypt_module_get_algo_block_size -- Returns the blocksize of the specified algorithm

Description

int mcrypt_module_get_algo_block_size (string algorithm [, string lib_dir])

This function returns the block size of the algorithm specified in + bytes. The optional lib_dir parameter + can contain the location where the mode module is on the system. +


PrevHomeNext
mcrypt_module_is_block_modeUpmcrypt_module_get_algo_key_size
\ No newline at end of file diff --git a/function.mcrypt-module-get-algo-key-size.html b/function.mcrypt-module-get-algo-key-size.html new file mode 100644 index 0000000..afeb595 --- /dev/null +++ b/function.mcrypt-module-get-algo-key-size.html @@ -0,0 +1,180 @@ +mcrypt_module_get_algo_key_size
PHP Manual
PrevNext

mcrypt_module_get_algo_key_size

(PHP4 >= 4.0.2)

mcrypt_module_get_algo_key_size -- Returns the maximum supported keysize of the opened mode

Description

int mcrypt_module_get_algo_key_size (string algorithm [, string lib_dir])

This function returns the maximum supported key size of the + algorithm specified in bytes. The optional + lib_dir parameter can contain the + location where the mode module is on the system. +


PrevHomeNext
mcrypt_module_get_algo_block_sizeUpmcrypt_module_get_algo_supported_key_sizes
\ No newline at end of file diff --git a/function.mcrypt-module-get-algo-supported-key-sizes.html b/function.mcrypt-module-get-algo-supported-key-sizes.html new file mode 100644 index 0000000..cc8c175 --- /dev/null +++ b/function.mcrypt-module-get-algo-supported-key-sizes.html @@ -0,0 +1,188 @@ +mcrypt_module_get_algo_supported_key_sizes
PHP Manual
PrevNext

mcrypt_module_get_algo_supported_key_sizes

(unknown)

mcrypt_module_get_algo_supported_key_sizes -- Returns an array with the supported keysizes of the opened algorithm

Description

array mcrypt_module_enc_get_algo_supported_key_sizes (string algorithm [, string lib_dir])

Returns an array with the key sizes supported by the specified + algorithm. If it returns an empty array then all key sizes + between 1 and mcrypt_module_get_algo_key_size() + are supported by the algorithm. The optional + lib_dir parameter can contain the + location where the mode module is on the system. +


PrevHomeNext
mcrypt_module_get_algo_key_sizeUpMhash Functions
\ No newline at end of file diff --git a/function.mcrypt-module-is-block-algorithm-mode.html b/function.mcrypt-module-is-block-algorithm-mode.html new file mode 100644 index 0000000..48688e8 --- /dev/null +++ b/function.mcrypt-module-is-block-algorithm-mode.html @@ -0,0 +1,180 @@ +mcrypt_module_is_block_algorithm_mode
PHP Manual
PrevNext

mcrypt_module_is_block_algorithm_mode

(PHP4 >= 4.0.2)

mcrypt_module_is_block_algorithm_mode -- This function returns if the the specified module is a block algorithm or not

Description

bool mcrypt_module_is_block_algorithm_mode (string mode [, string lib_dir])

This function returns TRUE if the mode is for use with block algorithms, + otherwise it returns 0. (eg. 0 for stream, and 1 for cbc, cfb, ofb). + The optional lib_dir parameter can contain + the location where the mode module is on the system. +


PrevHomeNext
mcrypt_module_self_testUpmcrypt_module_is_block_algorithm
\ No newline at end of file diff --git a/function.mcrypt-module-is-block-algorithm.html b/function.mcrypt-module-is-block-algorithm.html new file mode 100644 index 0000000..114f1e8 --- /dev/null +++ b/function.mcrypt-module-is-block-algorithm.html @@ -0,0 +1,180 @@ +mcrypt_module_is_block_algorithm
PHP Manual
PrevNext

mcrypt_module_is_block_algorithm

(PHP4 >= 4.0.2)

mcrypt_module_is_block_algorithm -- This function checks whether the specified algorithm is a block algorithm

Description

bool mcrypt_module_is_block_algorithm (string algorithm [, string lib_dir])

This function returns TRUE if the specified algorithm is a block + algorithm, or FALSE is it is a stream algorithm. + The optional lib_dir parameter can contain + the location where the algorithm module is on the system. +


PrevHomeNext
mcrypt_module_is_block_algorithm_modeUpmcrypt_module_is_block_mode
\ No newline at end of file diff --git a/function.mcrypt-module-is-block-mode.html b/function.mcrypt-module-is-block-mode.html new file mode 100644 index 0000000..47ad9f3 --- /dev/null +++ b/function.mcrypt-module-is-block-mode.html @@ -0,0 +1,180 @@ +mcrypt_module_is_block_mode
PHP Manual
PrevNext

mcrypt_module_is_block_mode

(PHP4 >= 4.0.2)

mcrypt_module_is_block_mode -- This function returns if the the specified mode outputs blocks or not

Description

bool mcrypt_module_is_block_mode (string mode [, string lib_dir])

This function returns TRUE if the mode outputs blocks of bytes or + FALSE if it outputs just bytes. (eg. 1 for cbc and ecb, and 0 for cfb + and stream). The optional lib_dir parameter + can contain the location where the mode module is on the system. +


PrevHomeNext
mcrypt_module_is_block_algorithmUpmcrypt_module_get_algo_block_size
\ No newline at end of file diff --git a/function.mcrypt-module-open.html b/function.mcrypt-module-open.html new file mode 100644 index 0000000..ab45a38 --- /dev/null +++ b/function.mcrypt-module-open.html @@ -0,0 +1,262 @@ +mcrypt_module_open
PHP Manual
PrevNext

mcrypt_module_open

(PHP4 >= 4.0.2)

mcrypt_module_open -- This function opens the module of the algorithm and the mode to be used

Description

resource mcrypt_module_open (string algorithm, string algorithm_directory, string mode, string mode_directory)

This function opens the module of the algorithm and the mode + to be used. The name of the algorithm is specified in algorithm, + eg "twofish" or is one of the MCRYPT_ciphername constants. + The library is closed by calling + mcrypt_module_close(), but there is no need + to call that function if mcrypt_generic_end() + is called. Normally it returns an encryption descriptor, or + FALSE on error. +

The algorithm_directory and + mode_directory are used to locate the + encryption modules. When you supply a directory name, it is used. + When you set one of these to the empty string (""), the value set + by the mcrypt.algorithms_dir or + mcrypt.modes_dir ini-directive is used. + When these are not set, the default directory are used that are + compiled in into libmcrypt (usally /usr/local/lib/libmcrypt). +

Example 1. Mcrypt_module_open() Example


<?php
+$td = mcrypt_module_open (MCRYPT_DES, "", MCRYPT_MODE_ECB, "/usr/lib/mcrypt-modes");
+?>
+      
+ The above example will try to open the DES cipher from the default + directory and the EBC mode from the directory /usr/lib/mcrypt-modes. +


PrevHomeNext
mcrypt_decryptUpmcrypt_generic_init
\ No newline at end of file diff --git a/function.mcrypt-module-self-test.html b/function.mcrypt-module-self-test.html new file mode 100644 index 0000000..df5da4e --- /dev/null +++ b/function.mcrypt-module-self-test.html @@ -0,0 +1,183 @@ +mcrypt_module_self_test
PHP Manual
PrevNext

mcrypt_module_self_test

(PHP4 >= 4.0.2)

mcrypt_module_self_test -- This function runs a self test on the specified module

Description

bool mcrypt_module_self_test (string algorithm [, string lib_dir])

This function runs the self test on the algorithm specified. + The optional lib_dir parameter can contain + the location of where the algorithm module is on the system. +

The function returns TRUE if the self test succeeds, or FALSE when + if fails. +


PrevHomeNext
mcrypt_enc_get_modes_nameUpmcrypt_module_is_block_algorithm_mode
\ No newline at end of file diff --git a/function.mcrypt-ofb.html b/function.mcrypt-ofb.html new file mode 100644 index 0000000..6fbafe2 --- /dev/null +++ b/function.mcrypt-ofb.html @@ -0,0 +1,289 @@ +mcrypt_ofb
PHP Manual
PrevNext

mcrypt_ofb

(PHP3 >= 3.0.8, PHP4 )

mcrypt_ofb -- Encrypt/decrypt data in OFB mode

Description

string mcrypt_ofb (int cipher, string key, string data, int mode, string iv)

string mcrypt_ofb (string cipher, string key, string data, int mode [, string + iv])

The first prototype is when linked against libmcrypt 2.2.x, the + second when linked against libmcrypt 2.4.x. +

Mcrypt_ofb() encrypts or decrypts (depending + on mode) the data + with cipher and key + in OFB cipher mode and returns the resulting string. +

Cipher is one of the MCRYPT_ciphername + constants. +

Key is the key supplied to the + algorithm. It must be kept secret. +

Data is the data which shall be + encrypted/decrypted. +

Mode is MCRYPT_ENCRYPT or MCRYPT_DECRYPT. +

IV is the initialization vector. +

See also: mcrypt_cbc(), + mcrypt_cfb(), and + mcrypt_ecb(). +


PrevHomeNext
mcrypt_ecbUpmcrypt_list_algorithms
\ No newline at end of file diff --git a/function.md5.html b/function.md5.html new file mode 100644 index 0000000..2d3582d --- /dev/null +++ b/function.md5.html @@ -0,0 +1,192 @@ +md5
PHP Manual
PrevNext

md5

(PHP3 , PHP4 )

md5 -- Calculate the md5 hash of a string

Description

string md5 (string str)

Calculates the MD5 hash of str using the + RSA Data Security, Inc. + MD5 Message-Digest Algorithm. +

See also: crc32() +


PrevHomeNext
ltrimUpMetaphone
\ No newline at end of file diff --git a/function.mdecrypt-generic.html b/function.mdecrypt-generic.html new file mode 100644 index 0000000..28cac5b --- /dev/null +++ b/function.mdecrypt-generic.html @@ -0,0 +1,230 @@ +mdecrypt_generic
PHP Manual
PrevNext

mdecrypt_generic

(PHP4 >= 4.0.2)

mdecrypt_generic -- This function decrypts data

Description

string mdecrypt_generic (resource td, string data)

This function decrypts data. Note that the length of the + returned string can in fact be longer then the unencrypted + string, due to the padding of the data. +

Example 1. Mdecrypt_generic() Example


<?php
+$iv_size = mcrypt_enc_get_iv_size ($td));
+$iv = @mcrypt_create_iv ($iv_size, MCRYPT_RAND);
+
+if (@mcrypt_generic_init ($td, $key, $iv) != -1)
+{
+    $c_t = mcrypt_generic ($td, $plain_text);
+    @mcrypt_generic_init ($td, $key, $iv);
+    $p_t = mdecrypt_generic ($td, $c_t);
+}
+if (strncmp ($p_t, $plain_text, strlen($plain_text)) == 0)
+    echo "ok";
+else
+    echo "error";
+?>
+      
+ The above example shows how to check if the data before the + encryption is the same as the data after the decryption. +


PrevHomeNext
mcrypt_genericUpmcrypt_generic_end
\ No newline at end of file diff --git a/function.metaphone.html b/function.metaphone.html new file mode 100644 index 0000000..ac74da2 --- /dev/null +++ b/function.metaphone.html @@ -0,0 +1,215 @@ +Metaphone
PHP Manual
PrevNext

Metaphone

(PHP4 >= 4.0b4)

Metaphone -- Calculate the metaphone key of a string

Description

string metaphone (string str)

Calculates the metaphone key of str. +

Similar to soundex() metaphone creates the + same key for similar sounding words. It's more accurate than + soundex() as it knows the basic rules of + English pronunciation. The metaphone generated keys are of + variable length. +

Metaphone was developed by Lawrence Philips + <lphilips@verity.com>. It is described in ["Practical + Algorithms for Programmers", Binstock & Rex, Addison Wesley, + 1995]. +

Note: + This function was added in PHP 4.0. +

+


PrevHomeNext
md5Upnl2br
\ No newline at end of file diff --git a/function.method-exists.html b/function.method-exists.html new file mode 100644 index 0000000..947eacf --- /dev/null +++ b/function.method-exists.html @@ -0,0 +1,184 @@ +method_exists
PHP Manual
PrevNext

method_exists

(PHP4 >= 4.0b2)

method_exists -- Checks if the class method exists

Description

bool method_exists (object object, string method_name)

This function returns true if the method given by + method_name has been defined for the given + object, false otherwise. +


PrevHomeNext
is_subclass_ofUpClibPDF functions
\ No newline at end of file diff --git a/function.mhash-count.html b/function.mhash-count.html new file mode 100644 index 0000000..60b367a --- /dev/null +++ b/function.mhash-count.html @@ -0,0 +1,222 @@ +mhash_count
PHP Manual
PrevNext

mhash_count

(PHP3 >= 3.0.9, PHP4 )

mhash_count -- Get the highest available hash id

Description

int mhash_count (void)

Mhash_count() returns the highest available hash + id. Hashes are numbered from 0 to this hash id. +

Example 1. Traversing all hashes


<?php
+
+$nr = mhash_count();
+
+for ($i = 0; $i <= $nr; $i++) {
+    echo sprintf ("The blocksize of %s is %d\n", 
+        mhash_get_hash_name ($i),
+        mhash_get_block_size ($i));
+}
+?>
+      
+


PrevHomeNext
mhash_get_block_sizeUpmhash
\ No newline at end of file diff --git a/function.mhash-get-block-size.html b/function.mhash-get-block-size.html new file mode 100644 index 0000000..75520a2 --- /dev/null +++ b/function.mhash-get-block-size.html @@ -0,0 +1,199 @@ +mhash_get_block_size
PHP Manual
PrevNext

mhash_get_block_size

(PHP3 >= 3.0.9, PHP4 )

mhash_get_block_size -- Get the block size of the specified hash

Description

int mhash_get_block_size (int hash)

Mhash_get_block_size() is used to get the size + of a block of the specified hash. +

Mhash_get_block_size() takes one argument, the + hash and returns the size in bytes or + false, if the hash does not exist. +


PrevHomeNext
mhash_get_hash_nameUpmhash_count
\ No newline at end of file diff --git a/function.mhash-get-hash-name.html b/function.mhash-get-hash-name.html new file mode 100644 index 0000000..0576f65 --- /dev/null +++ b/function.mhash-get-hash-name.html @@ -0,0 +1,243 @@ +mhash_get_hash_name
PHP Manual
PrevNext

mhash_get_hash_name

(PHP3 >= 3.0.9, PHP4 )

mhash_get_hash_name -- Get the name of the specified hash

Description

string mhash_get_hash_name (int hash)

Mhash_get_hash_name() is used to get the name + of the specified hash. +

mhash_get_hash_name() takes the hash id as an + argument and returns the name of the hash or false, if the hash + does not exist. +

Example 1. Mhash_get_hash_name() Example


<?php
+$hash = MHASH_MD5;
+
+print mhash_get_hash_name ($hash);
+?>
+      
+ The above example will print out: +

MD5
+     
+


PrevHomeNext
Mhash FunctionsUpmhash_get_block_size
\ No newline at end of file diff --git a/function.mhash.html b/function.mhash.html new file mode 100644 index 0000000..8519ea3 --- /dev/null +++ b/function.mhash.html @@ -0,0 +1,187 @@ +mhash
PHP Manual
PrevNext

mhash

(PHP3 >= 3.0.9, PHP4 )

mhash -- Compute hash

Description

string mhash (int hash, string data)

Mhash() applies a hash function specified by + hash to the data and + returns the resulting hash (also called digest). +


PrevHomeNext
mhash_countUpMicrosoft SQL Server functions
\ No newline at end of file diff --git a/function.microtime.html b/function.microtime.html new file mode 100644 index 0000000..997812a --- /dev/null +++ b/function.microtime.html @@ -0,0 +1,186 @@ +microtime
PHP Manual
PrevNext

microtime

(PHP3 , PHP4 )

microtime --  + Return current UNIX timestamp with microseconds

Description

string microtime(void);

Returns the string "msec sec" where sec is the current time + measured in the number of seconds since the Unix Epoch (0:00:00 + January 1, 1970 GMT), and msec is the microseconds part. This + function is only available on operating systems that support the + gettimeofday() system call. +

See also time(). +


PrevHomeNext
localtimeUpmktime
\ No newline at end of file diff --git a/function.min.html b/function.min.html new file mode 100644 index 0000000..d8458d0 --- /dev/null +++ b/function.min.html @@ -0,0 +1,195 @@ +min
PHP Manual
PrevNext

min

(PHP3 , PHP4 )

min -- Find lowest value

Description

mixed min (mixed arg1, mixed arg2, mixed argn)

Min() returns the numerically lowest of the + parameter values. +

If the first parameter is an array, min() + returns the lowest value in that array. If the first parameter + is an integer, string or double, you need at least two parameters + and min() returns the lowest of these values. + You can compare an unlimited number of values. +

If one or more of the values is a double, all the values will be + treated as doubles, and a double is returned. If none of the + values is a double, all of them will be treated as integers, and + an integer is returned. +


PrevHomeNext
maxUpmt_rand
\ No newline at end of file diff --git a/function.mkdir.html b/function.mkdir.html new file mode 100644 index 0000000..3157faf --- /dev/null +++ b/function.mkdir.html @@ -0,0 +1,212 @@ +mkdir
PHP Manual
PrevNext

mkdir

(PHP3 , PHP4 )

mkdir -- Makes directory

Description

int mkdir (string pathname, int mode)

Attempts to create the directory specified by pathname. +

Note that you probably want to specify the mode as an + octal number, which means it should have a leading zero. +


mkdir ("/path/to/my/dir", 0700);
+      

+

Returns true on success and false on failure. +

See also rmdir(). +


PrevHomeNext
linkinfoUpmove_uploaded_file
\ No newline at end of file diff --git a/function.mktime.html b/function.mktime.html new file mode 100644 index 0000000..5b7a806 --- /dev/null +++ b/function.mktime.html @@ -0,0 +1,348 @@ +mktime
PHP Manual
PrevNext

mktime

(PHP3 , PHP4 )

mktime -- Get UNIX timestamp for a date

Description

int mktime (int hour, int minute, int second, int month, int day, int year [, int + is_dst])

Warning: Note the strange order of + arguments, which differs from the order of arguments in a regular + UNIX mktime() call and which does not lend itself well to leaving + out parameters from right to left (see below). It is a common + error to mix these values up in a script. +

Returns the Unix timestamp corresponding to the arguments + given. This timestamp is a long integer containing the number of + seconds between the Unix Epoch (January 1 1970) and the time + specified. +

Arguments may be left out in order from right to left; any + arguments thus omitted will be set to the current value according + to the local date and time. +

Is_dst can be set to 1 if the time is + during daylight savings time, 0 if it is not, or -1 (the default) + if it is unknown whether the time is within daylight savings time + or not. +

Note: + Is_dst was added in 3.0.10. +

Mktime() is useful for doing date arithmetic + and validation, as it will automatically calculate the correct + value for out-of-range input. For example, each of the following + lines produces the string "Jan-01-1998". +

Example 1. Mktime() example


echo date ("M-d-Y", mktime (0,0,0,12,32,1997));
+echo date ("M-d-Y", mktime (0,0,0,13,1,1997));
+echo date ("M-d-Y", mktime (0,0,0,1,1,1998));
+echo date ("M-d-Y", mktime (0,0,0,1,1,98));
+      
+ Year may be a two or four digit value, + with values between 0-69 mapping to 2000-2069 and 70-99 to + 1970-1999 (on systems where time_t is a 32bit signed integer, as + most common today, the valid range for + year is somewhere between 1902 and 2037). +

The last day of any given month can be expressed as the "0" day + of the next month, not the -1 day. Both of the following examples + will produce the string "The last day in Feb 2000 is: 29". +

Example 2. Last day of next month


$lastday = mktime (0,0,0,3,0,2000);
+echo strftime ("Last day in Feb 2000 is: %d", $lastday);
+     
+$lastday = mktime (0,0,0,4,-31,2000);
+echo strftime ("Last day in Feb 2000 is: %d", $lastday);
+      
+

Date with year, month and day equal to zero is considered illegal + (otherwise it what be regarded as 30.11.1999, which would be strange + behaviour). +

See also date() and time(). +


PrevHomeNext
microtimeUpstrftime
\ No newline at end of file diff --git a/function.move-uploaded-file.html b/function.move-uploaded-file.html new file mode 100644 index 0000000..bfb26b7 --- /dev/null +++ b/function.move-uploaded-file.html @@ -0,0 +1,244 @@ +move_uploaded_file
PHP Manual
PrevNext

move_uploaded_file

(PHP4 CVS only)

move_uploaded_file -- Moves an uploaded file to a new location.

Description

bool move_uploaded_file (string filename, string destination)

This function is available only in versions of PHP 3 after PHP + 3.0.16, and in versions of PHP 4 after 4.0.2. +

This function checks to ensure that the file designated by + filename is a valid upload file (meaning + that it was uploaded via PHP's HTTP POST upload mechanism). If + the file is valid, it will be moved to the filename given by + destination. +

If filename is not a valid upload file, + then no action will occur, and + move_uploaded_file() will return + false. +

If filename is a valid upload file, but + cannot be moved for some reason, no action will occur, and + move_uploaded_file() will return + false. Additionally, a warning will be issued. +

This sort of check is especially important if there is any chance + that anything done with uploaded files could reveal their + contents to the user, or even to other users on the same + system. +

See also is_uploaded_file(), and the section + Handling file uploads + for a simple usage example. +


PrevHomeNext
mkdirUppclose
\ No newline at end of file diff --git a/function.msql-affected-rows.html b/function.msql-affected-rows.html new file mode 100644 index 0000000..fb0e631 --- /dev/null +++ b/function.msql-affected-rows.html @@ -0,0 +1,184 @@ +msql_affected_rows
PHP Manual
PrevNext

msql_affected_rows

(PHP3 >= 3.0.6, PHP4 )

msql_affected_rows -- Returns number of affected rows

Description

int msql_affected_rows (int query_identifier)

Returns number of affected ("touched") rows by a specific query + (i.e. the number of rows returned by a SELECT, the number of rows + modified by an update, or the number of rows removed by a + delete). +

See also: msql_query(). +


PrevHomeNext
msqlUpmsql_close
\ No newline at end of file diff --git a/function.msql-close.html b/function.msql-close.html new file mode 100644 index 0000000..a1222a5 --- /dev/null +++ b/function.msql-close.html @@ -0,0 +1,215 @@ +msql_close
PHP Manual
PrevNext

msql_close

(PHP3 , PHP4 )

msql_close -- Close mSQL connection

Description

int msql_close (int link_identifier)

Returns true on success, false on error. +

msql_close() closes the link to a mSQL + database that's associated with the specified link identifier. + If the link identifier isn't specified, the last opened link is + assumed. +

Note that this isn't usually necessary, as non-persistent open + links are automatically closed at the end of the script's + execution. +

msql_close() will not close persistent links + generated by msql_pconnect(). +

See also: msql_connect() and + msql_pconnect(). +


PrevHomeNext
msql_affected_rowsUpmsql_connect
\ No newline at end of file diff --git a/function.msql-connect.html b/function.msql-connect.html new file mode 100644 index 0000000..39e14f7 --- /dev/null +++ b/function.msql-connect.html @@ -0,0 +1,221 @@ +msql_connect
PHP Manual
PrevNext

msql_connect

(PHP3 , PHP4 )

msql_connect -- Open mSQL connection

Description

int msql_connect ([string + hostname [, string + hostname[:port] [, string + username [, string + password]]]])

Returns a positive mSQL link identifier on success, or false on + error. +

msql_connect() establishes a connection to a + mSQL server. The hostname argument is optional, and if it's + missing, localhost is assumed. +

In case a second call is made to + msql_connect() with the same arguments, no new + link will be established, but instead, the link identifier of the + already opened link will be returned. +

The link to the server will be closed as soon as the execution of + the script ends, unless it's closed earlier by explicitly calling + msql_close(). +

See also msql_pconnect(), + msql_close(). +


PrevHomeNext
msql_closeUpmsql_create_db
\ No newline at end of file diff --git a/function.msql-create-db.html b/function.msql-create-db.html new file mode 100644 index 0000000..93f1a89 --- /dev/null +++ b/function.msql-create-db.html @@ -0,0 +1,183 @@ +msql_create_db
PHP Manual
PrevNext

msql_create_db

(PHP3 , PHP4 )

msql_create_db -- Create mSQL database

Description

int msql_create_db (string database name [, int + link_identifier])

msql_create_db() attempts to create a new database on the server + associated with the specified link identifier. +

See also: msql_drop_db(). +


PrevHomeNext
msql_connectUpmsql_createdb
\ No newline at end of file diff --git a/function.msql-createdb.html b/function.msql-createdb.html new file mode 100644 index 0000000..9023cfa --- /dev/null +++ b/function.msql-createdb.html @@ -0,0 +1,179 @@ +msql_createdb
PHP Manual
PrevNext

msql_createdb

(PHP3 , PHP4 )

msql_createdb -- Create mSQL database

Description

int msql_createdb (string database name [, int + link_identifier])

Identical to msql_create_db(). +


PrevHomeNext
msql_create_dbUpmsql_data_seek
\ No newline at end of file diff --git a/function.msql-data-seek.html b/function.msql-data-seek.html new file mode 100644 index 0000000..540daff --- /dev/null +++ b/function.msql-data-seek.html @@ -0,0 +1,198 @@ +msql_data_seek
PHP Manual
PrevNext

msql_data_seek

(PHP3 , PHP4 )

msql_data_seek -- Move internal row pointer

Description

int msql_data_seek (int query_identifier, int row_number)

Returns true on success, false on failure. +

msql_data_seek() moves the internal row + pointer of the mSQL result associated with the specified query + identifier to pointer to the specifyed row number. The next call + to msql_fetch_row() would return that + row. +

+ See also: msql_fetch_row(). +


PrevHomeNext
msql_createdbUpmsql_dbname
\ No newline at end of file diff --git a/function.msql-dbname.html b/function.msql-dbname.html new file mode 100644 index 0000000..654cce6 --- /dev/null +++ b/function.msql-dbname.html @@ -0,0 +1,197 @@ +msql_dbname
PHP Manual
PrevNext

msql_dbname

(PHP3 , PHP4 )

msql_dbname -- Get current mSQL database name

Description

string msql_dbname (int query_identifier, int i)

+ msql_dbname() returns the database name stored + in position i of the result pointer + returned from the msql_listdbs() function. The + msql_numrows() function can be used to + determine how many database names are available. +


PrevHomeNext
msql_data_seekUpmsql_drop_db
\ No newline at end of file diff --git a/function.msql-drop-db.html b/function.msql-drop-db.html new file mode 100644 index 0000000..b9574b1 --- /dev/null +++ b/function.msql-drop-db.html @@ -0,0 +1,189 @@ +msql_drop_db
PHP Manual
PrevNext

msql_drop_db

(PHP3 , PHP4 )

msql_drop_db -- Drop (delete) mSQL database

Description

int msql_drop_db (string database_name, int link_identifier)

Returns true on success, false on failure. +

msql_drop_db() attempts to drop (remove) an + entire database from the server associated with the specified + link identifier. +

See also: msql_create_db(). +


PrevHomeNext
msql_dbnameUpmsql_dropdb
\ No newline at end of file diff --git a/function.msql-dropdb.html b/function.msql-dropdb.html new file mode 100644 index 0000000..0f39b86 --- /dev/null +++ b/function.msql-dropdb.html @@ -0,0 +1,158 @@ +msql_dropdb
PHP Manual
PrevNext

msql_dropdb

(PHP3 , PHP4 )

msql_dropdb -- Drop (delete) mSQL database

Description

See msql_drop_db(). +


PrevHomeNext
msql_drop_dbUpmsql_error
\ No newline at end of file diff --git a/function.msql-error.html b/function.msql-error.html new file mode 100644 index 0000000..6b045eb --- /dev/null +++ b/function.msql-error.html @@ -0,0 +1,174 @@ +msql_error
PHP Manual
PrevNext

msql_error

(PHP3 , PHP4 )

msql_error -- Returns error message of last msql call

Description

string msql_error ()

Errors coming back from the mSQL database backend no longer + issue warnings. Instead, use these functions to retrieve the + error string. +


PrevHomeNext
msql_dropdbUpmsql_fetch_array
\ No newline at end of file diff --git a/function.msql-fetch-array.html b/function.msql-fetch-array.html new file mode 100644 index 0000000..4219e15 --- /dev/null +++ b/function.msql-fetch-array.html @@ -0,0 +1,233 @@ +msql_fetch_array
PHP Manual
PrevNext

msql_fetch_array

(PHP3 , PHP4 )

msql_fetch_array -- Fetch row as array

Description

int msql_fetch_array (int query_identifier [, int + result_type])

Returns an array that corresponds to the fetched row, or false if + there are no more rows. +

msql_fetch_array() is an extended version of + msql_fetch_row(). In addition to storing the + data in the numeric indices of the result array, it also stores + the data in associative indices, using the field names as keys. +

The second optional argument result_type + in msql_fetch_array() is a constant and can + take the following values: MSQL_ASSOC, MSQL_NUM, and MYSQL_BOTH. +

Be careful if you are retrieving results from a query that may + return a record that contains only one field that has a value of + 0 (or an empty string, or NULL). +

+ An important thing to note is that using + msql_fetch_array() is NOT significantly slower + than using msql_fetch_row(), while it provides + a significant added value. +

For further details, also see + msql_fetch_row(). +


PrevHomeNext
msql_errorUpmsql_fetch_field
\ No newline at end of file diff --git a/function.msql-fetch-field.html b/function.msql-fetch-field.html new file mode 100644 index 0000000..cbba725 --- /dev/null +++ b/function.msql-fetch-field.html @@ -0,0 +1,234 @@ +msql_fetch_field
PHP Manual
PrevNext

msql_fetch_field

(PHP3 , PHP4 )

msql_fetch_field -- Get field information

Description

object msql_fetch_field (int query_identifier, int field_offset)

Returns an object containing field information +

+ msql_fetch_field() can be used in order to + obtain information about fields in a certain query result. If + the field offset isn't specified, the next field that wasn't yet + retreived by msql_fetch_field() is retreived. +

+ The properties of the object are: +

  • name - column name +

  • table - name of the table the column belongs to +

  • not_null - 1 if the column cannot be null +

  • primary_key - 1 if the column is a primary key +

  • unique - 1 if the column is a unique key +

  • type - the type of the column +

+

+ See also msql_field_seek(). +


PrevHomeNext
msql_fetch_arrayUpmsql_fetch_object
\ No newline at end of file diff --git a/function.msql-fetch-object.html b/function.msql-fetch-object.html new file mode 100644 index 0000000..3dcb428 --- /dev/null +++ b/function.msql-fetch-object.html @@ -0,0 +1,241 @@ +msql_fetch_object
PHP Manual
PrevNext

msql_fetch_object

(PHP3 , PHP4 )

msql_fetch_object -- Fetch row as object

Description

int msql_fetch_object (int query_identifier [, int + result_type])

Returns an object with properties that correspond to the fetched + row, or false if there are no more rows. +

msql_fetch_object() is similar to + msql_fetch_array(), with one difference - an + object is returned, instead of an array. Indirectly, that means + that you can only access the data by the field names, and not by + their offsets (numbers are illegal property names). +

The optional second argument result_type + in msql_fetch_array() is a constant and can + take the following values: MSQL_ASSOC, MSQL_NUM, and MSQL_BOTH. +

Speed-wise, the function is identical to + msql_fetch_array(), and almost as quick as + msql_fetch_row() (the difference is + insignificant). +

See also: + msql_fetch_array() and + msql_fetch_row(). +


PrevHomeNext
msql_fetch_fieldUpmsql_fetch_row
\ No newline at end of file diff --git a/function.msql-fetch-row.html b/function.msql-fetch-row.html new file mode 100644 index 0000000..c80570f --- /dev/null +++ b/function.msql-fetch-row.html @@ -0,0 +1,222 @@ +msql_fetch_row
PHP Manual
PrevNext

msql_fetch_row

(PHP3 , PHP4 )

msql_fetch_row -- Get row as enumerated array

Description

array msql_fetch_row (int query_identifier)

Returns an array that corresponds to the fetched row, or false if + there are no more rows. +

msql_fetch_row() fetches one row of data from + the result associated with the specified query identifier. The + row is returned as an array. Each result column is stored in an + array offset, starting at offset 0. +

+ Subsequent call to msql_fetch_row() would + return the next row in the result set, or false if there are no + more rows. +

+ See also: msql_fetch_array(), + msql_fetch_object(), + msql_data_seek(), and + msql_result(). +


PrevHomeNext
msql_fetch_objectUpmsql_fieldname
\ No newline at end of file diff --git a/function.msql-field-seek.html b/function.msql-field-seek.html new file mode 100644 index 0000000..cf92b4f --- /dev/null +++ b/function.msql-field-seek.html @@ -0,0 +1,190 @@ +msql_field_seek
PHP Manual
PrevNext

msql_field_seek

(PHP3 , PHP4 )

msql_field_seek -- Set field offset

Description

int msql_field_seek (int query_identifier, int field_offset)

Seeks to the specified field offset. If the next call to + msql_fetch_field() won't include a field + offset, this field would be returned. +

+ See also: msql_fetch_field(). +


PrevHomeNext
msql_fieldnameUpmsql_fieldtable
\ No newline at end of file diff --git a/function.msql-fieldflags.html b/function.msql-fieldflags.html new file mode 100644 index 0000000..3c2d3f6 --- /dev/null +++ b/function.msql-fieldflags.html @@ -0,0 +1,177 @@ +msql_fieldflags
PHP Manual
PrevNext

msql_fieldflags

(PHP3 , PHP4 )

msql_fieldflags -- Get field flags

Description

string msql_fieldflags (int query_identifier, int i)

msql_fieldflags() returns the field flags of + the specified field. Currently this is either, "not null", + "primary key", a combination of the two or "" (an empty string). +


PrevHomeNext
msql_fieldtypeUpmsql_fieldlen
\ No newline at end of file diff --git a/function.msql-fieldlen.html b/function.msql-fieldlen.html new file mode 100644 index 0000000..d72a202 --- /dev/null +++ b/function.msql-fieldlen.html @@ -0,0 +1,176 @@ +msql_fieldlen
PHP Manual
PrevNext

msql_fieldlen

(PHP3 , PHP4 )

msql_fieldlen -- Get field length

Description

int msql_fieldlen (int query_identifier, int i)

msql_fieldlen() returns the length of the + specified field. +


PrevHomeNext
msql_fieldflagsUpmsql_free_result
\ No newline at end of file diff --git a/function.msql-fieldname.html b/function.msql-fieldname.html new file mode 100644 index 0000000..dbc0f7b --- /dev/null +++ b/function.msql-fieldname.html @@ -0,0 +1,193 @@ +msql_fieldname
PHP Manual
PrevNext

msql_fieldname

(PHP3 , PHP4 )

msql_fieldname -- Get field name

Description

string msql_fieldname (int query_identifier, int field)

msql_fieldname() returns the name of the + specified field. query_identifier is the + query identifier, and field is the field + index. msql_fieldname($result, 2); will + return the name of the second field in the result associated with + the result identifier. +


PrevHomeNext
msql_fetch_rowUpmsql_field_seek
\ No newline at end of file diff --git a/function.msql-fieldtable.html b/function.msql-fieldtable.html new file mode 100644 index 0000000..239cd90 --- /dev/null +++ b/function.msql-fieldtable.html @@ -0,0 +1,178 @@ +msql_fieldtable
PHP Manual
PrevNext

msql_fieldtable

(PHP3 , PHP4 )

msql_fieldtable -- Get table name for field

Description

int msql_fieldtable (int query_identifier, int field)

Returns the name of the table field was + fetched from. +


PrevHomeNext
msql_field_seekUpmsql_fieldtype
\ No newline at end of file diff --git a/function.msql-fieldtype.html b/function.msql-fieldtype.html new file mode 100644 index 0000000..c019648 --- /dev/null +++ b/function.msql-fieldtype.html @@ -0,0 +1,184 @@ +msql_fieldtype
PHP Manual
PrevNext

msql_fieldtype

(PHP3 , PHP4 )

msql_fieldtype -- Get field type

Description

string msql_fieldtype (int query_identifier, int i)

msql_fieldtype() is similar to the + msql_fieldname() function. The arguments are + identical, but the field type is returned. This will be one of + "int", "string" or "real". +


PrevHomeNext
msql_fieldtableUpmsql_fieldflags
\ No newline at end of file diff --git a/function.msql-free-result.html b/function.msql-free-result.html new file mode 100644 index 0000000..ef5085e --- /dev/null +++ b/function.msql-free-result.html @@ -0,0 +1,184 @@ +msql_free_result
PHP Manual
PrevNext

msql_free_result

(PHP3 , PHP4 )

msql_free_result -- Free result memory

Description

int msql_free_result (int query_identifier)

msql_free_result() frees the memory associated + with query_identifier. When PHP completes a + request, this memory is freed automatically, so you only need to + call this function when you want to make sure you don't use too + much memory while the script is running. +


PrevHomeNext
msql_fieldlenUpmsql_freeresult
\ No newline at end of file diff --git a/function.msql-freeresult.html b/function.msql-freeresult.html new file mode 100644 index 0000000..f7b08ce --- /dev/null +++ b/function.msql-freeresult.html @@ -0,0 +1,157 @@ +msql_freeresult
PHP Manual
PrevNext

msql_freeresult

(PHP3 , PHP4 )

msql_freeresult -- Free result memory

Description

See msql_free_result()


PrevHomeNext
msql_free_resultUpmsql_list_fields
\ No newline at end of file diff --git a/function.msql-list-dbs.html b/function.msql-list-dbs.html new file mode 100644 index 0000000..5c2ea0e --- /dev/null +++ b/function.msql-list-dbs.html @@ -0,0 +1,184 @@ +msql_list_dbs
PHP Manual
PrevNext

msql_list_dbs

(PHP3 , PHP4 )

msql_list_dbs -- List mSQL databases on server

Description

int msql_list_dbs(void);

msql_list_dbs() will return a result pointer + containing the databases available from the current msql + daemon. Use the msql_dbname() function to + traverse this result pointer. +


PrevHomeNext
msql_listfieldsUpmsql_listdbs
\ No newline at end of file diff --git a/function.msql-list-fields.html b/function.msql-list-fields.html new file mode 100644 index 0000000..7ce489b --- /dev/null +++ b/function.msql-list-fields.html @@ -0,0 +1,228 @@ +msql_list_fields
PHP Manual
PrevNext

msql_list_fields

(PHP3 , PHP4 )

msql_list_fields -- List result fields

Description

int msql_list_fields (string database, string tablename)

msql_list_fields() retrieves information about + the given tablename. Arguments are the database name and the + table name. A result pointer is returned which can be used with + msql_fieldflags(), + msql_fieldlen(), + msql_fieldname(), and + msql_fieldtype(). A query identifier is a + positive integer. The function returns -1 if a + error occurs. A string describing the error will be placed in + $phperrmsg, and unless the function was called + as @msql_list_fields() then this error string + will also be printed out. +

See also msql_error(). +


PrevHomeNext
msql_freeresultUpmsql_listfields
\ No newline at end of file diff --git a/function.msql-list-tables.html b/function.msql-list-tables.html new file mode 100644 index 0000000..8588827 --- /dev/null +++ b/function.msql-list-tables.html @@ -0,0 +1,191 @@ +msql_list_tables
PHP Manual
PrevNext

msql_list_tables

(PHP3 , PHP4 )

msql_list_tables -- List tables in an mSQL database

Description

int msql_list_tables (string database)

msql_list_tables() takes a database name and + result pointer much like the msql() + function. The msql_tablename() function should + be used to extract the actual table names from the result + pointer. +


PrevHomeNext
msql_listdbsUpmsql_listtables
\ No newline at end of file diff --git a/function.msql-listdbs.html b/function.msql-listdbs.html new file mode 100644 index 0000000..e17fc23 --- /dev/null +++ b/function.msql-listdbs.html @@ -0,0 +1,158 @@ +msql_listdbs
PHP Manual
PrevNext

msql_listdbs

(PHP3 , PHP4 )

msql_listdbs -- List mSQL databases on server

Description

See msql_list_dbs(). +


PrevHomeNext
msql_list_dbsUpmsql_list_tables
\ No newline at end of file diff --git a/function.msql-listfields.html b/function.msql-listfields.html new file mode 100644 index 0000000..d5d1eac --- /dev/null +++ b/function.msql-listfields.html @@ -0,0 +1,158 @@ +msql_listfields
PHP Manual
PrevNext

msql_listfields

(PHP3 , PHP4 )

msql_listfields -- List result fields

Description

See msql_list_fields(). +


PrevHomeNext
msql_list_fieldsUpmsql_list_dbs
\ No newline at end of file diff --git a/function.msql-listtables.html b/function.msql-listtables.html new file mode 100644 index 0000000..e555b34 --- /dev/null +++ b/function.msql-listtables.html @@ -0,0 +1,158 @@ +msql_listtables
PHP Manual
PrevNext

msql_listtables

(PHP3 , PHP4 )

msql_listtables -- List tables in an mSQL database

Description

See msql_list_tables(). +


PrevHomeNext
msql_list_tablesUpmsql_num_fields
\ No newline at end of file diff --git a/function.msql-num-fields.html b/function.msql-num-fields.html new file mode 100644 index 0000000..a2f5c84 --- /dev/null +++ b/function.msql-num-fields.html @@ -0,0 +1,206 @@ +msql_num_fields
PHP Manual
PrevNext

msql_num_fields

(PHP3 , PHP4 )

msql_num_fields -- Get number of fields in result

Description

int msql_num_fields (int query_identifier)

msql_num_fields() returns the number of fields + in a result set. +

See also: msql(), + msql_query(), + msql_fetch_field(), and + msql_num_rows(). +


PrevHomeNext
msql_listtablesUpmsql_num_rows
\ No newline at end of file diff --git a/function.msql-num-rows.html b/function.msql-num-rows.html new file mode 100644 index 0000000..72f7e1a --- /dev/null +++ b/function.msql-num-rows.html @@ -0,0 +1,199 @@ +msql_num_rows
PHP Manual
PrevNext

msql_num_rows

(PHP3 , PHP4 )

msql_num_rows -- Get number of rows in result

Description

int msql_num_rows (int query_identifier)

Msql_num_rows() returns the number of rows in + a result set. +

See also: msql(), + msql_query(), and + msql_fetch_row(). +


PrevHomeNext
msql_num_fieldsUpmsql_numfields
\ No newline at end of file diff --git a/function.msql-numfields.html b/function.msql-numfields.html new file mode 100644 index 0000000..81ca885 --- /dev/null +++ b/function.msql-numfields.html @@ -0,0 +1,179 @@ +msql_numfields
PHP Manual
PrevNext

msql_numfields

(PHP3 , PHP4 )

msql_numfields -- Get number of fields in result

Description

int msql_numfields (int query_identifier)

+ Identical to msql_num_fields(). +


PrevHomeNext
msql_num_rowsUpmsql_numrows
\ No newline at end of file diff --git a/function.msql-numrows.html b/function.msql-numrows.html new file mode 100644 index 0000000..937182a --- /dev/null +++ b/function.msql-numrows.html @@ -0,0 +1,179 @@ +msql_numrows
PHP Manual
PrevNext

msql_numrows

(PHP3 , PHP4 )

msql_numrows -- Get number of rows in result

Description

int msql_numrows(void);

+ Identical to msql_num_rows(). +


PrevHomeNext
msql_numfieldsUpmsql_pconnect
\ No newline at end of file diff --git a/function.msql-pconnect.html b/function.msql-pconnect.html new file mode 100644 index 0000000..6432746 --- /dev/null +++ b/function.msql-pconnect.html @@ -0,0 +1,218 @@ +msql_pconnect
PHP Manual
PrevNext

msql_pconnect

(PHP3 , PHP4 )

msql_pconnect -- Open persistent mSQL connection

Description

int msql_pconnect ([string + hostname [, string + hostname[:port] [, string + username [, string + password]]]])

Returns a positive mSQL persistent link identifier on success, or + false on error. +

+ msql_pconnect() acts very much like + msql_connect() with two major differences. +

+ First, when connecting, the function would first try to + find a (persistent) link that's already open with the same host. + If one is found, an identifier for it will be returned instead of + opening a new connection. +

+ Second, the connection to the SQL server will not be closed when + the execution of the script ends. Instead, the link will remain + open for future use (msql_close() will not + close links established by msql_pconnect()). +

+ This type of links is therefore called 'persistent'. +


PrevHomeNext
msql_numrowsUpmsql_query
\ No newline at end of file diff --git a/function.msql-query.html b/function.msql-query.html new file mode 100644 index 0000000..b843f18 --- /dev/null +++ b/function.msql-query.html @@ -0,0 +1,213 @@ +msql_query
PHP Manual
PrevNext

msql_query

(PHP3 , PHP4 )

msql_query -- Send mSQL query

Description

int msql_query (string query, int link_identifier)

msql_query() sends a query to the currently + active database on the server that's associated with the + specified link identifier. If the link identifier isn't + specified, the last opened link is assumed. If no link is open, + the function tries to establish a link as if + msql_connect() was called, and use it. +

Returns a positive mSQL query identifier on success, or false on + error. +

See also: msql(), + msql_select_db(), and + msql_connect(). +


PrevHomeNext
msql_pconnectUpmsql_regcase
\ No newline at end of file diff --git a/function.msql-regcase.html b/function.msql-regcase.html new file mode 100644 index 0000000..d8adb08 --- /dev/null +++ b/function.msql-regcase.html @@ -0,0 +1,160 @@ +msql_regcase
PHP Manual
PrevNext

msql_regcase

(PHP3 , PHP4 )

msql_regcase --  + Make regular expression for case insensitive match +

Description

See sql_regcase(). +


PrevHomeNext
msql_queryUpmsql_result
\ No newline at end of file diff --git a/function.msql-result.html b/function.msql-result.html new file mode 100644 index 0000000..3261b55 --- /dev/null +++ b/function.msql-result.html @@ -0,0 +1,223 @@ +msql_result
PHP Manual
PrevNext

msql_result

(PHP3 , PHP4 )

msql_result -- Get result data

Description

int msql_result (int query_identifier, int i, mixed field)

Returns the contents of the cell at the row and offset in the + specified mSQL result set. +

+ msql_result() returns the contents of one cell + from a mSQL result set. The field argument can be the field's + offset, or the field's name, or the field's table dot field's + name (fieldname.tablename). If the column name has been aliased + ('select foo as bar from ...'), use the alias instead of the + column name. +

+ When working on large result sets, you should consider using one + of the functions that fetch an entire row (specified below). As + these functions return the contents of multiple cells in one + function call, they're MUCH quicker than + msql_result(). Also, note that specifying a + numeric offset for the field argument is much quicker than + specifying a fieldname or tablename.fieldname argument. +

+ Recommended high-performance alternatives: + msql_fetch_row(), + msql_fetch_array(), and + msql_fetch_object(). +


PrevHomeNext
msql_regcaseUpmsql_select_db
\ No newline at end of file diff --git a/function.msql-select-db.html b/function.msql-select-db.html new file mode 100644 index 0000000..7ada507 --- /dev/null +++ b/function.msql-select-db.html @@ -0,0 +1,224 @@ +msql_select_db
PHP Manual
PrevNext

msql_select_db

(PHP3 , PHP4 )

msql_select_db -- Select mSQL database

Description

int msql_select_db (string database_name, int link_identifier)

Returns true on success, false on error. +

+ msql_select_db() sets the current active + database on the server that's associated with the specified link + identifier. If no link identifier is specified, the last opened + link is assumed. If no link is open, the function will try to + establish a link as if msql_connect() was + called, and use it. +

+ Every subsequent call to msql_query() will be + made on the active database. +

See also: msql_connect(), + msql_pconnect(), and + msql_query(). +


PrevHomeNext
msql_resultUpmsql_selectdb
\ No newline at end of file diff --git a/function.msql-selectdb.html b/function.msql-selectdb.html new file mode 100644 index 0000000..9225613 --- /dev/null +++ b/function.msql-selectdb.html @@ -0,0 +1,158 @@ +msql_selectdb
PHP Manual
PrevNext

msql_selectdb

(PHP3 , PHP4 )

msql_selectdb -- Select mSQL database

Description

See msql_select_db(). +


PrevHomeNext
msql_select_dbUpmsql_tablename
\ No newline at end of file diff --git a/function.msql-tablename.html b/function.msql-tablename.html new file mode 100644 index 0000000..c59c2e2 --- /dev/null +++ b/function.msql-tablename.html @@ -0,0 +1,239 @@ +msql_tablename
PHP Manual
PrevNext

msql_tablename

(PHP3 , PHP4 )

msql_tablename -- Get table name of field

Description

string msql_tablename (int query_identifier, int field)

+ msql_tablename() takes a result pointer + returned by the msql_list_tables() function as + well as an integer index and returns the name of a table. The + msql_numrows() function may be used to + determine the number of tables in the result pointer. +

Example 1. msql_tablename() example


<?php 
+msql_connect ("localhost");
+$result = msql_list_tables ("wisconsin");
+$i = 0;
+while ($i < msql_numrows ($result)) {
+    $tb_names[$i] = msql_tablename ($result, $i);
+    echo $tb_names[$i] . "<BR>";
+    $i++; 
+}
+?>
+      
+


PrevHomeNext
msql_selectdbUpMySQL functions
\ No newline at end of file diff --git a/function.msql.html b/function.msql.html new file mode 100644 index 0000000..ec38fdf --- /dev/null +++ b/function.msql.html @@ -0,0 +1,197 @@ +msql
PHP Manual
PrevNext

msql

(PHP3 , PHP4 )

msql -- Send mSQL query

Description

int msql (string database, string query, int link_identifier)

+ Returns a positive mSQL query identifier to the query result, or + false on error. +

msql() selects a database and executes a query + on it. If the optional link identifier isn't specified, the + function will try to find an open link to the mSQL server and if + no such link is found it'll try to create one as if + msql_connect() was called with no arguments + (see msql_connect()). +


PrevHomeNext
mSQL functionsUpmsql_affected_rows
\ No newline at end of file diff --git a/function.mssql-affected-rows.html b/function.mssql-affected-rows.html new file mode 100644 index 0000000..5ed292c --- /dev/null +++ b/function.mssql-affected-rows.html @@ -0,0 +1,181 @@ +mssql_affected_rows
PHP Manual
PrevNext

mssql_affected_rows

mssql_affected_rows -- get number of affected rows in last query

Description

int mssql_affected_rows(int [link_identifier] + );

Returns: The number of affected rows by the last query. +

mssql_affected_rows() returns the number of + rows affected by the last INSERT, UPDATE or DELETE query on the + server associated with the specified link identifier. If the + link identifier isn't specified, the last opened link is assumed. +

This command is not effective for SELECT statements, only on + statements which modify records. To retrieve the number of rows + returned from a SELECT, use mssql_num_rows(). +


PrevHomeNext
Microsoft SQL Server functionsUpmssql_close
\ No newline at end of file diff --git a/function.mssql-close.html b/function.mssql-close.html new file mode 100644 index 0000000..4ad5940 --- /dev/null +++ b/function.mssql-close.html @@ -0,0 +1,220 @@ +mssql_close
PHP Manual
PrevNext

mssql_close

(PHP3 , PHP4 )

mssql_close -- Close MS SQL Server connection

Description

int mssql_close ([int + link_identifier])

Returns: true on success, false on error. +

+ Mssql_close() closes the link to a MS SQL + Server database that's associated with the specified link + identifier. If the link identifier isn't specified, the last + opened link is assumed. +

+ Note that this isn't usually necessary, as non-persistent open + links are automatically closed at the end of the script's + execution. +

+ Mssql_close() will not close persistent links + generated by mssql_pconnect(). +

+ See also: mssql_connect(), + mssql_pconnect(). +


PrevHomeNext
Microsoft SQL Server functionsUpmssql_connect
\ No newline at end of file diff --git a/function.mssql-connect.html b/function.mssql-connect.html new file mode 100644 index 0000000..ac2c68b --- /dev/null +++ b/function.mssql-connect.html @@ -0,0 +1,224 @@ +mssql_connect
PHP Manual
PrevNext

mssql_connect

(PHP3 , PHP4 )

mssql_connect -- Open MS SQL server connection

Description

int mssql_connect ([string + servername [, string + username [, string + password]]])

+ Returns: A positive MS SQL link identifier on success, or false + on error. +

+ Mssql_connect() establishes a connection to a + MS SQL server. The servername argument has to be a valid + servername that is defined in the 'interfaces' file. +

+ In case a second call is made to + mssql_connect() with the same arguments, no + new link will be established, but instead, the link identifier of + the already opened link will be returned. +

+ The link to the server will be closed as soon as the execution of + the script ends, unless it's closed earlier by explicitly calling + mssql_close(). +

See also mssql_pconnect(), + mssql_close(). +


PrevHomeNext
mssql_closeUpmssql_data_seek
\ No newline at end of file diff --git a/function.mssql-data-seek.html b/function.mssql-data-seek.html new file mode 100644 index 0000000..6bd4ed1 --- /dev/null +++ b/function.mssql-data-seek.html @@ -0,0 +1,196 @@ +mssql_data_seek
PHP Manual
PrevNext

mssql_data_seek

(PHP3 , PHP4 )

mssql_data_seek -- Move internal row pointer

Description

int mssql_data_seek (int result_identifier, int row_number)

+ Returns: true on success, false on failure. +

+ Mssql_data_seek() moves the internal row + pointer of the MS SQL result associated with the specified result + identifier to point to the specified row number. The next call + to mssql_fetch_row() would return that row. +

+ See also: mssql_data_seek(). +


PrevHomeNext
mssql_connectUpmssql_fetch_array
\ No newline at end of file diff --git a/function.mssql-fetch-array.html b/function.mssql-fetch-array.html new file mode 100644 index 0000000..2b8fb2c --- /dev/null +++ b/function.mssql-fetch-array.html @@ -0,0 +1,214 @@ +mssql_fetch_array
PHP Manual
PrevNext

mssql_fetch_array

(PHP3 , PHP4 )

mssql_fetch_array -- Fetch row as array

Description

int mssql_fetch_array (int result)

+ Returns: An array that corresponds to the fetched row, or false + if there are no more rows. +

Mssql_fetch_array() is an extended version of + mssql_fetch_row(). In addition to storing the + data in the numeric indices of the result array, it also stores + the data in associative indices, using the field names as keys. +

An important thing to note is that using + mssql_fetch_array() is NOT significantly + slower than using mssql_fetch_row(), while it + provides a significant added value. +

For further details, also see + mssql_fetch_row(). +


PrevHomeNext
mssql_data_seekUpmssql_fetch_field
\ No newline at end of file diff --git a/function.mssql-fetch-field.html b/function.mssql-fetch-field.html new file mode 100644 index 0000000..2669ca5 --- /dev/null +++ b/function.mssql-fetch-field.html @@ -0,0 +1,223 @@ +mssql_fetch_field
PHP Manual
PrevNext

mssql_fetch_field

(PHP3 , PHP4 )

mssql_fetch_field -- Get field information

Description

object mssql_fetch_field (int result [, int + field_offset])

Returns an object containing field information. +

Mssql_fetch_field() can be used in order to + obtain information about fields in a certain query result. If + the field offset isn't specified, the next field that wasn't yet + retrieved by mssql_fetch_field() is retrieved. +

The properties of the object are: +

  • name - column name. if the column is a result of a function, + this property is set to computed#N, where #N is a serial + number. +

  • column_source - the table from which the column was taken +

  • max_length - maximum length of the column +

  • numeric - 1 if the column is numeric +

See also mssql_field_seek(). +


PrevHomeNext
mssql_fetch_arrayUpmssql_fetch_object
\ No newline at end of file diff --git a/function.mssql-fetch-object.html b/function.mssql-fetch-object.html new file mode 100644 index 0000000..cd2600b --- /dev/null +++ b/function.mssql-fetch-object.html @@ -0,0 +1,226 @@ +mssql_fetch_object
PHP Manual
PrevNext

mssql_fetch_object

(PHP3 , PHP4 )

mssql_fetch_object -- Fetch row as object

Description

int mssql_fetch_object (int result)

+ Returns: An object with properties that correspond to the fetched + row, or false if there are no more rows. +

+ Mssql_fetch_object() is similar to + mssql_fetch_array(), with one difference - an + object is returned, instead of an array. Indirectly, that means + that you can only access the data by the field names, and not by + their offsets (numbers are illegal property names). +

Speed-wise, the function is identical to + mssql_fetch_array(), and almost as quick as + mssql_fetch_row() (the difference is + insignificant). +

+ See also: mssql_fetch-array() and + mssql_fetch-row(). +


PrevHomeNext
mssql_fetch_fieldUpmssql_fetch_row
\ No newline at end of file diff --git a/function.mssql-fetch-row.html b/function.mssql-fetch-row.html new file mode 100644 index 0000000..979cc1e --- /dev/null +++ b/function.mssql-fetch-row.html @@ -0,0 +1,225 @@ +mssql_fetch_row
PHP Manual
PrevNext

mssql_fetch_row

(PHP3 , PHP4 )

mssql_fetch_row -- Get row as enumerated array

Description

array mssql_fetch_row (int result)

+ Returns: An array that corresponds to the fetched row, or false + if there are no more rows. +

Mssql_fetch_row() fetches one row of data from + the result associated with the specified result identifier. The + row is returned as an array. Each result column is stored in an + array offset, starting at offset 0. +

Subsequent call to mssql_fetch_rows() would + return the next row in the result set, or false if there are no + more rows. +

See also: mssql_fetch_array(), + mssql_fetch_object(), + mssql_data_seek(), + mssql_fetch_lengths(), and + mssql_result(). +


PrevHomeNext
mssql_fetch_objectUpmssql_field_length
\ No newline at end of file diff --git a/function.mssql-field-length.html b/function.mssql-field-length.html new file mode 100644 index 0000000..cd9dd0d --- /dev/null +++ b/function.mssql-field-length.html @@ -0,0 +1,170 @@ +mssql_field_length
PHP Manual
PrevNext

mssql_field_length

(PHP3 >= 3.0.3, PHP4 >= 4.0b4)

mssql_field_length -- Get the length of a field

Description

int mssql_field_length (int result [, int + offset])


PrevHomeNext
mssql_fetch_rowUpmssql_field_name
\ No newline at end of file diff --git a/function.mssql-field-name.html b/function.mssql-field-name.html new file mode 100644 index 0000000..0fc0fc3 --- /dev/null +++ b/function.mssql-field-name.html @@ -0,0 +1,170 @@ +mssql_field_name
PHP Manual
PrevNext

mssql_field_name

(PHP3 >= 3.0.3, PHP4 >= 4.0b4)

mssql_field_name -- Get the name of a field

Description

int mssql_field_name (int result [, int + offset])


PrevHomeNext
mssql_field_lengthUpmssql_field_seek
\ No newline at end of file diff --git a/function.mssql-field-seek.html b/function.mssql-field-seek.html new file mode 100644 index 0000000..c96291e --- /dev/null +++ b/function.mssql-field-seek.html @@ -0,0 +1,189 @@ +mssql_field_seek
PHP Manual
PrevNext

mssql_field_seek

(PHP3 , PHP4 )

mssql_field_seek -- Set field offset

Description

int mssql_field_seek (int result, int field_offset)

Seeks to the specified field offset. If the next call to + mssql_fetch_field() won't include a field + offset, this field would be returned.

See also: mssql_fetch_field().


PrevHomeNext
mssql_field_nameUpmssql_field_type
\ No newline at end of file diff --git a/function.mssql-field-type.html b/function.mssql-field-type.html new file mode 100644 index 0000000..fdaf0ac --- /dev/null +++ b/function.mssql-field-type.html @@ -0,0 +1,170 @@ +mssql_field_type
PHP Manual
PrevNext

mssql_field_type

(PHP3 >= 3.0.3, PHP4 >= 4.0b4)

mssql_field_type -- Get the type of a field

Description

string mssql_field_type (int result [, int + offset])


PrevHomeNext
mssql_field_seekUpmssql_free_result
\ No newline at end of file diff --git a/function.mssql-free-result.html b/function.mssql-free-result.html new file mode 100644 index 0000000..f4bee1d --- /dev/null +++ b/function.mssql-free-result.html @@ -0,0 +1,183 @@ +mssql_free_result
PHP Manual
PrevNext

mssql_free_result

(PHP3 , PHP4 )

mssql_free_result -- Free result memory

Description

int mssql_free_result (int result)

mssql_free_result() only needs to be called + if you are worried about using too much memory while your script + is running. All result memory will automatically be freed when + the script ends. You may call mssql_free_result() + with the result identifier as an argument and the associated + result memory will be freed. +


PrevHomeNext
mssql_field_typeUpmssql_get_last_message
\ No newline at end of file diff --git a/function.mssql-get-last-message.html b/function.mssql-get-last-message.html new file mode 100644 index 0000000..0e47071 --- /dev/null +++ b/function.mssql-get-last-message.html @@ -0,0 +1,174 @@ +mssql_get_last_message
PHP Manual
PrevNext

mssql_get_last_message

(PHP3 , PHP4 )

mssql_get_last_message --  + Returns the last message from server (over + min_message_severity?) +

Description

string + mssql_get_last_message + (void )


PrevHomeNext
mssql_free_resultUpmssql_min_error_severity
\ No newline at end of file diff --git a/function.mssql-min-error-severity.html b/function.mssql-min-error-severity.html new file mode 100644 index 0000000..299de8e --- /dev/null +++ b/function.mssql-min-error-severity.html @@ -0,0 +1,171 @@ +mssql_min_error_severity
PHP Manual
PrevNext

mssql_min_error_severity

(PHP3 , PHP4 )

mssql_min_error_severity -- Sets the lower error severity

Description

void + mssql_min_error_severity + (int severity)


PrevHomeNext
mssql_get_last_messageUpmssql_min_message_severity
\ No newline at end of file diff --git a/function.mssql-min-message-severity.html b/function.mssql-min-message-severity.html new file mode 100644 index 0000000..96d6caa --- /dev/null +++ b/function.mssql-min-message-severity.html @@ -0,0 +1,171 @@ +mssql_min_message_severity
PHP Manual
PrevNext

mssql_min_message_severity

(PHP3 , PHP4 )

mssql_min_message_severity -- Sets the lower message severity

Description

void + mssql_min_message_severity + (int severity)


PrevHomeNext
mssql_min_error_severityUpmssql_num_fields
\ No newline at end of file diff --git a/function.mssql-num-fields.html b/function.mssql-num-fields.html new file mode 100644 index 0000000..618e983 --- /dev/null +++ b/function.mssql-num-fields.html @@ -0,0 +1,205 @@ +mssql_num_fields
PHP Manual
PrevNext

mssql_num_fields

(PHP3 , PHP4 )

mssql_num_fields -- Get number of fields in result

Description

int mssql_num_fields (int result)

+ Mssql_num_fields() returns the number of + fields in a result set. +

+ See also: mssql_db_query(), + mssql_query(), + mssql_fetch_field(), and + mssql_num_rows(). +


PrevHomeNext
mssql_min_message_severityUpmssql_num_rows
\ No newline at end of file diff --git a/function.mssql-num-rows.html b/function.mssql-num-rows.html new file mode 100644 index 0000000..20c035e --- /dev/null +++ b/function.mssql-num-rows.html @@ -0,0 +1,196 @@ +mssql_num_rows
PHP Manual
PrevNext

mssql_num_rows

(PHP3 , PHP4 )

mssql_num_rows -- Get number of rows in result

Description

int mssql_num_rows (string result)

Mssql_num_rows() returns the number of rows in + a result set. +

See also: mssql_db_query(), + mssql_query(), and + mssql_fetch_row(). +


PrevHomeNext
mssql_num_fieldsUpmssql_pconnect
\ No newline at end of file diff --git a/function.mssql-pconnect.html b/function.mssql-pconnect.html new file mode 100644 index 0000000..9bf0554 --- /dev/null +++ b/function.mssql-pconnect.html @@ -0,0 +1,217 @@ +mssql_pconnect
PHP Manual
PrevNext

mssql_pconnect

(PHP3 , PHP4 )

mssql_pconnect -- Open persistent MS SQL connection

Description

int mssql_pconnect ([string + servername [, string + username [, string + password]]])

+ Returns: A positive MS SQL persistent link identifier on success, + or false on error. +

Mssql_pconnect() acts very much like + mssql_connect() with two major differences. +

+ First, when connecting, the function would first try to find a + (persistent) link that's already open with the same host, + username and password. If one is found, an identifier for it + will be returned instead of opening a new connection. +

+ Second, the connection to the SQL server will not be closed when + the execution of the script ends. Instead, the link will remain + open for future use (mssql_close() will not + close links established by mssql_pconnect()). +

+ This type of links is therefore called 'persistent'. +


PrevHomeNext
mssql_num_rowsUpmssql_query
\ No newline at end of file diff --git a/function.mssql-query.html b/function.mssql-query.html new file mode 100644 index 0000000..8b591ba --- /dev/null +++ b/function.mssql-query.html @@ -0,0 +1,213 @@ +mssql_query
PHP Manual
PrevNext

mssql_query

(PHP3 , PHP4 )

mssql_query -- Send MS SQL query

Description

int mssql_query (string query [, int + link_identifier])

+ Returns: A positive MS SQL result identifier on success, or false + on error. +

+ Mssql_query() sends a query to the currently + active database on the server that's associated with the + specified link identifier. If the link identifier isn't + specified, the last opened link is assumed. If no link is open, + the function tries to establish a link as if + mssql_connect() was called, and use it. +

See also: mssql_db_query(), + mssql_select_db(), and + mssql_connect(). +


PrevHomeNext
mssql_pconnectUpmssql_result
\ No newline at end of file diff --git a/function.mssql-result.html b/function.mssql-result.html new file mode 100644 index 0000000..01657f3 --- /dev/null +++ b/function.mssql-result.html @@ -0,0 +1,216 @@ +mssql_result
PHP Manual
PrevNext

mssql_result

(PHP3 , PHP4 )

mssql_result -- Get result data

Description

int mssql_result (int result, int i, mixed field)

Mssql_result() returns the contents of one + cell from a MS SQL result set. The field argument can be the + field's offset, the field's name or the field's table dot + field's name (tablename.fieldname). If the column name has been + aliased ('select foo as bar from...'), it uses the alias instead of + the column name. +

When working on large result sets, you should consider using one + of the functions that fetch an entire row (specified below). As + these functions return the contents of multiple cells in one + function call, they're MUCH quicker than + mssql_result(). Also, note that specifying a + numeric offset for the field argument is much quicker than + specifying a fieldname or tablename.fieldname argument. +

Recommended high-performance alternatives: + mssql_fetch_row(), + mssql_fetch_array(), and + mssql_fetch_object(). +


PrevHomeNext
mssql_queryUpmssql_select_db
\ No newline at end of file diff --git a/function.mssql-select-db.html b/function.mssql-select-db.html new file mode 100644 index 0000000..0264ee2 --- /dev/null +++ b/function.mssql-select-db.html @@ -0,0 +1,225 @@ +mssql_select_db
PHP Manual
PrevNext

mssql_select_db

(PHP3 , PHP4 )

mssql_select_db -- Select MS SQL database

Description

int mssql_select_db (string database_name [, int + link_identifier])

Returns: true on success, false on error +

+ Mssql_select_db() sets the current active + database on the server that's associated with the specified link + identifier. If no link identifier is specified, the last opened + link is assumed. If no link is open, the function will try to + establish a link as if mssql_connect() was + called, and use it. +

Every subsequent call to mssql_query() will be + made on the active database. +

See also: + mssql_connect(), + mssql_pconnect(), and + mssql_query() +


PrevHomeNext
mssql_resultUpMiscellaneous functions
\ No newline at end of file diff --git a/function.mt-getrandmax.html b/function.mt-getrandmax.html new file mode 100644 index 0000000..ff829c7 --- /dev/null +++ b/function.mt-getrandmax.html @@ -0,0 +1,215 @@ +mt_getrandmax
PHP Manual
PrevNext

mt_getrandmax

(PHP3 >= 3.0.6, PHP4 )

mt_getrandmax -- Show largest possible random value

Description

int mt_getrandmax (void)

Returns the maximum value that can be returned by a call to + mt_rand(). +

See also mt_rand(), + mt_srand() rand(), + srand(), and + getrandmax(). +


PrevHomeNext
mt_srandUpnumber_format
\ No newline at end of file diff --git a/function.mt-rand.html b/function.mt-rand.html new file mode 100644 index 0000000..6afe8f4 --- /dev/null +++ b/function.mt-rand.html @@ -0,0 +1,305 @@ +mt_rand
PHP Manual
PrevNext

mt_rand

(PHP3 >= 3.0.6, PHP4 )

mt_rand -- Generate a better random value

Description

int mt_rand ([int + min [, int + max]])

Many random number generators of older libcs have dubious or + unknown characteristics and are slow. By default, PHP uses the + libc random number generator with the rand() + function. mt_rand() function is a drop-in + replacement for this. It uses a random number generator with + known characteristics, the Mersenne Twister, which will produce + random numbers that should be suitable for seeding some kinds + of cryptography (see the home pages for details) and is four + times faster than what the average libc provides. The Homepage + of the Mersenne Twister can be found at + http://www.math.keio.ac.jp/~matumoto/emt.html, and an + optimized version of the MT source is available from + http://www.scp.syr.edu/~marc/hawk/twister.html + . +

If called without the optional min, + max arguments mt_rand() + returns a pseudo-random value between 0 and + RAND_MAX. If you want a random number + between 5 and 15 (inclusive), for example, use mt_rand + (5, 15). +

Remember to seed the random number generator before use with + mt_srand(). +

Note: + In versions before 3.0.7 the meaning of + max was range. To + get the same results in these versions the short example should + be mt_rand (5, 11) to get a random number + between 5 and 15. +

See also mt_srand(), + mt_getrandmax(), srand(), + rand() and getrandmax(). +


PrevHomeNext
minUpmt_srand
\ No newline at end of file diff --git a/function.mt-srand.html b/function.mt-srand.html new file mode 100644 index 0000000..f425795 --- /dev/null +++ b/function.mt-srand.html @@ -0,0 +1,240 @@ +mt_srand
PHP Manual
PrevNext

mt_srand

(PHP3 >= 3.0.6, PHP4 )

mt_srand -- Seed the better random number generator

Description

void mt_srand (int seed)

Seeds the random number generator with + seed. +


// seed with microseconds since last "whole" second
+mt_srand ((double) microtime() * 1000000);
+$randval = mt_rand();
+      

+

See also mt_rand(), + mt_getrandmax(), srand(), + rand(), and + getrandmax(). +


PrevHomeNext
mt_randUpmt_getrandmax
\ No newline at end of file diff --git a/function.mysql-affected-rows.html b/function.mysql-affected-rows.html new file mode 100644 index 0000000..008a138 --- /dev/null +++ b/function.mysql-affected-rows.html @@ -0,0 +1,197 @@ +mysql_affected_rows
PHP Manual
PrevNext

mysql_affected_rows

(PHP3 , PHP4 )

mysql_affected_rows -- Get number of affected rows in previous MySQL + operation

Description

int mysql_affected_rows ([int + link_identifier])

+ mysql_affected_rows() returns the number of + rows affected by the last INSERT, UPDATE or DELETE query on the + server associated with the specified link identifier. If the + link identifier isn't specified, the last opened link is assumed. +

If the last query was a DELETE query with no WHERE clause, all + of the records will have been deleted from the table but this + function will return zero. +

This command is not effective for SELECT statements, only on + statements which modify records. To retrieve the number of rows + returned from a SELECT, use mysql_num_rows(). +


PrevHomeNext
MySQL functionsUpmysql_change_user
\ No newline at end of file diff --git a/function.mysql-change-user.html b/function.mysql-change-user.html new file mode 100644 index 0000000..e7a9cd6 --- /dev/null +++ b/function.mysql-change-user.html @@ -0,0 +1,196 @@ +mysql_change_user
PHP Manual
PrevNext

mysql_change_user

(PHP3 >= 3.0.13)

mysql_change_user --  + Change logged in user of the active connection +

Description

int mysql_change_user (string user, string password [, string + database [, int + link_identifier]])

+ mysql_change_user() changes the logged in user + of the current active connection, or the connection given by the + optional parameter link_identifier. If a database is + specified, this will default or current database after the user + has been changed. If the new user and password authorization fails, + the current connected user stays active.

Note: This function was introduced in PHP 3.0.13 and + requires MySQL 3.23.3 or higher. +


PrevHomeNext
mysql_affected_rowsUpmysql_close
\ No newline at end of file diff --git a/function.mysql-close.html b/function.mysql-close.html new file mode 100644 index 0000000..26c69e0 --- /dev/null +++ b/function.mysql-close.html @@ -0,0 +1,273 @@ +mysql_close
PHP Manual
PrevNext

mysql_close

(PHP3 , PHP4 )

mysql_close -- Close MySQL connection

Description

int mysql_close ([int + link_identifier])

Returns: true on success, false on error. +

mysql_close() closes the connection to + the MySQL server that's associated with the specified link + identifier. If link_identifier isn't + specified, the last opened link is used. +

Using mysql_close() isn't usually necessary, + as non-persistent open links are automatically closed at the end + of the script's execution. +

Note: + mysql_close() will not close persistent links + created by mysql_pconnect(). +

Example 1. MySQL close example


<?php
+    $link = mysql_connect ("kraemer", "marliesle", "secret")
+        or die ("Could not connect");
+    print ("Connected successfully");
+    mysql_close ($link);
+?>
+     

+ See also: mysql_connect(), and + mysql_pconnect(). +


PrevHomeNext
mysql_change_userUpmysql_connect
\ No newline at end of file diff --git a/function.mysql-connect.html b/function.mysql-connect.html new file mode 100644 index 0000000..9419f7d --- /dev/null +++ b/function.mysql-connect.html @@ -0,0 +1,307 @@ +mysql_connect
PHP Manual
PrevNext

mysql_connect

(PHP3 , PHP4 )

mysql_connect -- Open a connection to a MySQL Server

Description

int mysql_connect ([string + hostname + [:port] + [:/path/to/socket] [, string + username [, string + password]]])

+ Returns a positive MySQL link identifier on success, or an error + message on failure. +

mysql_connect() establishes a connection + to a MySQL server. The following defaults are assumed for + missing optional parameters: host:port = + 'localhost:3306', username = name of the + user that owns the server process and + password = empty password. +

The hostname string can also include a port + number. eg. "hostname:port" or a path to a socket + eg. ":/path/to/socket" for the localhost. +

Note: + Support for ":port" was added in PHP 3.0B4. +

Support for ":/path/to/socket" was added in + PHP 3.0.10. +

You can suppress the error message on failure by prepending '@' + to the function name. +

+

If a second call is made to mysql_connect() + with the same arguments, no new link will be established, but + instead, the link identifier of the already opened link will be + returned. +

The link to the server will be closed as soon as the execution of + the script ends, unless it's closed earlier by explicitly calling + mysql_close(). +

Example 1. MySQL connect example


<?php
+    $link = mysql_connect ("kraemer", "marliesle", "secret")
+        or die ("Could not connect");
+    print ("Connected successfully");
+    mysql_close ($link);
+?>
+     

See also + mysql_pconnect(), and + mysql_close(). +


PrevHomeNext
mysql_closeUpmysql_create_db
\ No newline at end of file diff --git a/function.mysql-create-db.html b/function.mysql-create-db.html new file mode 100644 index 0000000..dd59b23 --- /dev/null +++ b/function.mysql-create-db.html @@ -0,0 +1,239 @@ +mysql_create_db
PHP Manual
PrevNext

mysql_create_db

(PHP3 , PHP4 )

mysql_create_db -- Create a MySQL database

Description

int mysql_create_db (string database name [, int + link_identifier])

+ mysql_create_db() attempts to create a new + database on the server associated with the specified link + identifier. +

Example 1. MySQL create database example


<?php
+    $link = mysql_pconnect ("kron", "jutta", "geheim")
+        or die ("Could not connect");
+    if (mysql_create_db ("my_db")) {
+        print ("Database created successfully\n");
+    } else {
+        printf ("Error creating database: %s\n", mysql_error ());
+    }
+?>
+     

+ For downwards compatibility mysql_createdb() + can also be used. +

+ See also: mysql_drop_db(). +


PrevHomeNext
mysql_connectUpmysql_data_seek
\ No newline at end of file diff --git a/function.mysql-data-seek.html b/function.mysql-data-seek.html new file mode 100644 index 0000000..3bef9bb --- /dev/null +++ b/function.mysql-data-seek.html @@ -0,0 +1,257 @@ +mysql_data_seek
PHP Manual
PrevNext

mysql_data_seek

(PHP3 , PHP4 )

mysql_data_seek -- Move internal result pointer

Description

int mysql_data_seek (int result_identifier, int row_number)

+ Returns: true on success, false on failure. +

+ mysql_data_seek() moves the internal row + pointer of the MySQL result associated with the specified result + identifier to point to the specified row number. The next call + to mysql_fetch_row() would return that row. +

Row_number starts at 0. +

Example 1. MySQL data seek example


<?php
+    $link = mysql_pconnect ("kron", "jutta", "geheim")
+        or die ("Could not connect");
+
+    mysql_select_db ("samp_db")
+        or die ("Could not select database");
+
+    $query = "SELECT last_name, first_name FROM friends";
+    $result = mysql_query ($query)
+        or die ("Query failed");
+
+    # fetch rows in reverse order
+
+    for ($i = mysql_num_rows ($result) - 1; $i >=0; $i--) {
+        if (!mysql_data_seek ($result, $i)) {
+            printf ("Cannot seek to row %d\n", $i);
+            continue;
+        }
+
+        if(!($row = mysql_fetch_object ($result)))
+            continue;
+
+        printf ("%s %s<BR>\n", $row->last_name, $row->first_name);
+    }
+
+    mysql_free_result ($result);
+?>
+     

PrevHomeNext
mysql_create_dbUpmysql_db_name
\ No newline at end of file diff --git a/function.mysql-db-name.html b/function.mysql-db-name.html new file mode 100644 index 0000000..a936500 --- /dev/null +++ b/function.mysql-db-name.html @@ -0,0 +1,266 @@ +mysql_db_name
PHP Manual
PrevNext

mysql_db_name

(PHP3 >= 3.0.6, PHP4 )

mysql_db_name -- Get result data

Description

int mysql_db_name (int result, int row [, mixed + field])

+ mysql_db_name() takes as its first parameter + the result pointer from a call to + mysql_list_dbs(). The + row parameter is an index into the result + set. +

If an error occurs, FALSE is returned. Use + mysql_errno() and + mysql_error() to determine the nature of the + error. +

Example 1. Mysql_db_name() example


<?php 
+error_reporting(E_ALL);
+
+mysql_connect('dbhost', 'username', 'password');
+$db_list = mysql_list_dbs();
+
+$i = 0;
+$cnt = mysql_numrows($db_list);
+while ($i < $cnt) {
+    echo mysql_db_name($db_list, $i) . "\n";
+    $i++;
+}
+?>
+     

For backward compatibility, mysql_dbname() is + also accepted. This is deprecated, however. +


PrevHomeNext
mysql_data_seekUpmysql_db_query
\ No newline at end of file diff --git a/function.mysql-db-query.html b/function.mysql-db-query.html new file mode 100644 index 0000000..7bca292 --- /dev/null +++ b/function.mysql-db-query.html @@ -0,0 +1,210 @@ +mysql_db_query
PHP Manual
PrevNext

mysql_db_query

(PHP3 , PHP4 )

mysql_db_query -- Send a MySQL query

Description

int mysql_db_query (string database, string query [, int + link_identifier])

+ Returns: A positive MySQL result identifier to the query result, + or false on error. +

+ mysql_db_query() selects a database and + executes a query on it. If the optional link identifier isn't + specified, the function will try to find an open link to the + MySQL server and if no such link is found it'll try to create one + as if mysql_connect() was called with no + arguments +

+ See also mysql_connect(). +

For downwards + compatibility mysql() can also be used. +


PrevHomeNext
mysql_db_nameUpmysql_drop_db
\ No newline at end of file diff --git a/function.mysql-drop-db.html b/function.mysql-drop-db.html new file mode 100644 index 0000000..c4c64d3 --- /dev/null +++ b/function.mysql-drop-db.html @@ -0,0 +1,197 @@ +mysql_drop_db
PHP Manual
PrevNext

mysql_drop_db

(PHP3 , PHP4 )

mysql_drop_db -- Drop (delete) a MySQL database

Description

int mysql_drop_db (string database_name [, int + link_identifier])

+ Returns: true on success, false on failure. +

+ mysql_drop_db() attempts to drop (remove) an + entire database from the server associated with the specified + link identifier. +

+ See also: mysql_create_db(). For downward + compatibility mysql_dropdb() can also be used. +


PrevHomeNext
mysql_db_queryUpmysql_errno
\ No newline at end of file diff --git a/function.mysql-errno.html b/function.mysql-errno.html new file mode 100644 index 0000000..fdc49ec --- /dev/null +++ b/function.mysql-errno.html @@ -0,0 +1,241 @@ +mysql_errno
PHP Manual
PrevNext

mysql_errno

(PHP3 , PHP4 )

mysql_errno -- Returns the numerical value of the error message from previous + MySQL operation

Description

int mysql_errno ([int + link_identifier])

Returns the error number from the last mySQL function, or + 0 (zero) if no error occurred. +

Errors coming back from the mySQL database backend no longer + issue warnings. Instead, use mysql_errno() to + retrieve the error code. Note that this function only returns the + error code from the most recently executed mySQL function (not + including mysql_error() and + mysql_errno()), so if you want to use it, + make sure you check the value before calling another mySQL + function. +


<?php
+mysql_connect("marliesle");
+echo mysql_errno().": ".mysql_error()."<BR>";
+mysql_select_db("nonexistentdb");
+echo mysql_errno().": ".mysql_error()."<BR>";
+$conn = mysql_query("SELECT * FROM nonexistenttable");
+echo mysql_errno().": ".mysql_error()."<BR>";
+?>
+      

+

+ See also: mysql_error() +


PrevHomeNext
mysql_drop_dbUpmysql_error
\ No newline at end of file diff --git a/function.mysql-error.html b/function.mysql-error.html new file mode 100644 index 0000000..e3c238f --- /dev/null +++ b/function.mysql-error.html @@ -0,0 +1,240 @@ +mysql_error
PHP Manual
PrevNext

mysql_error

(PHP3 , PHP4 )

mysql_error -- Returns the text of the error message from previous + MySQL operation

Description

string mysql_error ([int + link_identifier])

Returns the error text from the last mySQL function, or + '' (the empty string) if no error occurred. +

Errors coming back from the mySQL database backend no longer + issue warnings. Instead, use mysql_error() to + retrieve the error text. Note that this function only returns the + error text from the most recently executed mySQL function (not + including mysql_error() and + mysql_errno()), so if you want to use it, make + sure you check the value before calling another mySQL function. +


<?php
+mysql_connect("marliesle");
+echo mysql_errno().": ".mysql_error()."<BR>";
+mysql_select_db("nonexistentdb");
+echo mysql_errno().": ".mysql_error()."<BR>";
+$conn = mysql_query("SELECT * FROM nonexistenttable");
+echo mysql_errno().": ".mysql_error()."<BR>";
+?>
+      

+

+ See also: mysql_errno() +


PrevHomeNext
mysql_errnoUpmysql_fetch_array
\ No newline at end of file diff --git a/function.mysql-fetch-array.html b/function.mysql-fetch-array.html new file mode 100644 index 0000000..16f339a --- /dev/null +++ b/function.mysql-fetch-array.html @@ -0,0 +1,313 @@ +mysql_fetch_array
PHP Manual
PrevNext

mysql_fetch_array

(PHP3 , PHP4 )

mysql_fetch_array --  + Fetch a result row as an associative array, a numeric array, or both. +

Description

array mysql_fetch_array (int result [, int + result_type])

+ Returns an array that corresponds to the fetched row, or false + if there are no more rows.

mysql_fetch_array() is an extended version of + mysql_fetch_row(). In addition to storing the + data in the numeric indices of the result array, it also stores + the data in associative indices, using the field names as keys. +

If two or more columns of the result have the same field names, + the last column will take precedence. To access the other column(s) + of the same name, you must the numeric index of the column or + make an alias for the column. +


select t1.f1 as foo t2.f1 as bar from t1, t2
+      

+

An important thing to note is that using + mysql_fetch_array() is NOT significantly + slower than using mysql_fetch_row(), while it + provides a significant added value. +

The optional second argument result_type + in mysql_fetch_array() is a constant and can + take the following values: MYSQL_ASSOC, MYSQL_NUM, and + MYSQL_BOTH. (This feature was added in PHP 3.0.7) +

For further details, see also + mysql_fetch_row() and mysql_fetch_assoc(). +

Example 1. Mysql_fetch_array()


<?php 
+mysql_connect ($host, $user, $password);
+$result = mysql_db_query ("database","select user_id, fullname from table");
+while ($row = mysql_fetch_array ($result)) {
+    echo "user_id: ".$row["user_id"]."<br>\n";
+    echo "user_id: ".$row[0]."<br>\n";
+    echo "fullname: ".$row["fullname"]."<br>\n";
+    echo "fullname: ".$row[1]."<br>\n";
+}
+mysql_free_result ($result);
+?>
+     

PrevHomeNext
mysql_errorUpmysql_fetch_assoc
\ No newline at end of file diff --git a/function.mysql-fetch-assoc.html b/function.mysql-fetch-assoc.html new file mode 100644 index 0000000..ac242a1 --- /dev/null +++ b/function.mysql-fetch-assoc.html @@ -0,0 +1,292 @@ +mysql_fetch_assoc
PHP Manual
PrevNext

mysql_fetch_assoc

(PHP4 CVS only)

mysql_fetch_assoc --  + Fetch a result row as an associative array +

Description

array mysql_fetch_assoc (int result)

+ Returns an associative array that corresponds to the fetched row, + or false if there are no more rows.

mysql_fetch_assoc() is eqivilant to calling + mysql_fetch_array() with MYSQL_ASSOC for the + optional second parameter. It only returns an associative array. + This is the way mysql_fetch_array() originally + worked. If you need the numeric indices as well as the + associative, use mysql_fetch_array(). +

If two or more columns of the result have the same field names, + the last column will take precedence. To access the other column(s) + of the same name, you must use mysql_fetch_array() and + have it return the numeric indices as well. +

An important thing to note is that using + mysql_fetch_assoc() is NOT significantly + slower than using mysql_fetch_row(), while it + provides a significant added value. +

For further details, see also + mysql_fetch_row() and mysql_fetch_array(). +

Example 1. Mysql_fetch_assoc()


<?php 
+mysql_connect ($host, $user, $password);
+$result = mysql_db_query ("database","select * from table");
+while ($row = mysql_fetch_assoc ($result)) {
+    echo $row["user_id"];
+    echo $row["fullname"];
+}
+mysql_free_result ($result);
+?>
+     

PrevHomeNext
mysql_fetch_arrayUpmysql_fetch_field
\ No newline at end of file diff --git a/function.mysql-fetch-field.html b/function.mysql-fetch-field.html new file mode 100644 index 0000000..88a4d2c --- /dev/null +++ b/function.mysql-fetch-field.html @@ -0,0 +1,331 @@ +mysql_fetch_field
PHP Manual
PrevNext

mysql_fetch_field

(PHP3 , PHP4 )

mysql_fetch_field --  + Get column information from a result and return as an object +

Description

object mysql_fetch_field (int result [, int + field_offset])

Returns an object containing field information. +

mysql_fetch_field() can be used in order to + obtain information about fields in a certain query result. If + the field offset isn't specified, the next field that wasn't yet + retrieved by mysql_fetch_field() is retrieved. +

The properties of the object are: +

  • name - column name +

  • table - name of the table the column belongs to +

  • max_length - maximum length of the column +

  • not_null - 1 if the column cannot be null +

  • primary_key - 1 if the column is a primary key +

  • unique_key - 1 if the column is a unique key +

  • multiple_key - 1 if the column is a non-unique key +

  • numeric - 1 if the column is numeric +

  • blob - 1 if the column is a BLOB +

  • type - the type of the column +

  • unsigned - 1 if the column is unsigned +

  • zerofill - 1 if the column is zero-filled +

+

Example 1. Mysql_fetch_field()


<?php 
+mysql_connect ($host, $user, $password)
+    or die ("Could not connect");
+$result = mysql_db_query ("database", "select * from table")
+    or die ("Query failed");
+# get column metadata
+$i = 0;
+while ($i < mysql_num_fields ($result)) {
+    echo "Information for column $i:<BR>\n";
+    $meta = mysql_fetch_field ($result);
+    if (!$meta) {
+        echo "No information available<BR>\n";
+    }
+    echo "<PRE>
+blob:         $meta->blob
+max_length:   $meta->max_length
+multiple_key: $meta->multiple_key
+name:         $meta->name
+not_null:     $meta->not_null
+numeric:      $meta->numeric
+primary_key:  $meta->primary_key
+table:        $meta->table
+type:         $meta->type
+unique_key:   $meta->unique_key
+unsigned:     $meta->unsigned
+zerofill:     $meta->zerofill
+</PRE>";
+    $i++;
+}
+mysql_free_result ($result);
+?>
+     

See also mysql_field_seek(). +


PrevHomeNext
mysql_fetch_assocUpmysql_fetch_lengths
\ No newline at end of file diff --git a/function.mysql-fetch-lengths.html b/function.mysql-fetch-lengths.html new file mode 100644 index 0000000..dba5174 --- /dev/null +++ b/function.mysql-fetch-lengths.html @@ -0,0 +1,222 @@ +mysql_fetch_lengths
PHP Manual
PrevNext

mysql_fetch_lengths

(PHP3 , PHP4 )

mysql_fetch_lengths --  + Get the length of each output in a result +

Description

array mysql_fetch_lengths (int result)

+ Returns: An array that corresponds to the lengths of each field + in the last row fetched by mysql_fetch_row(), + or false on error. +

mysql_fetch_lengths() stores the lengths of + each result column in the last row returned by + mysql_fetch_row(), + mysql_fetch_array(), and + mysql_fetch_object() in an array, starting at + offset 0. +

+ See also: mysql_fetch_row(). +


PrevHomeNext
mysql_fetch_fieldUpmysql_fetch_object
\ No newline at end of file diff --git a/function.mysql-fetch-object.html b/function.mysql-fetch-object.html new file mode 100644 index 0000000..578c8d9 --- /dev/null +++ b/function.mysql-fetch-object.html @@ -0,0 +1,283 @@ +mysql_fetch_object
PHP Manual
PrevNext

mysql_fetch_object

(PHP3 , PHP4 )

mysql_fetch_object -- Fetch a result row as an object

Description

object mysql_fetch_object (int result [, int + result_type])

+ Returns an object with properties that correspond to the fetched + row, or false if there are no more rows. +

+ mysql_fetch_object() is similar to + mysql_fetch_array(), with one difference - an + object is returned, instead of an array. Indirectly, that means + that you can only access the data by the field names, and not by + their offsets (numbers are illegal property names). +

The optional argument result_type is a + constant and can take the following values: MYSQL_ASSOC, + MYSQL_NUM, and MYSQL_BOTH. +

Speed-wise, the function is identical to + mysql_fetch_array(), and almost as quick as + mysql_fetch_row() (the difference is + insignificant). +

Example 1. mysql_fetch_object() example


<?php 
+mysql_connect ($host, $user, $password);
+$result = mysql_db_query ("database", "select * from table");
+while ($row = mysql_fetch_object ($result)) {
+    echo $row->user_id;
+    echo $row->fullname;
+}
+mysql_free_result ($result);
+?>
+      
+

+ See also: mysql_fetch_array() and + mysql_fetch_row(). +


PrevHomeNext
mysql_fetch_lengthsUpmysql_fetch_row
\ No newline at end of file diff --git a/function.mysql-fetch-row.html b/function.mysql-fetch-row.html new file mode 100644 index 0000000..b0d0723 --- /dev/null +++ b/function.mysql-fetch-row.html @@ -0,0 +1,228 @@ +mysql_fetch_row
PHP Manual
PrevNext

mysql_fetch_row

(PHP3 , PHP4 )

mysql_fetch_row -- Get a result row as an enumerated array

Description

array mysql_fetch_row (int result)

+ Returns: An array that corresponds to the fetched row, or false + if there are no more rows. +

mysql_fetch_row() fetches one row of data from + the result associated with the specified result identifier. The + row is returned as an array. Each result column is stored in an + array offset, starting at offset 0. +

Subsequent call to mysql_fetch_row() would + return the next row in the result set, or false if there are no + more rows. +

See also: mysql_fetch_array(), + mysql_fetch_object(), + mysql_data_seek(), + mysql_fetch_lengths(), and + mysql_result(). +


PrevHomeNext
mysql_fetch_objectUpmysql_field_flags
\ No newline at end of file diff --git a/function.mysql-field-flags.html b/function.mysql-field-flags.html new file mode 100644 index 0000000..59d8603 --- /dev/null +++ b/function.mysql-field-flags.html @@ -0,0 +1,201 @@ +mysql_field_flags
PHP Manual
PrevNext

mysql_field_flags

(PHP3 , PHP4 )

mysql_field_flags --  + Get the flags associated with the specified field in a result +

Description

string mysql_field_flags (int result, int field_offset)

+ mysql_field_flags() returns the field flags of + the specified field. The flags are reported as a single word + per flag separated by a single space, so that you can split the + returned value using explode(). +

The following flags are reported, if your version of MySQL + is current enough to support them: "not_null", "primary_key", + "unique_key", "multiple_key", "blob", "unsigned", "zerofill", + "binary", "enum", "auto_increment", "timestamp". +

+ For downward compatibility mysql_fieldflags() + can also be used. +


PrevHomeNext
mysql_fetch_rowUpmysql_field_name
\ No newline at end of file diff --git a/function.mysql-field-len.html b/function.mysql-field-len.html new file mode 100644 index 0000000..293a9c2 --- /dev/null +++ b/function.mysql-field-len.html @@ -0,0 +1,185 @@ +mysql_field_len
PHP Manual
PrevNext

mysql_field_len

(PHP3 , PHP4 )

mysql_field_len --  + Returns the length of the specified field +

Description

int mysql_field_len (int result, int field_offset)

mysql_field_len() returns the length of the + specified field. +

For downward compatibility mysql_fieldlen() + can also be used. +


PrevHomeNext
mysql_field_nameUpmysql_field_seek
\ No newline at end of file diff --git a/function.mysql-field-name.html b/function.mysql-field-name.html new file mode 100644 index 0000000..fe59863 --- /dev/null +++ b/function.mysql-field-name.html @@ -0,0 +1,294 @@ +mysql_field_name
PHP Manual
PrevNext

mysql_field_name

(PHP3 , PHP4 )

mysql_field_name --  + Get the name of the specified field in a result +

Description

string mysql_field_name (int result, int field_index)

mysql_field_name() returns the name of the + specified field index. result must be a + valid result identifier and field_index is + the numerical offset of the field. +

Note: + field_index starts at 0. +

e.g. The index of the third field would actually be 2, the index + of the fourth field would be 3 and so on. +

Example 1. mysql_field_name() example


// The users table consists of three fields: 
+//   user_id
+//   username
+//   password.
+
+$res = mysql_db_query("users", "select * from users", $link);
+
+echo mysql_field_name($res, 0) . "\n";
+echo mysql_field_name($res, 2);
+      
+

The above example would produce the following output: +


user_id
+password
+      

+

For downwards compatibility mysql_fieldname() + can also be used. +


PrevHomeNext
mysql_field_flagsUpmysql_field_len
\ No newline at end of file diff --git a/function.mysql-field-seek.html b/function.mysql-field-seek.html new file mode 100644 index 0000000..d596740 --- /dev/null +++ b/function.mysql-field-seek.html @@ -0,0 +1,195 @@ +mysql_field_seek
PHP Manual
PrevNext

mysql_field_seek

(PHP3 , PHP4 )

mysql_field_seek --  + Set result pointer to a specified field offset +

Description

int mysql_field_seek (int result, int field_offset)

Seeks to the specified field offset. If the next call to + mysql_fetch_field() doesn't include a field + offset, the field offset specified in + mysql_field_seek() will be returned. +

See also: mysql_fetch_field(). +


PrevHomeNext
mysql_field_lenUpmysql_field_table
\ No newline at end of file diff --git a/function.mysql-field-table.html b/function.mysql-field-table.html new file mode 100644 index 0000000..be9d729 --- /dev/null +++ b/function.mysql-field-table.html @@ -0,0 +1,183 @@ +mysql_field_table
PHP Manual
PrevNext

mysql_field_table

(PHP3 , PHP4 )

mysql_field_table --  + Get name of the table the specified field is in +

Description

string mysql_field_table (int result, int field_offset)

+ Returns the name of the table that the specifed field is + in. +

For downward compatibility mysql_fieldtable() + can also be used. +


PrevHomeNext
mysql_field_seekUpmysql_field_type
\ No newline at end of file diff --git a/function.mysql-field-type.html b/function.mysql-field-type.html new file mode 100644 index 0000000..c803868 --- /dev/null +++ b/function.mysql-field-type.html @@ -0,0 +1,256 @@ +mysql_field_type
PHP Manual
PrevNext

mysql_field_type

(PHP3 , PHP4 )

mysql_field_type --  + Get the type of the specified field in a result +

Description

string mysql_field_type (int result, int field_offset)

mysql_field_type() is similar to the + mysql_field_name() function. The arguments are + identical, but the field type is returned instead. The field type + will be one of "int", "real", "string", "blob", and others as + detailed in the MySQL + documentation. +

Example 1. mysql field types


<?php 
+
+mysql_connect ("localhost:3306");
+mysql_select_db ("wisconsin");
+$result = mysql_query ("SELECT * FROM onek");
+$fields = mysql_num_fields ($result);
+$rows   = mysql_num_rows ($result);
+$i = 0;
+$table = mysql_field_table ($result, $i);
+echo "Your '".$table."' table has ".$fields." fields and ".$rows." records <BR>";
+echo "The table has the following fields <BR>"; 
+while ($i < $fields) {
+    $type  = mysql_field_type  ($result, $i);
+    $name  = mysql_field_name  ($result, $i);
+    $len   = mysql_field_len   ($result, $i);
+    $flags = mysql_field_flags ($result, $i);
+    echo $type." ".$name." ".$len." ".$flags."<BR>";
+    $i++;
+}
+mysql_close();
+
+?>
+      
+

+ For downward compatibility mysql_fieldtype() + can also be used. +


PrevHomeNext
mysql_field_tableUpmysql_free_result
\ No newline at end of file diff --git a/function.mysql-free-result.html b/function.mysql-free-result.html new file mode 100644 index 0000000..193e7a5 --- /dev/null +++ b/function.mysql-free-result.html @@ -0,0 +1,197 @@ +mysql_free_result
PHP Manual
PrevNext

mysql_free_result

(PHP3 , PHP4 )

mysql_free_result -- Free result memory

Description

int mysql_free_result (int result)

mysql_free_result() will free all memory + associated with the result identifier result. +

mysql_free_result() only needs to be called if + you are concerned about how much memory is being used for queries + that return large result sets. All associated result memory is + automatically freed at the end of the script's execution. +

For downward compatibility mysql_freeresult() + can also be used. +


PrevHomeNext
mysql_field_typeUpmysql_insert_id
\ No newline at end of file diff --git a/function.mysql-insert-id.html b/function.mysql-insert-id.html new file mode 100644 index 0000000..148869f --- /dev/null +++ b/function.mysql-insert-id.html @@ -0,0 +1,266 @@ +mysql_insert_id
PHP Manual
PrevNext

mysql_insert_id

(PHP3 , PHP4 )

mysql_insert_id --  + Get the id generated from the previous INSERT operation +

Description

int mysql_insert_id ([int + link_identifier])

mysql_insert_id() returns the ID generated for + an AUTO_INCREMENT column by the previous INSERT query using the + given link_identifier. If + link_identifier isn't specified, the last + opened link is assumed. +

mysql_insert_id() returns 0 if the previous + query does not generate an AUTO_INCREMENT value. If you need to + save the value for later, be sure to call mysql_insert_id() + immediately after the query that generates the value. +

Note: + The value of the MySQL SQL function + LAST_INSERT_ID() always contains the most + recently generated AUTO_INCREMENT value, and is not reset + between queries. +

Warning

mysql_insert_id() converts the return type of + the native MySQL C API function + mysql_insert_id() to a type of + long. If your AUTO_INCREMENT column has + a column type of BIGINT, the value returned by + mysql_insert_id() will be incorrect. + Instead, use the internal MySQL SQL function + LAST_INSERT_ID(). +


PrevHomeNext
mysql_free_resultUpmysql_list_dbs
\ No newline at end of file diff --git a/function.mysql-list-dbs.html b/function.mysql-list-dbs.html new file mode 100644 index 0000000..d5467f6 --- /dev/null +++ b/function.mysql-list-dbs.html @@ -0,0 +1,288 @@ +mysql_list_dbs
PHP Manual
PrevNext

mysql_list_dbs

(PHP3 , PHP4 )

mysql_list_dbs --  + List databases available on a MySQL server +

Description

int mysql_list_dbs ([int + link_identifier])

mysql_list_dbs() will return a result pointer + containing the databases available from the current mysql + daemon. Use the mysql_tablename() function to + traverse this result pointer. +

Example 1. mysql_list_dbs() example


$link = mysql_connect('localhost', 'myname', 'secret');
+$db_list = mysql_list_dbs($link);
+
+while ($row = mysql_fetch_object($db_list)) {
+  echo $row->Database . "\n";
+}
+      
+

The above example would produce the following output: +


database1
+database2
+database3
+...
+      

+

Note: + The above code would just as easily work with + mysql_fetch_row() or other similar functions. +

For downward compatibility mysql_listdbs() can + also be used. +


PrevHomeNext
mysql_insert_idUpmysql_list_fields
\ No newline at end of file diff --git a/function.mysql-list-fields.html b/function.mysql-list-fields.html new file mode 100644 index 0000000..8899963 --- /dev/null +++ b/function.mysql-list-fields.html @@ -0,0 +1,303 @@ +mysql_list_fields
PHP Manual
PrevNext

mysql_list_fields

(PHP3 , PHP4 )

mysql_list_fields -- List MySQL result fields

Description

int mysql_list_fields (string database_name, string table_name [, int + link_identifier])

mysql_list_fields() retrieves information + about the given tablename. Arguments are the database name and + the table name. A result pointer is returned which can be used + with mysql_field_flags(), + mysql_field_len(), + mysql_field_name(), and + mysql_field_type(). +

A result identifier is a positive integer. The function returns + -1 if a error occurs. A string describing the error will be + placed in $phperrmsg, and unless the function + was called as @mysql() then this error string + will also be printed out. +

Example 1. mysql_list_fields() example


$link = mysql_connect('localhost', 'myname', 'secret');
+
+$fields = mysql_list_fields("database1", "table1", $link);
+$columns = mysql_num_fields($fields);
+
+for ($i = 0; $i < $columns; $i++) {
+  echo mysql_field_name($fields, $i) . "\n";;
+}
+      
+

The above example would produce the following output: +


field1
+field2
+field3
+...
+      

+

For downward compatibility mysql_listfields() + can also be used. +


PrevHomeNext
mysql_list_dbsUpmysql_list_tables
\ No newline at end of file diff --git a/function.mysql-list-tables.html b/function.mysql-list-tables.html new file mode 100644 index 0000000..f79ff6e --- /dev/null +++ b/function.mysql-list-tables.html @@ -0,0 +1,200 @@ +mysql_list_tables
PHP Manual
PrevNext

mysql_list_tables

(PHP3 , PHP4 )

mysql_list_tables -- List tables in a MySQL database

Description

int mysql_list_tables (string database [, int + link_identifier])

+ mysql_list_tables() takes a database name and + returns a result pointer much like the + mysql_db_query() function. The + mysql_tablename() function should be used to + extract the actual table names from the result pointer. +

For downward compatibility mysql_listtables() + can also be used. +


PrevHomeNext
mysql_list_fieldsUpmysql_num_fields
\ No newline at end of file diff --git a/function.mysql-num-fields.html b/function.mysql-num-fields.html new file mode 100644 index 0000000..7d8d445 --- /dev/null +++ b/function.mysql-num-fields.html @@ -0,0 +1,215 @@ +mysql_num_fields
PHP Manual
PrevNext

mysql_num_fields

(PHP3 , PHP4 )

mysql_num_fields -- Get number of fields in result

Description

int mysql_num_fields (int result)

+ mysql_num_fields() returns the number of + fields in a result set. +

+ See also: + mysql_db_query(), + mysql_query(), + mysql_fetch_field(), + mysql_num_rows().

For downward compatibility mysql_numfields() + can also be used. +


PrevHomeNext
mysql_list_tablesUpmysql_num_rows
\ No newline at end of file diff --git a/function.mysql-num-rows.html b/function.mysql-num-rows.html new file mode 100644 index 0000000..a08cbb7 --- /dev/null +++ b/function.mysql-num-rows.html @@ -0,0 +1,215 @@ +mysql_num_rows
PHP Manual
PrevNext

mysql_num_rows

(PHP3 , PHP4 )

mysql_num_rows -- Get number of rows in result

Description

int mysql_num_rows (int result)

mysql_num_rows() returns the number of rows in + a result set. This command is only valid for SELECT statements. + To retrieve the number of rows returned from a INSERT, UPDATE or + DELETE, use mysql_affected_rows(). +

See also: + mysql_db_query(), + mysql_query() and, + mysql_fetch_row(). +

For downward compatibility mysql_numrows() can + also be used. +


PrevHomeNext
mysql_num_fieldsUpmysql_pconnect
\ No newline at end of file diff --git a/function.mysql-pconnect.html b/function.mysql-pconnect.html new file mode 100644 index 0000000..ecf34dd --- /dev/null +++ b/function.mysql-pconnect.html @@ -0,0 +1,269 @@ +mysql_pconnect
PHP Manual
PrevNext

mysql_pconnect

(PHP3 , PHP4 )

mysql_pconnect --  + Open a persistent connection to a MySQL Server +

Description

int mysql_pconnect ([string + hostname + [:port] + [:/path/to/socket] [, string + username [, string + password]]])

+ Returns: A positive MySQL persistent link identifier on success, + or false on error. +

mysql_pconnect() establishes a connection + to a MySQL server. The following defaults are assumed for + missing optional parameters: host:port = + 'localhost:3306', username = name of the + user that owns the server process and + password = empty password. +

The hostname string can also include a port + number. eg. "hostname:port" or a path to a socket + eg. ":/path/to/socket" for the localhost. +

Note: + Support for ":port" wass added in 3.0B4. +

Support for the ":/path/to/socket" was added in + 3.0.10. +

+

mysql_pconnect() acts very much like + mysql_connect() with two major differences. +

+ First, when connecting, the function would first try to find a + (persistent) link that's already open with the same host, + username and password. If one is found, an identifier for it + will be returned instead of opening a new connection. +

+ Second, the connection to the SQL server will not be closed when + the execution of the script ends. Instead, the link will remain + open for future use (mysql_close() will not + close links established by mysql_pconnect()). +

+ This type of links is therefore called 'persistent'. +


PrevHomeNext
mysql_num_rowsUpmysql_query
\ No newline at end of file diff --git a/function.mysql-query.html b/function.mysql-query.html new file mode 100644 index 0000000..20c6c7a --- /dev/null +++ b/function.mysql-query.html @@ -0,0 +1,417 @@ +mysql_query
PHP Manual
PrevNext

mysql_query

(PHP3 , PHP4 )

mysql_query -- Send a MySQL query

Description

int mysql_query (string query [, int + link_identifier])

+ mysql_query() sends a query to the currently + active database on the server that's associated with the + specified link identifier. If + link_identifier isn't specified, the last + opened link is assumed. If no link is open, the function tries + to establish a link as if mysql_connect() was + called with no arguments, and use it. +

Note: + The query string should not end with a semicolon. +

mysql_query() returns TRUE (non-zero) or FALSE + to indicate whether or not the query succeeded. A return value + of TRUE means that the query was legal and could be executed by + the server. It does not indicate anything about the number of + rows affected or returned. It is perfectly possible for a query + to succeed but affect no rows or return no rows. +

The following query is syntactically invalid, so + mysql_query() fails and returns FALSE: +

Example 1. mysql_query()


<?php
+$result = mysql_query ("SELECT * WHERE 1=1")
+    or die ("Invalid query");
+?>
+      
+

The following query is semantically invalid if + my_col is not a column in the table + my_tbl, so mysql_query() + fails and returns FALSE: +

Example 2. mysql_query()


<?php
+$result = mysql_query ("SELECT my_col FROM my_tbl")
+    or die ("Invalid query");
+?>
+      
+

mysql_query() will also fail and return FALSE + if you don't have permission to access the table(s) referenced by + the query. +

Assuming the query succeeds, you can call + mysql_num_rows() to find out how many rows + were returned for a SELECT statment or + mysql_affected_rows() to find out how many + rows were affected by a DELETE, INSERT, REPLACE, or UPDATE + statement. +

For SELECT statements, mysql_query() returns a + new result identifier that you can pass to + mysql_result(). When you are done with the + result set, you can free the resources associated with it by + calling mysql_free_result(). Although, the + memory will automatically be freed at the end of the script's + execution. +

See also: mysql_affected_rows(), + mysql_db_query(), + mysql_free_result(), + mysql_result(), + mysql_select_db(), and + mysql_connect(). +


PrevHomeNext
mysql_pconnectUpmysql_result
\ No newline at end of file diff --git a/function.mysql-result.html b/function.mysql-result.html new file mode 100644 index 0000000..4af52a4 --- /dev/null +++ b/function.mysql-result.html @@ -0,0 +1,224 @@ +mysql_result
PHP Manual
PrevNext

mysql_result

(PHP3 , PHP4 )

mysql_result -- Get result data

Description

mixed mysql_result (int result, int row [, mixed + field])

mysql_result() returns the contents of one + cell from a MySQL result set. The field argument can be the + field's offset, or the field's name, or the field's table dot + field's name (fieldname.tablename). If the column name has been + aliased ('select foo as bar from...'), use the alias instead of + the column name. +

When working on large result sets, you should consider using one + of the functions that fetch an entire row (specified below). As + these functions return the contents of multiple cells in one + function call, they're MUCH quicker than + mysql_result(). Also, note that specifying a + numeric offset for the field argument is much quicker than + specifying a fieldname or tablename.fieldname argument. +

Calls to mysql_result() should not be mixed + with calls to other functions that deal with the result set. +

Recommended high-performance alternatives: + mysql_fetch_row(), + mysql_fetch_array(), and + mysql_fetch_object(). +


PrevHomeNext
mysql_queryUpmysql_select_db
\ No newline at end of file diff --git a/function.mysql-select-db.html b/function.mysql-select-db.html new file mode 100644 index 0000000..5c19cf8 --- /dev/null +++ b/function.mysql-select-db.html @@ -0,0 +1,233 @@ +mysql_select_db
PHP Manual
PrevNext

mysql_select_db

(PHP3 , PHP4 )

mysql_select_db -- Select a MySQL database

Description

int mysql_select_db (string database_name [, int + link_identifier])

+ Returns: true on success, false on error. +

+ mysql_select_db() sets the current active + database on the server that's associated with the specified link + identifier. If no link identifier is specified, the last opened + link is assumed. If no link is open, the function will try to + establish a link as if mysql_connect() was + called, and use it. +

Every subsequent call to mysql_query() will be + made on the active database. +

See also: + mysql_connect(), + mysql_pconnect(), and + mysql_query(). +

For downward compatibility mysql_selectdb() + can also be used. +


PrevHomeNext
mysql_resultUpmysql_tablename
\ No newline at end of file diff --git a/function.mysql-tablename.html b/function.mysql-tablename.html new file mode 100644 index 0000000..ebd2137 --- /dev/null +++ b/function.mysql-tablename.html @@ -0,0 +1,239 @@ +mysql_tablename
PHP Manual
PrevNext

mysql_tablename

(PHP3 , PHP4 )

mysql_tablename -- Get table name of field

Description

string mysql_tablename (int result, int i)

+ mysql_tablename() takes a result pointer + returned by the mysql_list_tables() function + as well as an integer index and returns the name of a table. The + mysql_num_rows() function may be used to + determine the number of tables in the result pointer. +

Example 1. Mysql_tablename() Example


<?php 
+mysql_connect ("localhost:3306");
+$result = mysql_list_tables ("wisconsin");
+$i = 0;
+while ($i < mysql_num_rows ($result)) {
+    $tb_names[$i] = mysql_tablename ($result, $i);
+    echo $tb_names[$i] . "<BR>";
+    $i++;
+}
+?>
+      
+


PrevHomeNext
mysql_select_dbUpNetwork Functions
\ No newline at end of file diff --git a/function.natcasesort.html b/function.natcasesort.html new file mode 100644 index 0000000..fde36ef --- /dev/null +++ b/function.natcasesort.html @@ -0,0 +1,235 @@ +natcasesort
PHP Manual
PrevNext

natcasesort

(PHP4 >= 4.0RC2)

natcasesort --  + Sort an array using a case insensitive "natural order" algorithm +

Description

void natcasesort (array array)

This function implements a sort algorithm that orders + alphanumeric strings in the way a human being would. This is + described as a "natural ordering". +

natcasesort() is a case insensitive version of + natsort(). See natsort() + for an example of the difference between this algorithm and the + regular computer string sorting algorithms. +

For more infomation see: Martin Pool's Natural Order String Comparison + page. +

See also sort(), + natsort(), + strnatcmp() and + strnatcasecmp(). +


PrevHomeNext
natsortUpnext
\ No newline at end of file diff --git a/function.natsort.html b/function.natsort.html new file mode 100644 index 0000000..2417880 --- /dev/null +++ b/function.natsort.html @@ -0,0 +1,306 @@ +natsort
PHP Manual
PrevNext

natsort

(PHP4 >= 4.0RC2)

natsort --  + Sort an array using a "natural order" algorithm +

Description

void natsort (array array)

This function implements a sort algorithm that orders + alphanumeric strings in the way a human being would. This is + described as a "natural ordering". An example of the difference + between this algorithm and the regular computer string sorting + algorithms (used in sort()) can be seen below: +

Example 1. natsort() example


$array1 = $array2 = array ("img12.png","img10.png","img2.png","img1.png");          
+
+sort($array1);
+echo "Standard sorting\n";
+print_r($array1);
+
+natsort($array2);
+echo "\nNatural order sorting\n";
+print_r($array2);
+      
+

The code above will generate the following output: +


Standard sorting
+Array
+(
+    [0] => img1.png
+    [1] => img10.png
+    [2] => img12.png
+    [3] => img2.png
+)
+
+Natural order sorting
+Array
+(
+    [3] => img1.png
+    [2] => img2.png
+    [1] => img10.png
+    [0] => img12.png
+)
+      

+ For more infomation see: Martin Pool's Natural Order String Comparison + page. +

See also natcasesort(), + strnatcmp() and + strnatcasecmp(). +


PrevHomeNext
listUpnatcasesort
\ No newline at end of file diff --git a/function.next.html b/function.next.html new file mode 100644 index 0000000..57dca42 --- /dev/null +++ b/function.next.html @@ -0,0 +1,261 @@ +next
PHP Manual
PrevNext

next

(PHP3 , PHP4 )

next --  + Advance the internal array pointer of an array +

Description

mixed next (array array)

Returns the array element in the next place that's pointed by the + internal array pointer, or false if there are no more elements. +

Next() behaves like + current(), with one difference. It advances + the internal array pointer one place forward before returning the + element. That means it returns the next array element and + advances the internal array pointer by one. If advancing the + internal array pointer results in going beyond the end of the + element list, next() returns false. +

Warning

If the array contains empty elements, or elements that have a key + value of 0 then this function will return false for these elements + as well. To properly traverse an array which may contain empty + elements or elements with key values of 0 see the + each() function. +

+

See also: + current(), end(), + prev(), and reset(). +


PrevHomeNext
natcasesortUppos
\ No newline at end of file diff --git a/function.nl2br.html b/function.nl2br.html new file mode 100644 index 0000000..6fb2c03 --- /dev/null +++ b/function.nl2br.html @@ -0,0 +1,201 @@ +nl2br
PHP Manual
PrevNext

nl2br

(PHP3 , PHP4 )

nl2br -- Converts newlines to HTML line breaks

Description

string nl2br (string string)

Returns string with '<BR>' inserted + before all newlines. +

See also htmlspecialchars(), + htmlentities() and + wordwrap(). +


PrevHomeNext
MetaphoneUpOrd
\ No newline at end of file diff --git a/function.number-format.html b/function.number-format.html new file mode 100644 index 0000000..84ef7a7 --- /dev/null +++ b/function.number-format.html @@ -0,0 +1,235 @@ +number_format
PHP Manual
PrevNext

number_format

(PHP3 , PHP4 )

number_format -- Format a number with grouped thousands

Description

string number_format (float number, int decimals, string dec_point, string thousands_sep)

Number_format() returns a formatted version of + number. This function accepts either one, + two or four parameters (not three): +

If only one parameter is given, + Number will be formatted without decimals, + but with a comma (",") between every group of thousands. +

If two parameters are given, number will + be formatted with decimals decimals with a + dot (".") in front, and a comma (",") between every group of + thousands. +

If all four parameters are given, number + will be formatted with decimals decimals, + dec_point instead of a dot (".") before + the decimals and thousands_sep instead of + a comma (",") between every group of thousands. +


PrevHomeNext
mt_getrandmaxUpoctdec
\ No newline at end of file diff --git a/function.ob-end-clean.html b/function.ob-end-clean.html new file mode 100644 index 0000000..3fbeae5 --- /dev/null +++ b/function.ob-end-clean.html @@ -0,0 +1,191 @@ +ob_end_clean
PHP Manual
PrevNext

ob_end_clean

(PHP4 )

ob_end_clean --  + Clean (erase) the output buffer and turn off output buffering +

Description

void ob_end_clean(void);

This function discards the contents of the output buffer and + turns off output buffering. +

See also ob_start() and + ob_end_flush(). +


PrevHomeNext
ob_end_flushUpob_implicit_flush
\ No newline at end of file diff --git a/function.ob-end-flush.html b/function.ob-end-flush.html new file mode 100644 index 0000000..e383551 --- /dev/null +++ b/function.ob-end-flush.html @@ -0,0 +1,217 @@ +ob_end_flush
PHP Manual
PrevNext

ob_end_flush

(PHP4 )

ob_end_flush --  + Flush (send) the output buffer and turn off output buffering +

Description

void ob_end_flush(void);

This function will send the contents of the output buffer (if + any) and turn output buffering off. If you want to further + process the buffer's contents you have to call + ob_get_contents() before + ob_end_flush() as the buffer contents are + discarded after ob_get_contents() is called. +

See also ob_start(), + ob_get_contents(), and + ob_end_clean(). +


PrevHomeNext
ob_get_lengthUpob_end_clean
\ No newline at end of file diff --git a/function.ob-get-contents.html b/function.ob-get-contents.html new file mode 100644 index 0000000..406a583 --- /dev/null +++ b/function.ob-get-contents.html @@ -0,0 +1,191 @@ +ob_get_contents
PHP Manual
PrevNext

ob_get_contents

(PHP4 )

ob_get_contents --  + Return the contents of the output buffer +

Description

string ob_get_contents(void);

This will return the contents of the output buffer or FALSE, if + output buffering isn't active. +

See also ob_start() and + ob_get_length(). +


PrevHomeNext
ob_startUpob_get_length
\ No newline at end of file diff --git a/function.ob-get-length.html b/function.ob-get-length.html new file mode 100644 index 0000000..75a3524 --- /dev/null +++ b/function.ob-get-length.html @@ -0,0 +1,191 @@ +ob_get_length
PHP Manual
PrevNext

ob_get_length

(PHP4 >= 4.0.2)

ob_get_length --  + Return the length of the output buffer +

Description

string ob_get_length(void);

This will return the length of the contents in the output buffer + or FALSE, if output buffering isnt't active. +

See also ob_start() and + ob_get_contents(). +


PrevHomeNext
ob_get_contentsUpob_end_flush
\ No newline at end of file diff --git a/function.ob-implicit-flush.html b/function.ob-implicit-flush.html new file mode 100644 index 0000000..3a7551b --- /dev/null +++ b/function.ob-implicit-flush.html @@ -0,0 +1,227 @@ +ob_implicit_flush
PHP Manual
PrevNext

ob_implicit_flush

(PHP4 >= 4.0b4)

ob_implicit_flush --  + Turn implicit flush on/off +

Description

void ob_implicit_flush ([int + flag])

ob_implicit_flush() will turn implicit + flushing on or off (if no flag is given, + it defaults to on). Implicit flushing will result in a flush + operation after every output call, so that explicit calls to + flush() will no longer be needed. +

Turning implicit flushing on will disable output buffering, the + output buffers current output will be sent as if + ob_end_flush() had been called. +

See also flush(), + ob_start(), and + ob_end_flush(). +


PrevHomeNext
ob_end_cleanUpPDF functions
\ No newline at end of file diff --git a/function.ob-start.html b/function.ob-start.html new file mode 100644 index 0000000..5e9c994 --- /dev/null +++ b/function.ob-start.html @@ -0,0 +1,230 @@ +ob_start
PHP Manual
PrevNext

ob_start

(PHP4 )

ob_start -- Turn on output buffering

Description

void ob_start(void);

This function will turn output buffering on. While output buffering + is active no output is sent from the script, instead the output + is stored in an internal buffer. +

The contents of this internal buffer may be copied into a string + variable using ob_get_contents(). To output + what is stored in the internal buffer, use + ob_end_flush(). Alternatively, + ob_end_clean() will silently discard the + buffer contents. +

See also ob_get_contents(), + ob_end_flush(), + ob_end_clean(), and + ob_implicit_flush() +


PrevHomeNext
flushUpob_get_contents
\ No newline at end of file diff --git a/function.ocibindbyname.html b/function.ocibindbyname.html new file mode 100644 index 0000000..23c5e42 --- /dev/null +++ b/function.ocibindbyname.html @@ -0,0 +1,318 @@ +OCIBindByName
PHP Manual
PrevNext

OCIBindByName

(PHP3 >= 3.0.4, PHP4 )

OCIBindByName -- Bind a PHP variable to an Oracle Placeholder

Description

int OCIBindByName (int stmt, string ph_name, mixed &variable, intlength [, int type])

OCIBindByName() binds the PHP variable + variable to the Oracle placeholder + ph_name. Whether it will be used for + input or output will be determined run-time, and the necessary + storage space will be allocated. The + length paramter sets the maximum length + for the bind. If you set length to -1 + OCIBindByName() will use the current length of + variable to set the maximum length. +

If you need to bind an abstract Datatype (LOB/ROWID/BFILE) you + need to allocate it first using + OCINewDescriptor() function. The + length is not used for abstract Datatypes + and should be set to -1. The type variable + tells oracle, what kind of descriptor we want to use. Possible + values are: OCI_B_FILE (Binary-File), OCI_B_CFILE + (Character-File), OCI_B_CLOB (Character-LOB), OCI_B_BLOB + (Binary-LOB) and OCI_B_ROWID (ROWID). +

Example 1. OCIDefineByName


<?php
+/* OCIBindByPos example thies@digicol.de (980221)
+  inserts 3 resords into emp, and uses the ROWID for updating the 
+  records just after the insert.
+*/
+
+$conn = OCILogon("scott","tiger");
+
+$stmt = OCIParse($conn,"insert into emp (empno, ename) ".
+					   "values (:empno,:ename) ".
+					   "returning ROWID into :rid");
+
+$data = array(1111 => "Larry", 2222 => "Bill", 3333 => "Jim");
+
+$rowid = OCINewDescriptor($conn,OCI_D_ROWID);
+
+OCIBindByName($stmt,":empno",&$empno,32);
+OCIBindByName($stmt,":ename",&$ename,32);
+OCIBindByName($stmt,":rid",&$rowid,-1,OCI_B_ROWID);
+
+$update = OCIParse($conn,"update emp set sal = :sal where ROWID = :rid");
+OCIBindByName($update,":rid",&$rowid,-1,OCI_B_ROWID);
+OCIBindByName($update,":sal",&$sal,32);
+
+$sal = 10000;
+
+while (list($empno,$ename) = each($data)) {
+	OCIExecute($stmt);
+	OCIExecute($update);
+} 
+
+$rowid->free();
+
+OCIFreeStatement($update);
+OCIFreeStatement($stmt);
+
+$stmt = OCIParse($conn,"select * from emp where empno in (1111,2222,3333)");
+OCIExecute($stmt);
+while (OCIFetchInto($stmt,&$arr,OCI_ASSOC)) {
+	var_dump($arr);
+}
+OCIFreeStatement($stmt);
+
+/* delete our "junk" from the emp table.... */
+$stmt = OCIParse($conn,"delete from emp where empno in (1111,2222,3333)");
+OCIExecute($stmt);
+OCIFreeStatement($stmt);
+
+OCILogoff($conn);
+?>
+     

PrevHomeNext
OCIDefineByNameUpOCILogon
\ No newline at end of file diff --git a/function.ocicolumnisnull.html b/function.ocicolumnisnull.html new file mode 100644 index 0000000..4a25dee --- /dev/null +++ b/function.ocicolumnisnull.html @@ -0,0 +1,194 @@ +OCIColumnIsNULL
PHP Manual
PrevNext

OCIColumnIsNULL

(PHP3 >= 3.0.4, PHP4 )

OCIColumnIsNULL -- test whether a result column is NULL

Description

int OCIColumnIsNULL (int stmt, mixed column)

OCIColumnIsNULL() returns true if the returned + column column in the result from the + statement stmt is NULL. You can either use + the column-number (1-Based) or the column-name for the col + parameter. +


PrevHomeNext
OCIFetchStatementUpOCIColumnSize
\ No newline at end of file diff --git a/function.ocicolumnname.html b/function.ocicolumnname.html new file mode 100644 index 0000000..8f6b3b2 --- /dev/null +++ b/function.ocicolumnname.html @@ -0,0 +1,250 @@ +OCIColumnName
PHP Manual
PrevNext

OCIColumnName

(PHP3 >= 3.0.4, PHP4 )

OCIColumnName -- Returns the name of a column.

Description

string OCIColumnName (int stmt, int col)

OCIColumnName() returns the name of the column + corresponding to the column number (1-based) that is passed in.

Example 1. OCIColumnName


<?php   
+    print "<HTML><PRE>\n";   
+    $conn = OCILogon("scott", "tiger");
+    $stmt = OCIParse($conn,"select * from emp");
+    OCIExecute($stmt);
+    print "<TABLE BORDER=\"1\">";
+    print "<TR>";
+    print "<TH>Name</TH>";
+    print "<TH>Type</TH>";
+    print "<TH>Length</TH>";
+    print "</TR>";
+    $ncols = OCINumCols($stmt);
+    for ( $i = 1; $i <= $ncols; $i++ ) {
+        $column_name  = OCIColumnName($stmt,$i);
+        $column_type  = OCIColumnType($stmt,$i);
+        $column_size  = OCIColumnSize($stmt,$i);
+        print "<TR>";
+        print "<TD>$column_name</TD>";
+        print "<TD>$column_type</TD>";
+        print "<TD>$column_size</TD>";
+        print "</TR>";
+    }
+    OCIFreeStatement($stmt);  
+    OCILogoff($conn);   
+    print "</PRE>";
+    print "</HTML>\n"; 
+?>   
+      
+

See also OCINumCols(), OCIColumnType(), + and OCIColumnSize().


PrevHomeNext
OCIFreeDescUpOCIColumnType
\ No newline at end of file diff --git a/function.ocicolumnsize.html b/function.ocicolumnsize.html new file mode 100644 index 0000000..3f3cca0 --- /dev/null +++ b/function.ocicolumnsize.html @@ -0,0 +1,259 @@ +OCIColumnSize
PHP Manual
PrevNext

OCIColumnSize

(PHP3 >= 3.0.4, PHP4 )

OCIColumnSize -- return result column size

Description

int OCIColumnSize (int stmt, mixed column)

OCIColumnSize() returns the size of the column + as given by Oracle. You can either use + the column-number (1-Based) or the column-name for the col + parameter. +

Example 1. OCIColumnSize


<?php   
+    print "<HTML><PRE>\n";   
+    $conn = OCILogon("scott", "tiger");
+    $stmt = OCIParse($conn,"select * from emp");
+    OCIExecute($stmt);
+    print "<TABLE BORDER=\"1\">";
+    print "<TR>";
+    print "<TH>Name</TH>";
+    print "<TH>Type</TH>";
+    print "<TH>Length</TH>";
+    print "</TR>";
+    $ncols = OCINumCols($stmt);
+    for ( $i = 1; $i <= $ncols; $i++ ) {
+        $column_name  = OCIColumnName($stmt,$i);
+        $column_type  = OCIColumnType($stmt,$i);
+        $column_size  = OCIColumnSize($stmt,$i);
+        print "<TR>";
+        print "<TD>$column_name</TD>";
+        print "<TD>$column_type</TD>";
+        print "<TD>$column_size</TD>";
+        print "</TR>";
+    }
+    print "</TABLE>";
+    OCIFreeStatement($stmt);  
+    OCILogoff($conn);   
+    print "</PRE>";
+    print "</HTML>\n"; 
+?>   
+      
+

See also OCINumCols(), OCIColumnName(), + and OCIColumnSize().


PrevHomeNext
OCIColumnIsNULLUpOCIServerVersion
\ No newline at end of file diff --git a/function.ocicolumntype.html b/function.ocicolumntype.html new file mode 100644 index 0000000..fb75835 --- /dev/null +++ b/function.ocicolumntype.html @@ -0,0 +1,250 @@ +OCIColumnType
PHP Manual
PrevNext

OCIColumnType

(PHP3 >= 3.0.4, PHP4 )

OCIColumnType -- Returns the data type of a column.

Description

mixed OCIColumnType (int stmt, int col)

OCIColumnType() returns the data type of the column + corresponding to the column number (1-based) that is passed in.

Example 1. OCIColumnType


<?php   
+    print "<HTML><PRE>\n";   
+    $conn = OCILogon("scott", "tiger");
+    $stmt = OCIParse($conn,"select * from emp");
+    OCIExecute($stmt);
+    print "<TABLE BORDER=\"1\">";
+    print "<TR>";
+    print "<TH>Name</TH>";
+    print "<TH>Type</TH>";
+    print "<TH>Length</TH>";
+    print "</TR>";
+    $ncols = OCINumCols($stmt);
+    for ( $i = 1; $i <= $ncols; $i++ ) {
+        $column_name  = OCIColumnName($stmt,$i);
+        $column_type  = OCIColumnType($stmt,$i);
+        $column_size  = OCIColumnSize($stmt,$i);
+        print "<TR>";
+        print "<TD>$column_name</TD>";
+        print "<TD>$column_type</TD>";
+        print "<TD>$column_size</TD>";
+        print "</TR>";
+    }
+    OCIFreeStatement($stmt);  
+    OCILogoff($conn);   
+    print "</PRE>";
+    print "</HTML>\n"; 
+?>   
+      
+

See also OCINumCols(), OCIColumnName(), + and OCIColumnSize().


PrevHomeNext
OCIColumnNameUpOCIParse
\ No newline at end of file diff --git a/function.ocicommit.html b/function.ocicommit.html new file mode 100644 index 0000000..cdffecb --- /dev/null +++ b/function.ocicommit.html @@ -0,0 +1,181 @@ +OCICommit
PHP Manual
PrevNext

OCICommit

(PHP3 >= 3.0.7, PHP4 )

OCICommit -- Commits outstanding transactions

Description

int OCICommit (int connection)

OCICommit() commits all outstanding statements for + Oracle connection connection. +


PrevHomeNext
OCIExecuteUpOCIRollback
\ No newline at end of file diff --git a/function.ocidefinebyname.html b/function.ocidefinebyname.html new file mode 100644 index 0000000..9897b39 --- /dev/null +++ b/function.ocidefinebyname.html @@ -0,0 +1,258 @@ +OCIDefineByName
PHP Manual
PrevNext

OCIDefineByName

(PHP3 >= 3.0.7, PHP4 )

OCIDefineByName --  + Use a PHP variable for the define-step during a SELECT +

Description

int OCIDefineByName (int stmt, string Column-Name, mixed &variable [, int type])

OCIDefineByName() uses fetches SQL-Columns + into user-defined PHP-Variables. Be careful that Oracle user + ALL-UPPERCASE column-names, whereby in your select you can also + write lower-case. OCIDefineByName() expects + the Column-Name to be in uppercase. If you + define a variable that doesn't exists in you select statement, no + error will be given! +

If you need to define an abstract Datatype (LOB/ROWID/BFILE) you + need to allocate it first using + OCINewDescriptor() function. See also the + OCIBindByName() function. +

Example 1. OCIDefineByName


<?php
+/* OCIDefineByPos example thies@digicol.de (980219) */
+
+$conn = OCILogon("scott","tiger");
+
+$stmt = OCIParse($conn,"select empno, ename from emp");
+
+/* the define MUST be done BEFORE ociexecute! */
+
+OCIDefineByName($stmt,"EMPNO",&$empno);
+OCIDefineByName($stmt,"ENAME",&$ename);
+
+OCIExecute($stmt);
+
+while (OCIFetch($stmt)) {
+    echo "empno:".$empno."\n";
+    echo "ename:".$ename."\n";
+}
+
+OCIFreeStatement($stmt);
+OCILogoff($conn);
+?>
+     

PrevHomeNext
Oracle 8 functionsUpOCIBindByName
\ No newline at end of file diff --git a/function.ocierror.html b/function.ocierror.html new file mode 100644 index 0000000..65d1f75 --- /dev/null +++ b/function.ocierror.html @@ -0,0 +1,206 @@ +OCIError
PHP Manual
PrevNext

OCIError

(PHP3 >= 3.0.7, PHP4 )

OCIError -- Return the last error of stmt|conn|global. + If no error happened returns false. +

Description

array OCIError ([int + stmt|conn|global])

OCIError() returns the last error found. If + the optional stmt|conn|global is not + provided, the last error encountered is returned. If no error is + found, OCIError() returns + false. OCIError() returns the error as an + associative array. In this array, code + consists the oracle error code and message + the oracle errorstring. +


PrevHomeNext
OCIParseUpOCIInternalDebug
\ No newline at end of file diff --git a/function.ociexecute.html b/function.ociexecute.html new file mode 100644 index 0000000..5124d18 --- /dev/null +++ b/function.ociexecute.html @@ -0,0 +1,187 @@ +OCIExecute
PHP Manual
PrevNext

OCIExecute

(PHP3 >= 3.0.4, PHP4 )

OCIExecute -- Execute a statement

Description

int OCIExecute (int statement [, int mode])

OCIExecute() executes a previously parsed statement. + (see OCIParse()). The optional mode + allows you to specify the execution-mode (default is OCI_COMMIT_ON_SUCCESS). + If you don't want statements to be commited automaticly specify OCI_DEFAULT as + your mode. +


PrevHomeNext
OCILogOffUpOCICommit
\ No newline at end of file diff --git a/function.ocifetch.html b/function.ocifetch.html new file mode 100644 index 0000000..87db57c --- /dev/null +++ b/function.ocifetch.html @@ -0,0 +1,176 @@ +OCIFetch
PHP Manual
PrevNext

OCIFetch

(PHP3 >= 3.0.4, PHP4 )

OCIFetch -- Fetches the next row into result-buffer

Description

int OCIFetch (int statement)

OCIFetch() fetches the next row (for SELECT statements) + into the internal result-buffer. +


PrevHomeNext
OCIResultUpOCIFetchInto
\ No newline at end of file diff --git a/function.ocifetchinto.html b/function.ocifetchinto.html new file mode 100644 index 0000000..a4a91b8 --- /dev/null +++ b/function.ocifetchinto.html @@ -0,0 +1,250 @@ +OCIFetchInto
PHP Manual
PrevNext

OCIFetchInto

(PHP3 >= 3.0.4, PHP4 )

OCIFetchInto -- Fetches the next row into result-array

Description

int OCIFetchInto (int stmt, array &result [, int mode])

OCIFetchInto() fetches the next row (for SELECT statements) + into the result array. OCIFetchInto() + will overwrite the previous content of result. By default + result will contain a one-based array of all columns + that are not NULL. +

The mode parameter allows you to change the default + behaviour. You can specify more than one flag by simply addig them up + (eg OCI_ASSOC+OCI_RETURN_NULLS). The known flags are: + +

OCI_ASSOC Return an associative array.
OCI_NUM Return an numbered array + starting with one. (DEFAULT)
OCI_RETURN_NULLS Return empty columns.
OCI_RETURN_LOBS Return the value of a LOB instead of the desxriptor.

+ +


PrevHomeNext
OCIFetchUpOCIFetchStatement
\ No newline at end of file diff --git a/function.ocifetchstatement.html b/function.ocifetchstatement.html new file mode 100644 index 0000000..f231458 --- /dev/null +++ b/function.ocifetchstatement.html @@ -0,0 +1,249 @@ +OCIFetchStatement
PHP Manual
PrevNext

OCIFetchStatement

(PHP3 >= 3.0.8, PHP4 )

OCIFetchStatement -- Fetch all rows of result data into an array.

Description

int OCIFetchStatement (int stmt, array &variable)

OCIFetchStatement() fetches all the rows from a + result into a user-defined array. OCIFetchStatement() + returns the number of rows fetched. +

Example 1. OCIFetchStatement


<?php
+/* OCIFetchStatement example mbritton@verinet.com (990624) */
+
+$conn = OCILogon("scott","tiger");
+
+$stmt = OCIParse($conn,"select * from emp");
+
+OCIExecute($stmt);
+
+$nrows = OCIFetchStatement($stmt,$results);
+if ( $nrows > 0 ) {
+   print "<TABLE BORDER=\"1\">\n";
+   print "<TR>\n";
+   while ( list( $key, $val ) = each( $results ) ) {
+      print "<TH>$key</TH>\n";
+   }
+   print "</TR>\n";
+   
+   for ( $i = 0; $i < $nrows; $i++ ) {
+      reset($results);
+      print "<TR>\n";
+      while ( $column = each($results) ) {   
+         $data = $column['value'];
+         print "<TD>$data[$i]</TD>\n";
+      }
+      print "</TR>\n";
+   }
+   print "</TABLE>\n";
+} else {
+   echo "No data found<BR>\n";
+}      
+print "$nrows Records Selected<BR>\n";
+ 
+OCIFreeStatement($stmt);
+OCILogoff($conn);
+
+?>

PrevHomeNext
OCIFetchIntoUpOCIColumnIsNULL
\ No newline at end of file diff --git a/function.ocifreecursor.html b/function.ocifreecursor.html new file mode 100644 index 0000000..267e570 --- /dev/null +++ b/function.ocifreecursor.html @@ -0,0 +1,176 @@ +OCIFreeCursor
PHP Manual
PrevNext

OCIFreeCursor

(PHP3 >= 3.0.8, PHP4 )

OCIFreeCursor -- Free all resources associated with a cursor.

Description

int OCIFreeCursor (int stmt)

OCIFreeCursor() returns true if successful, or false if + unsuccessful. +


PrevHomeNext
OCIFreeStatementUpOCIFreeDesc
\ No newline at end of file diff --git a/function.ocifreedesc.html b/function.ocifreedesc.html new file mode 100644 index 0000000..3fae8e2 --- /dev/null +++ b/function.ocifreedesc.html @@ -0,0 +1,176 @@ +OCIFreeDesc
PHP Manual
PrevNext

OCIFreeDesc

(PHP4 >= 4.0b4)

OCIFreeDesc -- Deletes a large object descriptor.

Description

int OCIFreeDesc (object lob)

OCIFreeDesc() returns true if successful, or false if + unsuccessful. +


PrevHomeNext
OCIFreeCursorUpOCIColumnName
\ No newline at end of file diff --git a/function.ocifreestatement.html b/function.ocifreestatement.html new file mode 100644 index 0000000..206103e --- /dev/null +++ b/function.ocifreestatement.html @@ -0,0 +1,176 @@ +OCIFreeStatement
PHP Manual
PrevNext

OCIFreeStatement

(PHP3 >= 3.0.5, PHP4 )

OCIFreeStatement -- Free all resources associated with a statement.

Description

int OCIFreeStatement (int stmt)

OCIFreeStatement() returns true if successful, or false if + unsuccessful. +


PrevHomeNext
OCINewCursorUpOCIFreeCursor
\ No newline at end of file diff --git a/function.ociinternaldebug.html b/function.ociinternaldebug.html new file mode 100644 index 0000000..2d1587d --- /dev/null +++ b/function.ociinternaldebug.html @@ -0,0 +1,183 @@ +OCIInternalDebug
PHP Manual
PrevNext

OCIInternalDebug

(PHP3 >= 3.0.4, PHP4 )

OCIInternalDebug --  + Enables or disables internal debug output. By default it is + disabled +

Description

void OCIInternalDebug (int onoff)

OCIInternalDebug() enables internal debug output. Set onoff + to 0 to turn debug output off, 1 to turn it on.


PrevHomeNext
OCIErrorUpOracle functions
\ No newline at end of file diff --git a/function.ocilogoff.html b/function.ocilogoff.html new file mode 100644 index 0000000..2ee0ca2 --- /dev/null +++ b/function.ocilogoff.html @@ -0,0 +1,175 @@ +OCILogOff
PHP Manual
PrevNext

OCILogOff

(PHP3 >= 3.0.4, PHP4 )

OCILogOff -- Disconnects from Oracle

Description

int OCILogOff (int connection)

OCILogOff() closes an Oracle connection. +


PrevHomeNext
OCINLogonUpOCIExecute
\ No newline at end of file diff --git a/function.ocilogon.html b/function.ocilogon.html new file mode 100644 index 0000000..3069ca9 --- /dev/null +++ b/function.ocilogon.html @@ -0,0 +1,314 @@ +OCILogon
PHP Manual
PrevNext

OCILogon

(PHP3 >= 3.0.4, PHP4 )

OCILogon -- Establishes a connection to Oracle

Description

int OCILogon (string username, string password [, string db])

OCILogon() returns an connection identifier + needed for most other OCI calls. The optional third parameter + can either contain the name of the local Oracle instance or the + name of the entry in tnsnames.ora to which you want to connect. + If the optional third parameter is not specified, PHP uses the + environment variables ORACLE_SID (Oracle instance) or TWO_TASK + (tnsnames.ora) to determine which database to connect to. +

Connections are shared at the page level when using + OCILogon(). This means that commits and + rollbacks apply to all open transactions in the page, even if you + have created multiple connections. +

This example demonstrates how the connections are shared. +

Example 1. OCILogon


<?php
+print "<HTML><PRE>";
+$db = "";
+
+$c1 = ocilogon("scott","tiger",$db);
+$c2 = ocilogon("scott","tiger",$db);
+
+function create_table($conn)
+{ $stmt = ociparse($conn,"create table scott.hallo (test varchar2(64))");
+  ociexecute($stmt);
+  echo $conn." created table\n\n";
+}
+
+function drop_table($conn)
+{ $stmt = ociparse($conn,"drop table scott.hallo");
+  ociexecute($stmt);
+  echo $conn." dropped table\n\n";
+}
+
+function insert_data($conn)
+{ $stmt = ociparse($conn,"insert into scott.hallo 
+            values('$conn' || ' ' || to_char(sysdate,'DD-MON-YY HH24:MI:SS'))");
+  ociexecute($stmt,OCI_DEFAULT);
+  echo $conn." inserted hallo\n\n";
+}
+
+function delete_data($conn)
+{ $stmt = ociparse($conn,"delete from scott.hallo");
+  ociexecute($stmt,OCI_DEFAULT);
+  echo $conn." deleted hallo\n\n";
+}
+
+function commit($conn)
+{ ocicommit($conn);
+  echo $conn." commited\n\n";
+}
+
+function rollback($conn)
+{ ocirollback($conn);
+  echo $conn." rollback\n\n";
+}
+
+function select_data($conn)
+{ $stmt = ociparse($conn,"select * from scott.hallo");
+  ociexecute($stmt,OCI_DEFAULT);
+  echo $conn."----selecting\n\n";
+  while (ocifetch($stmt))
+    echo $conn." <".ociresult($stmt,"TEST").">\n\n";
+  echo $conn."----done\n\n";
+}
+
+create_table($c1);
+insert_data($c1);   // Insert a row using c1
+insert_data($c2);   // Insert a row using c2
+
+select_data($c1);   // Results of both inserts are returned
+select_data($c2);   
+
+rollback($c1);      // Rollback using c1
+
+select_data($c1);   // Both inserts have been rolled back
+select_data($c2);   
+
+insert_data($c2);   // Insert a row using c2
+commit($c2);        // commit using c2
+
+select_data($c1);   // result of c2 insert is returned
+
+delete_data($c1);   // delete all rows in table using c1
+select_data($c1);   // no rows returned
+select_data($c2);   // no rows returned
+commit($c1);        // commit using c1
+
+select_data($c1);   // no rows returned
+select_data($c2);   // no rows returned
+
+
+drop_table($c1);
+print "</PRE></HTML>";
+?>

See also OCIPLogon() and + OCINLogon().


PrevHomeNext
OCIBindByNameUpOCIPLogon
\ No newline at end of file diff --git a/function.ocinewcursor.html b/function.ocinewcursor.html new file mode 100644 index 0000000..5f1af2b --- /dev/null +++ b/function.ocinewcursor.html @@ -0,0 +1,300 @@ +OCINewCursor
PHP Manual
PrevNext

OCINewCursor

(PHP3 >= 3.0.8, PHP4 )

OCINewCursor -- return a new cursor (Statement-Handle) - use this to bind ref-cursors!

Description

int OCINewCursor (int conn)

OCINewCursor() allocates a new statement handle on the specified + connection. +

Example 1. Using a REF CURSOR from a stored procedure


<?php   
+// suppose your stored procedure info.output returns a ref cursor in :data
+
+$conn = OCILogon("scott","tiger");
+$curs = OCINewCursor($conn);
+$stmt = OCIParse($conn,"begin info.output(:data); end;");
+
+ocibindbyname($stmt,"data",&$curs,-1,OCI_B_CURSOR);
+ociexecute($stmt);
+ociexecute($curs);
+
+while (OCIFetchInto($curs,&$data)) {
+    var_dump($data);
+}
+ 
+OCIFreeCursor($stmt);
+OCIFreeStatement($curs);
+OCILogoff($conn);
+?>
+      
+

Example 2. Using a REF CURSOR in a select statement


<?php   
+print "<HTML><BODY>";
+$conn = OCILogon("scott","tiger");
+$count_cursor = "CURSOR(select count(empno) num_emps from emp " .
+                "where emp.deptno = dept.deptno) as EMPCNT from dept";
+$stmt = OCIParse($conn,"select deptno,dname,$count_cursor");
+
+ociexecute($stmt);
+print "<TABLE BORDER=\"1\">";
+print "<TR>";
+print "<TH>DEPT NAME</TH>";
+print "<TH>DEPT #</TH>";
+print "<TH># EMPLOYEES</TH>";
+print "</TR>";
+
+while (OCIFetchInto($stmt,&$data,OCI_ASSOC)) {
+    print "<TR>";
+    $dname  = $data["DNAME"];
+    $deptno = $data["DEPTNO"];
+    print "<TD>$dname</TD>";
+    print "<TD>$deptno</TD>";
+    ociexecute($data[ "EMPCNT" ]);
+    while (OCIFetchInto($data[ "EMPCNT" ],&$subdata,OCI_ASSOC)) {
+        $num_emps = $subdata["NUM_EMPS"];
+        print  "<TD>$num_emps</TD>";
+    }
+    print "</TR>";
+}
+print "</TABLE>";
+print "</BODY></HTML>";
+OCIFreeStatement($stmt);
+OCILogoff($conn);
+?>
+      
+


PrevHomeNext
OCIStatementTypeUpOCIFreeStatement
\ No newline at end of file diff --git a/function.ocinewdescriptor.html b/function.ocinewdescriptor.html new file mode 100644 index 0000000..b7897c5 --- /dev/null +++ b/function.ocinewdescriptor.html @@ -0,0 +1,290 @@ +OCINewDescriptor
PHP Manual
PrevNext

OCINewDescriptor

(PHP3 >= 3.0.7, PHP4 )

OCINewDescriptor -- Initialize a new empty descriptor LOB/FILE (LOB is default)

Description

string OCINewDescriptor (int connection [, int type])

OCINewDescriptor() Allocates storage to hold + descriptors or LOB locators. Valid values for the valid + type are OCI_D_FILE, OCI_D_LOB, OCI_D_ROWID. + For LOB desriptors, the methods load, save, and savefile are + associated with the descriptor, for BFILE only the load method exists. + See the second example usage hints. +

Example 1. OCINewDescriptor


<?php   
+    /* This script is designed to be called from a HTML form.
+     * It expects $user, $password, $table, $where, and $commitsize
+     * to be passed in from the form.  The script then deletes
+     * the selected rows using the ROWID and commits after each
+     * set of $commitsize rows. (Use with care, there is no rollback)
+     */
+    $conn = OCILogon($user, $password);
+    $stmt = OCIParse($conn,"select rowid from $table $where");
+    $rowid = OCINewDescriptor($conn,OCI_D_ROWID);
+    OCIDefineByName($stmt,"ROWID",&$rowid);   
+    OCIExecute($stmt);
+    while ( OCIFetch($stmt) ) {      
+       $nrows = OCIRowCount($stmt);
+       $delete = OCIParse($conn,"delete from $table where ROWID = :rid");
+       OCIBindByName($delete,":rid",&$rowid,-1,OCI_B_ROWID);
+       OCIExecute($delete);      
+       print "$nrows\n";
+       if ( ($nrows % $commitsize) == 0 ) {
+           OCICommit($conn);      
+       }   
+    }
+    $nrows = OCIRowCount($stmt);   
+    print "$nrows deleted...\n";
+    OCIFreeStatement($stmt);  
+    OCILogoff($conn);
+?>  
+     

<?php
+    /* This script demonstrates file upload to LOB columns
+     * The formfield used for this example looks like this
+     * <form action="upload.php3" method="post" enctype="multipart/form-data">
+     * <input type="file" name="lob_upload">
+     * ...
+     */
+  if(!isset($lob_upload) || $lob_upload == 'none'){
+?>
+<form action="upload.php3" method="post" enctype="multipart/form-data">
+Upload file: <input type="file" name="lob_upload"><br>
+<input type="submit" value="Upload"> - <input type="reset">
+</form>
+<?php
+  } else {
+     // $lob_upload contains the temporary filename of the uploaded file
+     $conn = OCILogon($user, $password);
+     $lob = OCINewDescriptor($conn, OCI_D_LOB);
+     $stmt = OCIParse($conn,"insert into $table (id, the_blob) 
+               values(my_seq.NEXTVAL, EMPTY_BLOB()) returning the_blob into :the_blob");
+     OCIBindByName($stmt, ':the_blob', &$lob, -1, OCI_B_BLOB);
+     OCIExecute($stmt);
+     if($lob->savefile($lob_upload)){
+        OCICommit($conn);
+        echo "Blob successfully uploaded\n";
+     }else{
+        echo "Couldn't upload Blob\n";
+     }
+     OCIFreeDesc($lob);
+     OCIFreeStatement($stmt);
+     OCILogoff($conn);
+  }
+?>
+     

PrevHomeNext
OCIRollbackUpOCIRowCount
\ No newline at end of file diff --git a/function.ocinlogon.html b/function.ocinlogon.html new file mode 100644 index 0000000..8602879 --- /dev/null +++ b/function.ocinlogon.html @@ -0,0 +1,327 @@ +OCINLogon
PHP Manual
PrevNext

OCINLogon

(PHP3 >= 3.0.8, PHP4 )

OCINLogon -- Connect to an Oracle database and log on using a new connection. + Returns a new session.

Description

int OCINLogon (string username, string password [, string db])

OCINLogon() creates a new connection to an + Oracle 8 database and logs on. The optional third parameter can + either contain the name of the local Oracle instance or the name + of the entry in tnsnames.ora to which you want to connect. If + the optional third parameter is not specified, PHP uses the + environment variables ORACLE_SID (Oracle instance) or TWO_TASK + (tnsnames.ora) to determine which database to connect to. +

OCINLogon() forces a new connection. This + should be used if you need to isolate a set of transactions. By + default, connections are shared at the page level if using + OCILogon() or at the web server process level + if using OCIPLogon(). If you have multiple + connections open using OCINLogon(), all + commits and rollbacks apply to the specified connection only. +

This example demonstrates how the connections are separated. +

Example 1. OCINLogon


<?php
+print "<HTML><PRE>";
+$db = "";
+
+$c1 = ocilogon("scott","tiger",$db);
+$c2 = ocinlogon("scott","tiger",$db);
+
+function create_table($conn)
+{ $stmt = ociparse($conn,"create table scott.hallo (test
+varchar2(64))");
+  ociexecute($stmt);
+  echo $conn." created table\n\n";
+}
+
+function drop_table($conn)
+{ $stmt = ociparse($conn,"drop table scott.hallo");
+  ociexecute($stmt);
+  echo $conn." dropped table\n\n";
+}
+
+function insert_data($conn)
+{ $stmt = ociparse($conn,"insert into scott.hallo 
+            values('$conn' || ' ' || to_char(sysdate,'DD-MON-YY HH24:MI:SS'))");
+  ociexecute($stmt,OCI_DEFAULT);
+  echo $conn." inserted hallo\n\n";
+}
+
+function delete_data($conn)
+{ $stmt = ociparse($conn,"delete from scott.hallo");
+  ociexecute($stmt,OCI_DEFAULT);
+  echo $conn." deleted hallo\n\n";
+}
+
+function commit($conn)
+{ ocicommit($conn);
+  echo $conn." commited\n\n";
+}
+
+function rollback($conn)
+{ ocirollback($conn);
+  echo $conn." rollback\n\n";
+}
+
+function select_data($conn)
+{ $stmt = ociparse($conn,"select * from scott.hallo");
+  ociexecute($stmt,OCI_DEFAULT);
+  echo $conn."----selecting\n\n";
+  while (ocifetch($stmt))
+    echo $conn." <".ociresult($stmt,"TEST").">\n\n";
+  echo $conn."----done\n\n";
+}
+
+create_table($c1);
+insert_data($c1);
+
+select_data($c1);   
+select_data($c2);   
+
+rollback($c1);      
+
+select_data($c1);   
+select_data($c2);   
+
+insert_data($c2);   
+commit($c2);        
+
+select_data($c1);   
+
+delete_data($c1);   
+select_data($c1);   
+select_data($c2);   
+commit($c1);        
+
+select_data($c1);
+select_data($c2);
+
+
+drop_table($c1);
+print "</PRE></HTML>";
+?>

See also OCILogon() and + OCIPLogon().


PrevHomeNext
OCIPLogonUpOCILogOff
\ No newline at end of file diff --git a/function.ocinumcols.html b/function.ocinumcols.html new file mode 100644 index 0000000..0922f20 --- /dev/null +++ b/function.ocinumcols.html @@ -0,0 +1,229 @@ +OCINumCols
PHP Manual
PrevNext

OCINumCols

(PHP3 >= 3.0.4, PHP4 )

OCINumCols -- Return the number of result columns in a statement

Description

int OCINumCols (int stmt)

OCINumCols() returns the number of columns in a + statement +

Example 1. OCINumCols


<?php   
+    print "<HTML><PRE>\n";   
+    $conn = OCILogon("scott", "tiger");
+    $stmt = OCIParse($conn,"select * from emp");
+    OCIExecute($stmt);
+    while ( OCIFetch($stmt) ) {
+        print "\n";   
+        $ncols = OCINumCols($stmt);
+        for ( $i = 1; $i <= $ncols; $i++ ) {
+            $column_name  = OCIColumnName($stmt,$i);
+            $column_value = OCIResult($stmt,$i);
+            print $column_name . ': ' . $column_value . "\n";
+        }
+        print "\n";
+    }
+    OCIFreeStatement($stmt);  
+    OCILogoff($conn);   
+    print "</PRE>";
+    print "</HTML>\n"; 
+?>   
+     

PrevHomeNext
OCIRowCountUpOCIResult
\ No newline at end of file diff --git a/function.ocinumrows.html b/function.ocinumrows.html new file mode 100644 index 0000000..9d35585 --- /dev/null +++ b/function.ocinumrows.html @@ -0,0 +1,165 @@ +OCINumRows
PHP3 Manual
PrevNext

OCINumRows

OCINumRows -- Gets the number of affectend rows

Description

int OCINumRows(int statement);

OCINumRows() returns the number of rows affected + for eg update-statements. This funtions will not tell you the number + of rows that a select will return! +


PrevHomeNext
OCIRollbackUpOCIResult
\ No newline at end of file diff --git a/function.ociparse.html b/function.ociparse.html new file mode 100644 index 0000000..0a34f6d --- /dev/null +++ b/function.ociparse.html @@ -0,0 +1,193 @@ +OCIParse
PHP Manual
PrevNext

OCIParse

(PHP3 >= 3.0.4, PHP4 )

OCIParse -- Parse a query and return a statement

Description

int OCIParse (int conn, strint query)

OCIParse() parses the query + using conn. It returns the statement + identity if the query is valid, false if not. The + query can be any valid SQL statement. +


PrevHomeNext
OCIColumnTypeUpOCIError
\ No newline at end of file diff --git a/function.ociplogon.html b/function.ociplogon.html new file mode 100644 index 0000000..a65969c --- /dev/null +++ b/function.ociplogon.html @@ -0,0 +1,191 @@ +OCIPLogon
PHP Manual
PrevNext

OCIPLogon

(PHP3 >= 3.0.8, PHP4 )

OCIPLogon -- Connect to an Oracle database and log on using a persistant connection. + Returns a new session.

Description

int OCIPLogon (string username, string password [, string db])

OCIPLogon() creates a persistent connection to + an Oracle 8 database and logs on. The optional third parameter + can either contain the name of the local Oracle instance or the + name of the entry in tnsnames.ora to which you want to connect. + If the optional third parameter is not specified, PHP uses the + environment variables ORACLE_SID (Oracle instance) or TWO_TASK + (tnsnames.ora) to determine which database to connect to. +

See also OCILogon() and + OCINLogon().


PrevHomeNext
OCILogonUpOCINLogon
\ No newline at end of file diff --git a/function.ociresult.html b/function.ociresult.html new file mode 100644 index 0000000..5dc4521 --- /dev/null +++ b/function.ociresult.html @@ -0,0 +1,189 @@ +OCIResult
PHP Manual
PrevNext

OCIResult

(PHP3 >= 3.0.4, PHP4 )

OCIResult -- Returns coulumn value for fetched row

Description

mixed OCIResult (int statement, mixed column)

OCIResult() returns the data for column + column in the current row (see + OCIFetch()).OCIResult() will + return everything as strings except for abstract types (ROWIDs, LOBs and FILEs). +


PrevHomeNext
OCINumColsUpOCIFetch
\ No newline at end of file diff --git a/function.ocirollback.html b/function.ocirollback.html new file mode 100644 index 0000000..487bc32 --- /dev/null +++ b/function.ocirollback.html @@ -0,0 +1,181 @@ +OCIRollback
PHP Manual
PrevNext

OCIRollback

(PHP3 >= 3.0.7, PHP4 )

OCIRollback -- Rolls back outstanding transactions

Description

int OCIRollback (int connection)

OCIRollback() rolls back all outstanding statements for + Oracle connection connection. +


PrevHomeNext
OCICommitUpOCINewDescriptor
\ No newline at end of file diff --git a/function.ocirowcount.html b/function.ocirowcount.html new file mode 100644 index 0000000..b980c00 --- /dev/null +++ b/function.ocirowcount.html @@ -0,0 +1,228 @@ +OCIRowCount
PHP Manual
PrevNext

OCIRowCount

(PHP3 >= 3.0.7, PHP4 )

OCIRowCount -- Gets the number of affected rows

Description

int OCIRowCount (int statement)

OCIRowCount() returns the number of rows affected + for eg update-statements. This funtions will not tell you the number + of rows that a select will return!

Example 1. OCIRowCount


<?php
+    print "<HTML><PRE>";
+    $conn = OCILogon("scott","tiger");
+    $stmt = OCIParse($conn,"create table emp2 as select * from emp");
+    OCIExecute($stmt);
+    print OCIRowCount($stmt) . " rows inserted.<BR>";
+    OCIFreeStatement($stmt);
+    $stmt = OCIParse($conn,"delete from emp2");
+    OCIExecute($stmt);
+    print OCIRowCount($stmt) . " rows deleted.<BR>";
+    OCICommit($conn);
+    OCIFreeStatement($stmt);
+    $stmt = OCIParse($conn,"drop table emp2");
+    OCIExecute($stmt);
+    OCIFreeStatement($stmt);
+    OCILogOff($conn);
+    print "</PRE></HTML>";
+?> 


PrevHomeNext
OCINewDescriptorUpOCINumCols
\ No newline at end of file diff --git a/function.ociserverversion.html b/function.ociserverversion.html new file mode 100644 index 0000000..3e424f1 --- /dev/null +++ b/function.ociserverversion.html @@ -0,0 +1,208 @@ +OCIServerVersion
PHP Manual
PrevNext

OCIServerVersion

(PHP3 >= 3.0.4, PHP4 )

OCIServerVersion -- Return a string containing server version information.

Description

string OCIServerVersion (int conn)

Example 1. OCIServerVersion


<?php
+   $conn = OCILogon("scott","tiger");
+   print "Server Version: " . OCIServerVersion($conn);
+   OCILogOff($conn);
+?>


PrevHomeNext
OCIColumnSizeUpOCIStatementType
\ No newline at end of file diff --git a/function.ocistatementtype.html b/function.ocistatementtype.html new file mode 100644 index 0000000..e3e5848 --- /dev/null +++ b/function.ocistatementtype.html @@ -0,0 +1,268 @@ +OCIStatementType
PHP Manual
PrevNext

OCIStatementType

(PHP3 >= 3.0.5, PHP4 )

OCIStatementType -- Return the type of an OCI statement.

Description

string OCIStatementType (int stmt)

OCIStatementType() returns on of the following values: +

  1. "SELECT"

  2. "UPDATE"

  3. "DELETE"

  4. "INSERT"

  5. "CREATE"

  6. "DROP"

  7. "ALTER"

  8. "BEGIN"

  9. "DECLARE"

  10. "UNKNOWN"

Example 1. Code examples


<?php
+    print "<HTML><PRE>";
+    $conn = OCILogon("scott","tiger");
+    $sql  = "delete from emp where deptno = 10";
+   
+    $stmt = OCIParse($conn,$sql);
+    if ( OCIStatementType($stmt) == "DELETE" ) {
+        die "You are not allowed to delete from this table<BR>";
+    }
+   
+    OCILogoff($conn);
+    print "</PRE></HTML>";
+?>
+


PrevHomeNext
OCIServerVersionUpOCINewCursor
\ No newline at end of file diff --git a/function.octdec.html b/function.octdec.html new file mode 100644 index 0000000..d02c10c --- /dev/null +++ b/function.octdec.html @@ -0,0 +1,185 @@ +octdec
PHP Manual
PrevNext

octdec

(PHP3 , PHP4 )

octdec -- Octal to decimal

Description

int octdec (string octal_string)

Returns the decimal equivalent of the octal number + represented by the octal_string argument. + OctDec converts an octal string to a decimal number. The largest + number that can be converted is 17777777777 or 2147483647 in + decimal. +

See also decoct(). +


PrevHomeNext
number_formatUppi
\ No newline at end of file diff --git a/function.odbc-autocommit.html b/function.odbc-autocommit.html new file mode 100644 index 0000000..6a79012 --- /dev/null +++ b/function.odbc-autocommit.html @@ -0,0 +1,223 @@ +odbc_autocommit
PHP Manual
PrevNext

odbc_autocommit

(PHP3 >= 3.0.6, PHP4 )

odbc_autocommit -- Toggle autocommit behaviour

Description

int odbc_autocommit (int connection_id [, int OnOff])

Without the OnOff parameter, this function + returns auto-commit status for + connection_id. True is returned if + auto-commit is on, false if it is off or an error occurs. +

If OnOff is true, auto-commit is enabled, + if it is false auto-commit is disabled. Returns + true on success, false on + failure. +

By default, auto-commit is on for a connection. Disabling + auto-commit is equivalent with starting a transaction. +

See also + odbc_commit() and + odbc_rollback(). +


PrevHomeNext
Unified ODBC functionsUpodbc_binmode
\ No newline at end of file diff --git a/function.odbc-binmode.html b/function.odbc-binmode.html new file mode 100644 index 0000000..8c0a5f6 --- /dev/null +++ b/function.odbc-binmode.html @@ -0,0 +1,386 @@ +odbc_binmode
PHP Manual
PrevNext

odbc_binmode

(PHP3 >= 3.0.6, PHP4 )

odbc_binmode -- Handling of binary column data

Description

int odbc_binmode (int result_id, int mode)

(ODBC SQL types affected: BINARY, VARBINARY, LONGVARBINARY) +

  • ODBC_BINMODE_PASSTHRU: Passthru BINARY data +

  • ODBC_BINMODE_RETURN: Return as is +

  • ODBC_BINMODE_CONVERT: Convert to char and return +

When binary SQL data is converted to character C data, each byte + (8 bits) of source data is represented as two ASCII characters. + These characters are the ASCII character representation of the + number in its hexadecimal form. For example, a binary 00000001 is + converted to "01" and a binary 11111111 is + converted to "FF". +

Table 1. LONGVARBINARY handling

binmodelongreadlenresult
ODBC_BINMODE_PASSTHRU0passthru
ODBC_BINMODE_RETURN0passthru
ODBC_BINMODE_CONVERT0passthru
ODBC_BINMODE_PASSTHRU0passthru
ODBC_BINMODE_PASSTHRU>0passthru
ODBC_BINMODE_RETURN>0return as is
ODBC_BINMODE_CONVERT>0return as char
+

If odbc_fetch_into() is used, passthru means + that an empty string is returned for these columns. +

If result_id is 0, the + settings apply as default for new results. +

Note: + Default for longreadlen is 4096 and binmode + defaults to ODBC_BINMODE_RETURN. Handling + of binary long columns is also affected by + odbc_longreadlen() +

+


PrevHomeNext
odbc_autocommitUpodbc_close
\ No newline at end of file diff --git a/function.odbc-close-all.html b/function.odbc-close-all.html new file mode 100644 index 0000000..fa5d546 --- /dev/null +++ b/function.odbc-close-all.html @@ -0,0 +1,190 @@ +odbc_close_all
PHP Manual
PrevNext

odbc_close_all

(PHP3 >= 3.0.6, PHP4 )

odbc_close_all -- Close all ODBC connections

Description

void odbc_close_all(void);

odbc_close_all() will close down all + connections to database server(s). +

Note: + This function will fail if there are open transactions on a + connection. This connection will remain open in this case. +

+


PrevHomeNext
odbc_closeUpodbc_commit
\ No newline at end of file diff --git a/function.odbc-close.html b/function.odbc-close.html new file mode 100644 index 0000000..c1fd00d --- /dev/null +++ b/function.odbc-close.html @@ -0,0 +1,191 @@ +odbc_close
PHP Manual
PrevNext

odbc_close

(PHP3 >= 3.0.6, PHP4 )

odbc_close -- Close an ODBC connection

Description

void odbc_close (int connection_id)

odbc_close() will close down the connection to + the database server associated with the given connection + identifier. +

Note: + This function will fail if there are open transactions on this + connection. The connection will remain open in this case. +

+


PrevHomeNext
odbc_binmodeUpodbc_close_all
\ No newline at end of file diff --git a/function.odbc-columnprivileges.html b/function.odbc-columnprivileges.html new file mode 100644 index 0000000..8eab4fc --- /dev/null +++ b/function.odbc-columnprivileges.html @@ -0,0 +1,230 @@ +odbc_columnprivileges
PHP Manual
PrevNext

odbc_columnprivileges

(PHP4 >= 4.0b4)

odbc_columnprivileges --  + Returns a result identifier that can be used to fetch a list of + columns and associated privileges +

Description

int odbc_columnprivileges (int connection_id [, string qualifier [, string owner [, string table_name [, string column_name]]]])

Lists columns and associated privileges for the given table. + Returns an ODBC result identifier or false on + failure. +

The result set has the following columns: +

  • TABLE_QUALIFIER

  • TABLE_OWNER

  • TABLE_NAME

  • GRANTOR

  • GRANTEE

  • PRIVILEGE

  • IS_GRANTABLE

+

The result set is ordered by TABLE_QUALIFIER, TABLE_OWNER and + TABLE_NAME. +

The column_name argument accepts search + patterns ('%' to match zero or more characters and '_' to match a + single character). +


PrevHomeNext
odbc_columnsUpodbc_gettypeinfo
\ No newline at end of file diff --git a/function.odbc-columns.html b/function.odbc-columns.html new file mode 100644 index 0000000..6375780 --- /dev/null +++ b/function.odbc-columns.html @@ -0,0 +1,271 @@ +odbc_columns
PHP Manual
PrevNext

odbc_columns

(PHP4 >= 4.0b4)

odbc_columns --  + Lists the column names in specified tables. Returns a result + identifier containing the information. +

Description

int odbc_columns (int connection_id [, string qualifier [, string owner [, string table_name [, string column_name]]]])

Lists all columns in the requested range. Returns an ODBC result + identifier or false on failure. +

The result set has the following columns: +

  • TABLE_QUALIFIER

  • TABLE_OWNER

  • TABLE_NAME

  • COLUMN_NAME

  • DATA_TYPE

  • TYPE_NAME

  • PRECISION

  • LENGTH

  • SCALE

  • RADIX

  • NULLABLE

  • REMARKS

+

The result set is ordered by TABLE_QUALIFIER, TABLE_OWNER and + TABLE_NAME. +

The owner, + table_name and + column_name arguments accept search + patterns ('%' to match zero or more characters and '_' to match a + single character). +

See also odbc_columnprivileges() to retrieve + associated privileges. +


PrevHomeNext
odbc_tableprivilegesUpodbc_columnprivileges
\ No newline at end of file diff --git a/function.odbc-commit.html b/function.odbc-commit.html new file mode 100644 index 0000000..ed91bf1 --- /dev/null +++ b/function.odbc-commit.html @@ -0,0 +1,185 @@ +odbc_commit
PHP Manual
PrevNext

odbc_commit

(PHP3 >= 3.0.6, PHP4 )

odbc_commit -- Commit an ODBC transaction

Description

int odbc_commit (int connection_id)

Returns: true on success, + false on failure. All pending transactions on + connection_id are committed. +


PrevHomeNext
odbc_close_allUpodbc_connect
\ No newline at end of file diff --git a/function.odbc-connect.html b/function.odbc-connect.html new file mode 100644 index 0000000..69746cf --- /dev/null +++ b/function.odbc-connect.html @@ -0,0 +1,238 @@ +odbc_connect
PHP Manual
PrevNext

odbc_connect

(PHP3 >= 3.0.6, PHP4 )

odbc_connect -- Connect to a datasource

Description

int odbc_connect (string dsn, string user, string password [, int cursor_type])

Returns an ODBC connection id or 0 (false) on + error. +

The connection id returned by this functions is needed by other + ODBC functions. You can have multiple connections open at once. + The optional fourth parameter sets the type of cursor to be used + for this connection. This parameter is not normally needed, but + can be useful for working around problems with some ODBC drivers. +

With some ODBC drivers, executing a complex stored procedure may + fail with an error similar to: "Cannot open a cursor on a stored + procedure that has anything other than a single select statement + in it". Using SQL_CUR_USE_ODBC may avoid that error. Also, some + drivers don't support the optional row_number parameter in + odbc_fetch_row(). SQL_CUR_USE_ODBC might help + in that case, too. +

The following constants are defined for cursortype: +

  • SQL_CUR_USE_IF_NEEDED +

  • SQL_CUR_USE_ODBC +

  • SQL_CUR_USE_DRIVER +

  • SQL_CUR_DEFAULT +

+

For persistent connections see + odbc_pconnect(). +


PrevHomeNext
odbc_commitUpodbc_cursor
\ No newline at end of file diff --git a/function.odbc-cursor.html b/function.odbc-cursor.html new file mode 100644 index 0000000..94eff06 --- /dev/null +++ b/function.odbc-cursor.html @@ -0,0 +1,172 @@ +odbc_cursor
PHP Manual
PrevNext

odbc_cursor

(PHP3 >= 3.0.6, PHP4 )

odbc_cursor -- Get cursorname

Description

string odbc_cursor (int result_id)

odbc_cursor will return a cursorname for the given result_id. +


PrevHomeNext
odbc_connectUpodbc_do
\ No newline at end of file diff --git a/function.odbc-do.html b/function.odbc-do.html new file mode 100644 index 0000000..7eff05d --- /dev/null +++ b/function.odbc-do.html @@ -0,0 +1,182 @@ +odbc_do
PHP Manual
PrevNext

odbc_do

(PHP3 >= 3.0.6, PHP4 )

odbc_do -- Synonym for odbc_exec()

Description

int odbc_do (int conn_id, string query)

Odbc_do() will execute a query on the given + connection. +


PrevHomeNext
odbc_cursorUpodbc_exec
\ No newline at end of file diff --git a/function.odbc-exec.html b/function.odbc-exec.html new file mode 100644 index 0000000..fb00a0b --- /dev/null +++ b/function.odbc-exec.html @@ -0,0 +1,221 @@ +odbc_exec
PHP Manual
PrevNext

odbc_exec

(PHP3 >= 3.0.6, PHP4 )

odbc_exec -- Prepare and execute a SQL statement

Description

int odbc_exec (int connection_id, string query_string)

Returns false on error. Returns an ODBC + result identifier if the SQL command was executed successfully. +

odbc_exec() will send an SQL statement to the + database server specified by + connection_id. This parameter must be a + valid identifier returned by odbc_connect() or + odbc_pconnect(). +

+ See also: odbc_prepare() and + odbc_execute() for multiple execution of SQL + statements. +


PrevHomeNext
odbc_doUpodbc_execute
\ No newline at end of file diff --git a/function.odbc-execute.html b/function.odbc-execute.html new file mode 100644 index 0000000..a80ee22 --- /dev/null +++ b/function.odbc-execute.html @@ -0,0 +1,195 @@ +odbc_execute
PHP Manual
PrevNext

odbc_execute

(PHP3 >= 3.0.6, PHP4 )

odbc_execute -- Execute a prepared statement

Description

int odbc_execute (int result_id [, array + parameters_array])

Executes a statement prepared with + odbc_prepare(). Returns + true on successful execution, + false otherwise. The array + arameters_array only needs to + be given if you really have parameters in your statement. +


PrevHomeNext
odbc_execUpodbc_fetch_into
\ No newline at end of file diff --git a/function.odbc-fetch-into.html b/function.odbc-fetch-into.html new file mode 100644 index 0000000..3d3a11b --- /dev/null +++ b/function.odbc-fetch-into.html @@ -0,0 +1,185 @@ +odbc_fetch_into
PHP Manual
PrevNext

odbc_fetch_into

(PHP3 >= 3.0.6, PHP4 )

odbc_fetch_into -- Fetch one result row into array

Description

int odbc_fetch_into (int result_id [, int rownumber, array result_array])

Returns the number of columns in the result; + false on error. + result_array must be passed by reference, + but it can be of any type since it will be converted to type + array. The array will contain the column values starting at array + index 0. +


PrevHomeNext
odbc_executeUpodbc_fetch_row
\ No newline at end of file diff --git a/function.odbc-fetch-row.html b/function.odbc-fetch-row.html new file mode 100644 index 0000000..0e859f8 --- /dev/null +++ b/function.odbc-fetch-row.html @@ -0,0 +1,267 @@ +odbc_fetch_row
PHP Manual
PrevNext

odbc_fetch_row

(PHP3 >= 3.0.6, PHP4 )

odbc_fetch_row -- Fetch a row

Description

int odbc_fetch_row (int result_id [, int row_number])

If odbc_fetch_row() was succesful (there was a + row), true is returned. If there are no more + rows, false is returned. +

odbc_fetch_row() fetches a row of the data + that was returned by odbc_do() / + odbc_exec(). After + odbc_fetch_row() is called, the fields of that + row can be accessed with odbc_result(). +

If row_number is not specified, + odbc_fetch_row() will try to fetch the next + row in the result set. Calls to + odbc_fetch_row() with and without + row_number can be mixed. +

To step through the result more than once, you can call + odbc_fetch_row() with + row_number 1, and then continue doing + odbc_fetch_row() without + row_number to review the result. If a + driver doesn't support fetching rows by number, the + row_number parameter is ignored. +


PrevHomeNext
odbc_fetch_intoUpodbc_field_name
\ No newline at end of file diff --git a/function.odbc-field-len.html b/function.odbc-field-len.html new file mode 100644 index 0000000..2fcc326 --- /dev/null +++ b/function.odbc-field-len.html @@ -0,0 +1,187 @@ +odbc_field_len
PHP Manual
PrevNext

odbc_field_len

(PHP3 >= 3.0.6, PHP4 )

odbc_field_len -- Get the length (precision) of a field

Description

int odbc_field_len (int result_id, int field_number)

odbc_field_len() will return the length of + the field referecend by number in the given ODBC result + identifier. Field numbering starts at 1. +

See also: odbc_field_scale() to get the scale of a + floating point number. +


PrevHomeNext
odbc_field_typeUpodbc_field_precision
\ No newline at end of file diff --git a/function.odbc-field-name.html b/function.odbc-field-name.html new file mode 100644 index 0000000..f83560e --- /dev/null +++ b/function.odbc-field-name.html @@ -0,0 +1,181 @@ +odbc_field_name
PHP Manual
PrevNext

odbc_field_name

(PHP3 >= 3.0.6, PHP4 )

odbc_field_name -- Get the columnname

Description

string odbc_field_name (int result_id, int field_number)

odbc_field_name() will return the name of the + field occupying the given column number in the given ODBC result + identifier. Field numbering starts at 1. + false is returned on error. +


PrevHomeNext
odbc_fetch_rowUpodbc_field_num
\ No newline at end of file diff --git a/function.odbc-field-num.html b/function.odbc-field-num.html new file mode 100644 index 0000000..eb4be4a --- /dev/null +++ b/function.odbc-field-num.html @@ -0,0 +1,181 @@ +odbc_field_num
PHP Manual
PrevNext

odbc_field_num

(PHP3 >= 3.0.6, PHP4 )

odbc_field_num -- Return column number

Description

int odbc_field_num (int result_id, string field_name)

odbc_field_num() will return the number of the + column slot that corresponds to the named field in the given ODBC + result identifier. Field numbering starts at 1. + false is returned on error. +


PrevHomeNext
odbc_field_nameUpodbc_field_type
\ No newline at end of file diff --git a/function.odbc-field-precision.html b/function.odbc-field-precision.html new file mode 100644 index 0000000..23fcf52 --- /dev/null +++ b/function.odbc-field-precision.html @@ -0,0 +1,193 @@ +odbc_field_precision
PHP Manual
PrevNext

odbc_field_precision

(PHP4 >= 4.0.0)

odbc_field_precision -- Synonym for odbc_field_len()

Description

string odbc_field_precision (int result_id, int field_number)

odbc_field_precision() will return the precision + of the field referecend by number in the given ODBC result + identifier. +

See also: odbc_field_scale() to get the scale of a + floating point number. +


PrevHomeNext
odbc_field_lenUpodbc_field_scale
\ No newline at end of file diff --git a/function.odbc-field-scale.html b/function.odbc-field-scale.html new file mode 100644 index 0000000..3a8db51 --- /dev/null +++ b/function.odbc-field-scale.html @@ -0,0 +1,180 @@ +odbc_field_scale
PHP Manual
PrevNext

odbc_field_scale

(PHP4 >= 4.0.0)

odbc_field_scale -- Get the scale of a field

Description

string odbc_field_scale (int result_id, int field_number)

odbc_field_precision() will return the scale + of the field referecend by number in the given ODBC result + identifier. +


PrevHomeNext
odbc_field_precisionUpodbc_free_result
\ No newline at end of file diff --git a/function.odbc-field-type.html b/function.odbc-field-type.html new file mode 100644 index 0000000..2503da6 --- /dev/null +++ b/function.odbc-field-type.html @@ -0,0 +1,177 @@ +odbc_field_type
PHP Manual
PrevNext

odbc_field_type

(PHP3 >= 3.0.6, PHP4 )

odbc_field_type -- Datatype of a field

Description

string odbc_field_type (int result_id, int field_number)

odbc_field_type() will return the SQL type of + the field referecend by number in the given ODBC result + identifier. Field numbering starts at 1. +


PrevHomeNext
odbc_field_numUpodbc_field_len
\ No newline at end of file diff --git a/function.odbc-foreignkeys.html b/function.odbc-foreignkeys.html new file mode 100644 index 0000000..b938e23 --- /dev/null +++ b/function.odbc-foreignkeys.html @@ -0,0 +1,303 @@ +odbc_foreignkeys
PHP Manual
PrevNext

odbc_foreignkeys

(PHP4 >= 4.0b4)

odbc_foreignkeys --  + Returns a list of foreign keys in the specified table or a list + of foreign keys in other tables that refer to the primary key in + the specified table +

Description

int odbc_foreignkeys (int connection_id, string pk_qualifier, string pk_owner, string pk_table, string fk_qualifier, string fk_owner, string fk_table)

Odbc_foreignkeys() retrieves information about + foreign keys. Returns an ODBC result identifier or + false on failure. +

The result set has the following columns: +

  • PKTABLE_QUALIFIER

  • PKTABLE_OWNER

  • PKTABLE_NAME

  • PKCOLUMN_NAME

  • FKTABLE_QUALIFIER

  • FKTABLE_OWNER

  • FKTABLE_NAME

  • FKCOLUMN_NAME

  • KEY_SEQ

  • UPDATE_RULE

  • DELETE_RULE

  • FK_NAME

  • PK_NAME

+

If pk_table contains a table name, + odbc_foreignkeys() returns a result set + containing the primary key of the specified table and all of the + foreign keys that refer to it. +

If fk_table contains a table name, + odbc_foreignkeys() returns a result set + containing all of the foreign keys in the specified table and the + primary keys (in other tables) to which they refer. +

If both pk_table and + fk_table contain table names, + odbc_foreignkeys() returns the foreign keys in + the table specified in fk_table that refer + to the primary key of the table specified in + pk_table. This should be one key at most. +


PrevHomeNext
odbc_primarykeysUpodbc_procedures
\ No newline at end of file diff --git a/function.odbc-free-result.html b/function.odbc-free-result.html new file mode 100644 index 0000000..856971b --- /dev/null +++ b/function.odbc-free-result.html @@ -0,0 +1,222 @@ +odbc_free_result
PHP Manual
PrevNext

odbc_free_result

(PHP3 >= 3.0.6, PHP4 )

odbc_free_result -- Free resources associated with a result

Description

int odbc_free_result (int result_id)

Always returns true. +

odbc_free_result() only needs to be called if + you are worried about using too much memory while your script is + running. All result memory will automatically be freed when the + script is finished. But, if you are sure you are not going to + need the result data anymore in a script, you may call + odbc_free_result(), and the memory associated + with result_id will be freed. +

Note: + If auto-commit is disabled (see + odbc_autocommit()) and you call + odbc_free_result() before commiting, all + pending transactions are rolled back. +

+


PrevHomeNext
odbc_field_scaleUpodbc_longreadlen
\ No newline at end of file diff --git a/function.odbc-gettypeinfo.html b/function.odbc-gettypeinfo.html new file mode 100644 index 0000000..373cf4e --- /dev/null +++ b/function.odbc-gettypeinfo.html @@ -0,0 +1,258 @@ +odbc_gettypeinfo
PHP Manual
PrevNext

odbc_gettypeinfo

(PHP4 >= 4.0b4)

odbc_gettypeinfo --  + Returns a result identifier containing information about data + types supported by the data source. +

Description

int odbc_gettypeinfo (int connection_id [, int data_type])

Retrieves information about data types supported by the data + source. Returns an ODBC result identifier or + false on failure. The optional argument + data_type can be used to restrict the + information to a single data type. +

The result set has the following columns: +

  • TYPE_NAME

  • DATA_TYPE

  • PRECISION

  • LITERAL_PREFIX

  • LITERAL_SUFFIX

  • CREATE_PARAMS

  • NULLABLE

  • CASE_SENSITIVE

  • SEARCHABLE

  • UNSIGNED_ATTRIBUTE

  • MONEY

  • AUTO_INCREMENT

  • LOCAL_TYPE_NAME

  • MINIMUM_SCALE

  • MAXIMUM_SCALE

+

The result set is ordered by DATA_TYPE and TYPE_NAME. +


PrevHomeNext
odbc_columnprivilegesUpodbc_primarykeys
\ No newline at end of file diff --git a/function.odbc-longreadlen.html b/function.odbc-longreadlen.html new file mode 100644 index 0000000..23e0bc0 --- /dev/null +++ b/function.odbc-longreadlen.html @@ -0,0 +1,194 @@ +odbc_longreadlen
PHP Manual
PrevNext

odbc_longreadlen

(PHP3 >= 3.0.6, PHP4 )

odbc_longreadlen -- Handling of LONG columns

Description

int odbc_longreadlen (int result_id, int length)

(ODBC SQL types affected: LONG, LONGVARBINARY) The number of + bytes returned to PHP is controled by the parameter length. If it + is set to 0, Long column data is passed thru to the + client. +

Note: + Handling of LONGVARBINARY columns is also affected by + odbc_binmode(). +


PrevHomeNext
odbc_free_resultUpodbc_num_fields
\ No newline at end of file diff --git a/function.odbc-num-fields.html b/function.odbc-num-fields.html new file mode 100644 index 0000000..cb7d5d5 --- /dev/null +++ b/function.odbc-num-fields.html @@ -0,0 +1,184 @@ +odbc_num_fields
PHP Manual
PrevNext

odbc_num_fields

(PHP3 >= 3.0.6, PHP4 )

odbc_num_fields -- Number of columns in a result

Description

int odbc_num_fields (int result_id)

Odbc_num_fields() will return the number of + fields (columns) in an ODBC result. This function will return -1 + on error. The argument is a valid result identifier returned by + odbc_exec(). +


PrevHomeNext
odbc_longreadlenUpodbc_pconnect
\ No newline at end of file diff --git a/function.odbc-num-rows.html b/function.odbc-num-rows.html new file mode 100644 index 0000000..f31b2af --- /dev/null +++ b/function.odbc-num-rows.html @@ -0,0 +1,194 @@ +odbc_num_rows
PHP Manual
PrevNext

odbc_num_rows

(PHP3 >= 3.0.6, PHP4 )

odbc_num_rows -- Number of rows in a result

Description

int odbc_num_rows (int result_id)

odbc_num_rows() will return the number of rows + in an ODBC result. This function will return -1 on error. For + INSERT, UPDATE and DELETE statements + odbc_num_rows() returns the number of rows + affected. For a SELECT clause this can be + the number of rows available. +

Note: Using odbc_num_rows() to determine the + number of rows available after a SELECT will return -1 with many + drivers. +


PrevHomeNext
odbc_prepareUpodbc_result
\ No newline at end of file diff --git a/function.odbc-pconnect.html b/function.odbc-pconnect.html new file mode 100644 index 0000000..6330cf1 --- /dev/null +++ b/function.odbc-pconnect.html @@ -0,0 +1,240 @@ +odbc_pconnect
PHP Manual
PrevNext

odbc_pconnect

(PHP3 >= 3.0.6, PHP4 )

odbc_pconnect -- Open a persistent database connection

Description

int odbc_pconnect (string dsn, string user, string password [, int cursor_type])

Returns an ODBC connection id or 0 (false) on + error. This function is much like + odbc_connect(), except that the connection is + not really closed when the script has finished. Future requests + for a connection with the same dsn, + user, password + combination (via odbc_connect() and + odbc_pconnect()) can reuse the persistent + connection. +

Note: + Persistent connections have no effect if PHP is used as a CGI + program. +

+

For information about the optional cursor_type parameter see the + odbc_connect() function. For more information + on persistent connections, refer to the PHP FAQ. +


PrevHomeNext
odbc_num_fieldsUpodbc_prepare
\ No newline at end of file diff --git a/function.odbc-prepare.html b/function.odbc-prepare.html new file mode 100644 index 0000000..c3a275f --- /dev/null +++ b/function.odbc-prepare.html @@ -0,0 +1,186 @@ +odbc_prepare
PHP Manual
PrevNext

odbc_prepare

(PHP3 >= 3.0.6, PHP4 )

odbc_prepare -- Prepares a statement for execution

Description

int odbc_prepare (int connection_id, string query_string)

Returns false on error. +

Returns an ODBC result identifier if the SQL command was prepared + successfully. The result identifier can be used later to execute + the statement with odbc_execute(). +


PrevHomeNext
odbc_pconnectUpodbc_num_rows
\ No newline at end of file diff --git a/function.odbc-primarykeys.html b/function.odbc-primarykeys.html new file mode 100644 index 0000000..c38a750 --- /dev/null +++ b/function.odbc-primarykeys.html @@ -0,0 +1,212 @@ +odbc_primarykeys
PHP Manual
PrevNext

odbc_primarykeys

(PHP4 >= 4.0b4)

odbc_primarykeys --  + Returns a result identifier that can be used to fetch the column + names that comprise the primary key for a table +

Description

int odbc_primarykeys (int connection_id, string qualifier, string owner, string table)

Returns the column names that comprise the primary key for a + table. Returns an ODBC result identifier or + false on failure. +

The result set has the following columns: +

  • TABLE_QUALIFIER

  • TABLE_OWNER

  • TABLE_NAME

  • COLUMN_NAME

  • KEY_SEQ

  • PK_NAME

+


PrevHomeNext
odbc_gettypeinfoUpodbc_foreignkeys
\ No newline at end of file diff --git a/function.odbc-procedurecolumns.html b/function.odbc-procedurecolumns.html new file mode 100644 index 0000000..f342506 --- /dev/null +++ b/function.odbc-procedurecolumns.html @@ -0,0 +1,264 @@ +odbc_procedurecolumns
PHP Manual
PrevNext

odbc_procedurecolumns

(PHP4 >= 4.0b4)

odbc_procedurecolumns --  + Retrieve information about parameters to procedures +

Description

int odbc_procedurecolumns (int connection_id [, string qualifier [, string owner [, string proc [, string column]]]])

Returns the list of input and output parameters, as well as the + columns that make up the result set for the specified procedures. Returns + an ODBC result identifier or false on failure. +

The result set has the following columns: +

  • PROCEDURE_QUALIFIER

  • PROCEDURE_OWNER

  • PROCEDURE_NAME

  • COLUMN_NAME

  • COLUMN_TYPE

  • DATA_TYPE

  • TYPE_NAME

  • PRECISION

  • LENGTH

  • SCALE

  • RADIX

  • NULLABLE

  • REMARKS

+

The result set is ordered by PROCEDURE_QUALIFIER, PROCEDURE_OWNER, + PROCEDURE_NAME and COLUMN_TYPE. +

The owner, proc and + column arguments accept search patterns + ('%' to match zero or more characters and '_' to match a single + character). +


PrevHomeNext
odbc_proceduresUpodbc_specialcolumns
\ No newline at end of file diff --git a/function.odbc-procedures.html b/function.odbc-procedures.html new file mode 100644 index 0000000..aea4e89 --- /dev/null +++ b/function.odbc-procedures.html @@ -0,0 +1,235 @@ +odbc_procedures
PHP Manual
PrevNext

odbc_procedures

(PHP4 >= 4.0b4)

odbc_procedures --  + Get the list of procedures stored in a specific data source. + Returns a result identifier containing the information. +

Description

int odbc_procedures (int connection_id [, string qualifier [, string owner [, string name]]])

+ Lists all procedures in the requested range. Returns an ODBC + result identifier or false on failure. +

The result set has the following columns: +

  • PROCEDURE_QUALIFIER

  • PROCEDURE_OWNER

  • PROCEDURE_NAME

  • NUM_INPUT_PARAMS

  • NUM_OUTPUT_PARAMS

  • NUM_RESULT_SETS

  • REMARKS

  • PROCEDURE_TYPE

+

The owner and name + arguments accept search patterns ('%' to match zero or more + characters and '_' to match a single character). +


PrevHomeNext
odbc_foreignkeysUpodbc_procedurecolumns
\ No newline at end of file diff --git a/function.odbc-result-all.html b/function.odbc-result-all.html new file mode 100644 index 0000000..b8af2f0 --- /dev/null +++ b/function.odbc-result-all.html @@ -0,0 +1,197 @@ +odbc_result_all
PHP Manual
PrevNext

odbc_result_all

(PHP3 >= 3.0.6, PHP4 )

odbc_result_all -- Print result as HTML table

Description

int odbc_result_all (int result_id [, string format])

Returns the number of rows in the result or + false on error. +

Odbc_result_all() will print all rows from a + result identifier produced by odbc_exec(). The + result is printed in HTML table format. With the optional string + argument format, additional overall table + formatting can be done. +


PrevHomeNext
odbc_resultUpodbc_rollback
\ No newline at end of file diff --git a/function.odbc-result.html b/function.odbc-result.html new file mode 100644 index 0000000..67ec9c9 --- /dev/null +++ b/function.odbc-result.html @@ -0,0 +1,242 @@ +odbc_result
PHP Manual
PrevNext

odbc_result

(PHP3 >= 3.0.6, PHP4 )

odbc_result -- Get result data

Description

string odbc_result (int result_id, mixed field)

Returns the contents of the field. +

field can either be an integer containing + the column number of the field you want; or it can be a string + containing the name of the field. For example: +


$item_3 = odbc_result ($Query_ID, 3);
+$item_val = odbc_result ($Query_ID, "val");
+      

+

The first call to odbc_result() returns the + value of the third field in the current record of the query + result. The second function call to + odbc_result() returns the value of the field + whose field name is "val" in the current record of the query + result. An error occurs if a column number parameter for a field + is less than one or exceeds the number of columns (or fields) in + the current record. Similarly, an error occurs if a field with a + name that is not one of the fieldnames of the table(s) that + is(are) being queried. +

Field indices start from 1. Regarding the way binary or + long column data is returned refer to odbc_binmode + () and odbc_longreadlen(). + + + +


PrevHomeNext
odbc_num_rowsUpodbc_result_all
\ No newline at end of file diff --git a/function.odbc-rollback.html b/function.odbc-rollback.html new file mode 100644 index 0000000..ccb247d --- /dev/null +++ b/function.odbc-rollback.html @@ -0,0 +1,186 @@ +odbc_rollback
PHP Manual
PrevNext

odbc_rollback

(PHP3 >= 3.0.6, PHP4 )

odbc_rollback -- Rollback a transaction

Description

int odbc_rollback (int connection_id)

Rolls back all pending statements on + connection_id. Returns + true on success, false on + failure. +


PrevHomeNext
odbc_result_allUpodbc_setoption
\ No newline at end of file diff --git a/function.odbc-setoption.html b/function.odbc-setoption.html new file mode 100644 index 0000000..c6b1158 --- /dev/null +++ b/function.odbc-setoption.html @@ -0,0 +1,281 @@ +odbc_setoption
PHP Manual
PrevNext

odbc_setoption

(PHP3 >= 3.0.6, PHP4 )

odbc_setoption --  + Adjust ODBC settings. Returns false if an error occurs, otherwise + true. +

Description

int odbc_setoption (int id, int function, int option, int param)

This function allows fiddling with the ODBC options for a + particular connection or query result. It was written to help + find work arounds to problems in quirky ODBC drivers. You should + probably only use this function if you are an ODBC programmer and + understand the effects the various options will have. You will + certainly need a good ODBC reference to explain all the different + options and values that can be used. Different driver versions + support different options. +

Because the effects may vary depending on the ODBC driver, use of + this function in scripts to be made publicly available is + strongly discouraged. Also, some ODBC options are not available + to this function because they must be set before the connection + is established or the query is prepared. However, if on a + particular job it can make PHP work so your boss doesn't tell you + to use a commercial product, that's all that really + matters. +

ID is a connection id or result id on + which to change the settings.For SQLSetConnectOption(), this is a + connection id. For SQLSetStmtOption(), this is a result + id. +

Function is the ODBC function to use. The + value should be 1 for SQLSetConnectOption() and 2 for + SQLSetStmtOption(). +

Parameter option is the option to set.

Parameter param is the value for the + given option. +

Example 1. ODBC Setoption Examples


// 1. Option 102 of SQLSetConnectOption() is SQL_AUTOCOMMIT.
+//    Value 1 of SQL_AUTOCOMMIT is SQL_AUTOCOMMIT_ON.
+//    This example has the same effect as
+//    odbc_autocommit($conn, true);
+
+odbc_setoption ($conn, 1, 102, 1);
+
+// 2. Option 0 of SQLSetStmtOption() is SQL_QUERY_TIMEOUT.
+//    This example sets the query to timeout after 30 seconds.
+
+$result = odbc_prepare ($conn, $sql);
+odbc_setoption ($result, 2, 0, 30);
+odbc_execute ($result);
+      
+


PrevHomeNext
odbc_rollbackUpodbc_tables
\ No newline at end of file diff --git a/function.odbc-specialcolumns.html b/function.odbc-specialcolumns.html new file mode 100644 index 0000000..3377f67 --- /dev/null +++ b/function.odbc-specialcolumns.html @@ -0,0 +1,241 @@ +odbc_specialcolumns
PHP Manual
PrevNext

odbc_specialcolumns

(PHP4 >= 4.0b4)

odbc_specialcolumns --  + Returns either the optimal set of columns that uniquely + identifies a row in the table or columns that are automatically + updated when any value in the row is updated by a transaction +

Description

int odbc_specialcolumns (int connection_id, int type, string qualifier, string owner, string table, int scope, int nullable)

When the type argument is SQL_BEST_ROWID, + odbc_specialcolumns() returns the + column or columns that uniquely identify each row in the table. +

When the type argument is SQL_ROWVER, + odbc_specialcolumns() returns the + optimal column or set of columns that, by retrieving values from + the column or columns, allows any row in the specified table to be + uniquely identified. +

Returns an ODBC result identifier or false on + failure. +

The result set has the following columns: +

  • SCOPE

  • COLUMN_NAME

  • DATA_TYPE

  • TYPE_NAME

  • PRECISION

  • LENGTH

  • SCALE

  • PSEUDO_COLUMN

+

The result set is ordered by SCOPE. +


PrevHomeNext
odbc_procedurecolumnsUpodbc_statistics
\ No newline at end of file diff --git a/function.odbc-statistics.html b/function.odbc-statistics.html new file mode 100644 index 0000000..c6eb980 --- /dev/null +++ b/function.odbc-statistics.html @@ -0,0 +1,240 @@ +odbc_statistics
PHP Manual
PrevNext

odbc_statistics

(PHP4 >= 4.0b4)

odbc_statistics -- Retrieve statistics about a table

Description

int odbc_statistics (int connection_id, string qualifier, string owner, string table_name, int unique, int accuracy)

Get statistics about a table and it's indexes. Returns an ODBC + result identifier or false on failure. +

The result set has the following columns: +

  • TABLE_QUALIFIER

  • TABLE_OWNER

  • TABLE_NAME

  • NON_UNIQUE

  • INDEX_QUALIFIER

  • INDEX_NAME

  • TYPE

  • SEQ_IN_INDEX

  • COLUMN_NAME

  • COLLATION

  • CARDINALITY

  • PAGES

  • FILTER_CONDITION

+

The result set is ordered by NON_UNIQUE, TYPE, INDEX_QUALIFIER, + INDEX_NAME and SEQ_IN_INDEX. +


PrevHomeNext
odbc_specialcolumnsUpOracle 8 functions
\ No newline at end of file diff --git a/function.odbc-tableprivileges.html b/function.odbc-tableprivileges.html new file mode 100644 index 0000000..a0c7244 --- /dev/null +++ b/function.odbc-tableprivileges.html @@ -0,0 +1,234 @@ +odbc_tableprivileges
PHP Manual
PrevNext

odbc_tableprivileges

(PHP4 >= 4.0b4)

odbc_tableprivileges --  + Lists tables and the privileges associated with each table +

Description

int odbc_tableprivileges (int connection_id [, string qualifier [, string owner [, string name]]])

Lists tables in the requested range and the privileges associated + with each table. Returns an ODBC result identifier or + false on failure. +

The result set has the following columns: +

  • TABLE_QUALIFIER

  • TABLE_OWNER

  • TABLE_NAME

  • GRANTOR

  • GRANTEE

  • PRIVILEGE

  • IS_GRANTABLE

+

The result set is ordered by TABLE_QUALIFIER, TABLE_OWNER and + TABLE_NAME. +

The owner and name + arguments accept search patterns ('%' to match zero or more + characters and '_' to match a single character). +


PrevHomeNext
odbc_tablesUpodbc_columns
\ No newline at end of file diff --git a/function.odbc-tables.html b/function.odbc-tables.html new file mode 100644 index 0000000..2ad609c --- /dev/null +++ b/function.odbc-tables.html @@ -0,0 +1,366 @@ +odbc_tables
PHP Manual
PrevNext

odbc_tables

(PHP4 >= 4.0b4)

odbc_tables --  + Get the list of table names stored in a specific data source. + Returns a result identifier containing the + information. +

Description

int odbc_tables (int connection_id [, string qualifier [, string owner [, string name [, string types]]]])

Lists all tables in the requested range. Returns an ODBC result + identifier or false on failure. +

The result set has the following columns: +

  • TABLE_QUALIFIER

  • TABLE_OWNER

  • TABLE_NAME

  • TABLE_TYPE

  • REMARKS

+

The result set is ordered by TABLE_TYPE, TABLE_QUALIFIER, + TABLE_OWNER and TABLE_NAME. +

The owner and name + arguments accept search patterns ('%' to match zero or more + characters and '_' to match a single character). +

To support enumeration of qualifiers, owners, and table types, + the following special semantics for the + qualifier, owner, + name, and + table_type are available: +

  • If qualifier is a single percent + character (%) and owner and + name are empty strings, then the result + set contains a list of valid qualifiers for the data + source. (All columns except the TABLE_QUALIFIER column contain + NULLs.) +

  • If owner is a single percent character + (%) and qualifier and + name are empty strings, then the result + set contains a list of valid owners for the data source. (All + columns except the TABLE_OWNER column contain + NULLs.) +

  • If table_type is a single percent + character (%) and qualifier, + owner and name + are empty strings, then the result set contains a list of + valid table types for the data source. (All columns except the + TABLE_TYPE column contain NULLs.) +

+

If table_type is not an empty string, it + must contain a list of comma-separated values for the types of + interest; each value may be enclosed in single quotes (') or + unquoted. For example, "'TABLE','VIEW'" or "TABLE, VIEW". If the + data source does not support a specified table type, + odbc_tables() does not return any results for + that type. +

See also odbc_tableprivileges() to retrieve + associated privileges. +


PrevHomeNext
odbc_setoptionUpodbc_tableprivileges
\ No newline at end of file diff --git a/function.opendir.html b/function.opendir.html new file mode 100644 index 0000000..2764594 --- /dev/null +++ b/function.opendir.html @@ -0,0 +1,193 @@ +opendir
PHP Manual
PrevNext

opendir

(PHP3 , PHP4 )

opendir -- open directory handle

Description

int opendir (string path)

+ Returns a directory handle to be used in subsequent + closedir(), readdir(), and + rewinddir() calls. +


PrevHomeNext
getcwdUpreaddir
\ No newline at end of file diff --git a/function.openlog.html b/function.openlog.html new file mode 100644 index 0000000..89fe1e3 --- /dev/null +++ b/function.openlog.html @@ -0,0 +1,505 @@ +openlog
PHP Manual
PrevNext

openlog

(PHP3 , PHP4 )

openlog -- Open connection to system logger

Description

int openlog (string ident, int option, int facility)

Openlog() opens a connection to the system + logger for a program. The string ident is + added to each message. Values for option + and facility are given below. + The option argument is used to indicate + what loggin options will be used when generating a log message. + The facility argument is used to specify what + type of program is logging the message. This allows you to specify + (in your machine's syslog configuration) how messages coming from + different facilities will be handled. + The use of openlog() is optional. It + will automatically be called by syslog() if + necessary, in which case ident will default + to false. +

Table 1. Openlog() Options

ConstantDescription
LOG_CONS if there is an error while sending data to the system logger, + write directly to the system console +
LOG_NDELAY open the connection to the logger immediately +
LOG_ODELAY (default) delay openning the connection until the first + message is logged +
LOG_PERRORprint log message also to standard error
LOG_PIDinclude PID with each message
+ You can use one or more of this options. When using multiple options + you need to OR them, i.e. to open the connection + immediately, write to the consoloe and include the PID in each message, + you will use: LOG_CONS | LOG_NDELAY | LOG_PID +

Table 2. Openlog() Facilities

ConstantDescription
LOG_AUTH security/authorization messages (use LOG_AUTHPRIV instead + in systems where that constant is defined) +
LOG_AUTHPRIVsecurity/authorization messages (private)
LOG_CRONclock daemon (cron and at)
LOG_DAEMONother system daemons
LOG_KERNkernel messages
LOG_LOCAL0 ... LOG_LOCAL7reserved for local use
LOG_LPRline printer subsystem
LOG_MAILmail subsystem
LOG_NEWSUSENET news subsystem
LOG_SYSLOGmessages generated internally by syslogd
LOG_USERgeneric user-level messages
LOG_UUCPUUCP subsystem
+

See also define_syslog_variables(), + syslog() and + closelog(). +


PrevHomeNext
long2ipUppfsockopen
\ No newline at end of file diff --git a/function.ora-bind.html b/function.ora-bind.html new file mode 100644 index 0000000..d70a831 --- /dev/null +++ b/function.ora-bind.html @@ -0,0 +1,252 @@ +Ora_Bind
PHP Manual
PrevNext

Ora_Bind

(PHP3 , PHP4 )

Ora_Bind -- bind a PHP variable to an Oracle parameter

Description

int ora_bind (int cursor, string PHP variable name, string SQL parameter name, int length [, int type])

Returns true if the bind succeeds, otherwise false. Details + about the error can be retrieved using the + ora_error() and + ora_errorcode() functions. +

This function binds the named PHP variable with a SQL parameter. + The SQL parameter must be in the form ":name". With the optional + type parameter, you can define whether the SQL parameter is an + in/out (0, default), in (1) or out (2) parameter. As of PHP + 3.0.1, you can use the constants ORA_BIND_INOUT, ORA_BIND_IN and + ORA_BIND_OUT instead of the numbers. +

ora_bind must be called after ora_parse() and + before ora_exec(). Input values can be given + by assignment to the bound PHP variables, after calling + ora_exec() the bound PHP variables contain the output + values if available. +


<?php
+ora_parse($curs, "declare tmp INTEGER; begin tmp := :in; :out := tmp; :x := 7.77; end;");
+ora_bind($curs, "result", ":x", $len, 2);
+ora_bind($curs, "input", ":in", 5, 1);
+ora_bind($curs, "output", ":out", 5, 2);
+$input = 765;
+ora_exec($curs);
+echo "Result: $result<BR>Out: $output<BR>In: $input";
+?>
+      

+


PrevHomeNext
Oracle functionsUpOra_Close
\ No newline at end of file diff --git a/function.ora-close.html b/function.ora-close.html new file mode 100644 index 0000000..ab15101 --- /dev/null +++ b/function.ora-close.html @@ -0,0 +1,197 @@ +Ora_Close
PHP Manual
PrevNext

Ora_Close

(PHP3 , PHP4 )

Ora_Close -- close an Oracle cursor

Description

int ora_close (int cursor)

Returns true if the close succeeds, otherwise false. Details + about the error can be retrieved using the + ora_error() and + ora_errorcode() functions. +

This function closes a data cursor opened with + ora_open(). +


PrevHomeNext
Ora_BindUpOra_ColumnName
\ No newline at end of file diff --git a/function.ora-columnname.html b/function.ora-columnname.html new file mode 100644 index 0000000..d8af0bc --- /dev/null +++ b/function.ora-columnname.html @@ -0,0 +1,185 @@ +Ora_ColumnName
PHP Manual
PrevNext

Ora_ColumnName

(PHP3 , PHP4 )

Ora_ColumnName -- get name of Oracle result column

Description

string Ora_ColumnName (int cursor, int column)

Returns the name of the field/column + column on the cursor + cursor. The returned name is in all + uppercase letters. +


PrevHomeNext
Ora_CloseUpOra_ColumnSize
\ No newline at end of file diff --git a/function.ora-columnsize.html b/function.ora-columnsize.html new file mode 100644 index 0000000..5f400c6 --- /dev/null +++ b/function.ora-columnsize.html @@ -0,0 +1,184 @@ +Ora_ColumnSize
PHP Manual
PrevNext

Ora_ColumnSize

(PHP3 , PHP4 )

Ora_ColumnSize -- get size of Oracle result column

Description

int Ora_ColumnSize (int cursor, int column)

Returns the size of the Oracle column + column on the cursor + cursor. +


PrevHomeNext
Ora_ColumnNameUpOra_ColumnType
\ No newline at end of file diff --git a/function.ora-columntype.html b/function.ora-columntype.html new file mode 100644 index 0000000..0112ff2 --- /dev/null +++ b/function.ora-columntype.html @@ -0,0 +1,258 @@ +Ora_ColumnType
PHP Manual
PrevNext

Ora_ColumnType

(PHP3 , PHP4 )

Ora_ColumnType -- get type of Oracle result column

Description

string Ora_ColumnType (int cursor, int column)

Returns the Oracle data type name of the field/column + column on the cursor + cursor. The returned type will be one of + the following: +

"VARCHAR2"
"VARCHAR"
"CHAR"
"NUMBER"
"LONG"
"LONG RAW"
"ROWID"
"DATE"
"CURSOR"

+


PrevHomeNext
Ora_ColumnSizeUpOra_Commit
\ No newline at end of file diff --git a/function.ora-commit.html b/function.ora-commit.html new file mode 100644 index 0000000..7e015df --- /dev/null +++ b/function.ora-commit.html @@ -0,0 +1,191 @@ +Ora_Commit
PHP Manual
PrevNext

Ora_Commit

(PHP3 , PHP4 )

Ora_Commit -- commit an Oracle transaction

Description

int ora_commit (int conn)

Returns true on success, false on error. Details about the + error can be retrieved using the ora_error() + and ora_errorcode() functions. +

This function commits an Oracle transaction. A transaction is defined as + all the changes on a given connection since the last commit/rollback, + autocommit was turned off or when the connection was established. +


PrevHomeNext
Ora_ColumnTypeUpOra_CommitOff
\ No newline at end of file diff --git a/function.ora-commitoff.html b/function.ora-commitoff.html new file mode 100644 index 0000000..2ffeff4 --- /dev/null +++ b/function.ora-commitoff.html @@ -0,0 +1,196 @@ +Ora_CommitOff
PHP Manual
PrevNext

Ora_CommitOff

(PHP3 , PHP4 )

Ora_CommitOff -- disable automatic commit

Description

int ora_commitoff (int conn)

Returns true on success, false on error. Details about the error + can be retrieved using the ora_error() and + ora_errorcode() functions. +

This function turns off automatic commit after each + ora_exec(). +


PrevHomeNext
Ora_CommitUpOra_CommitOn
\ No newline at end of file diff --git a/function.ora-commiton.html b/function.ora-commiton.html new file mode 100644 index 0000000..eb54e53 --- /dev/null +++ b/function.ora-commiton.html @@ -0,0 +1,196 @@ +Ora_CommitOn
PHP Manual
PrevNext

Ora_CommitOn

(PHP3 , PHP4 )

Ora_CommitOn -- enable automatic commit

Description

int ora_commiton (int conn)

This function turns on automatic commit after each + ora_exec() on the given connection. +

Returns true on success, false on error. Details about the error + can be retrieved using the ora_error() and + ora_errorcode() functions. +


PrevHomeNext
Ora_CommitOffUpOra_Do
\ No newline at end of file diff --git a/function.ora-do.html b/function.ora-do.html new file mode 100644 index 0000000..5ccee55 --- /dev/null +++ b/function.ora-do.html @@ -0,0 +1,231 @@ +Ora_Do
PHP Manual
PrevNext

Ora_Do

(PHP3 , PHP4 )

Ora_Do -- Parse, Exec, Fetch

Description

int ora_do (int conn, string query)

This function is quick combination of ora_parse(), + ora_exec() and ora_fetch(). + It will parse and execute a statement, then fetch the first result row. +

Returns true on success, false on error. Details about the error + can be retrieved using the ora_error() and + ora_errorcode() functions. +

See also ora_parse(),ora_exec(), + and ora_fetch(). +


PrevHomeNext
Ora_CommitOnUpOra_Error
\ No newline at end of file diff --git a/function.ora-error.html b/function.ora-error.html new file mode 100644 index 0000000..6c4a250 --- /dev/null +++ b/function.ora-error.html @@ -0,0 +1,237 @@ +Ora_Error
PHP Manual
PrevNext

Ora_Error

(PHP3 , PHP4 )

Ora_Error -- get Oracle error message

Description

string Ora_Error (int cursor_or_connection)

Returns an error message of the form + XXX-NNNNN + where XXX is where the error comes + from and NNNNN identifies the error + message. +

Note: Support for connection ids was added in 3.0.4.

+

On UNIX versions of Oracle, you can find details about an error + message like this: + $ oerr ora +00001 00001, 00000, +"unique constraint (%s.%s) violated" // *Cause: An update or insert +statement attempted to insert a duplicate key // For Trusted +ORACLE configured in DBMS MAC mode, you may see // this message +if a duplicate entry exists at a different level. // *Action: Either +remove the unique restriction or do not insert the key + +


PrevHomeNext
Ora_DoUpOra_ErrorCode
\ No newline at end of file diff --git a/function.ora-errorcode.html b/function.ora-errorcode.html new file mode 100644 index 0000000..46e6019 --- /dev/null +++ b/function.ora-errorcode.html @@ -0,0 +1,185 @@ +Ora_ErrorCode
PHP Manual
PrevNext

Ora_ErrorCode

(PHP3 , PHP4 )

Ora_ErrorCode -- get Oracle error code

Description

int Ora_ErrorCode (int cursor_or_connection)

Returns the numeric error code of the last executed statement on + the specified cursor or connection. + +

Note: Support for connection ids was added in 3.0.4.

+


PrevHomeNext
Ora_ErrorUpOra_Exec
\ No newline at end of file diff --git a/function.ora-exec.html b/function.ora-exec.html new file mode 100644 index 0000000..4136bf9 --- /dev/null +++ b/function.ora-exec.html @@ -0,0 +1,208 @@ +Ora_Exec
PHP Manual
PrevNext

Ora_Exec

(PHP3 , PHP4 )

Ora_Exec -- execute parsed statement on an Oracle cursor

Description

int ora_exec (int cursor)

Returns true on success, false on error. Details about the error + can be retrieved using the ora_error() and + ora_errorcode() functions. +

See also ora_parse(), + ora_fetch(), and ora_do(). +


PrevHomeNext
Ora_ErrorCodeUpOra_Fetch
\ No newline at end of file diff --git a/function.ora-fetch-into.html b/function.ora-fetch-into.html new file mode 100644 index 0000000..ca3b58e --- /dev/null +++ b/function.ora-fetch-into.html @@ -0,0 +1,242 @@ +Ora_Fetch_Into
PHP Manual
PrevNext

Ora_Fetch_Into

(PHP3 , PHP4 )

Ora_Fetch_Into -- Fetch a row into the specified result array

Description

int ora_fetch_into (int cursor, array result [, int + flags])

You can fetch a row into an array with this function. +

Example 1. Oracle fetch into array


<?php
+array($results);
+ora_fetch_into($cursor, &$results);
+echo $results[0];
+echo $results[1];
+?>
+      
+ Note that you need to fetch the array by reference. +

See also ora_parse(),ora_exec(), + ora_fetch(), and ora_do(). +


PrevHomeNext
Ora_FetchUpOra_GetColumn
\ No newline at end of file diff --git a/function.ora-fetch.html b/function.ora-fetch.html new file mode 100644 index 0000000..9908057 --- /dev/null +++ b/function.ora-fetch.html @@ -0,0 +1,219 @@ +Ora_Fetch
PHP Manual
PrevNext

Ora_Fetch

(PHP3 , PHP4 )

Ora_Fetch -- fetch a row of data from a cursor

Description

int ora_fetch (int cursor)

Returns true (a row was fetched) or false (no more rows, or an + error occured). If an error occured, details can be retrieved + using the ora_error() and + ora_errorcode() functions. If there was no + error, ora_errorcode() will return 0. +

Retrieves a row of data from the specified cursor. +

See also ora_parse(),ora_exec(), + and ora_do(). +


PrevHomeNext
Ora_ExecUpOra_Fetch_Into
\ No newline at end of file diff --git a/function.ora-getcolumn.html b/function.ora-getcolumn.html new file mode 100644 index 0000000..34b79af --- /dev/null +++ b/function.ora-getcolumn.html @@ -0,0 +1,186 @@ +Ora_GetColumn
PHP Manual
PrevNext

Ora_GetColumn

(PHP3 , PHP4 )

Ora_GetColumn -- get data from a fetched column

Description

mixed ora_getcolumn (int cursor, mixed column)

Returns the column data. If an error occurs, False is returned + and ora_errorcode() + will return a non-zero value. Note, however, that a test for False + on the results from this function may be true in cases where there is + not error as well (NULL result, empty string, the number 0, the + string "0"). +

Fetches the data for a column or function result. +


PrevHomeNext
Ora_Fetch_IntoUpOra_Logoff
\ No newline at end of file diff --git a/function.ora-logoff.html b/function.ora-logoff.html new file mode 100644 index 0000000..c98c5a2 --- /dev/null +++ b/function.ora-logoff.html @@ -0,0 +1,198 @@ +Ora_Logoff
PHP Manual
PrevNext

Ora_Logoff

(PHP3 , PHP4 )

Ora_Logoff -- close an Oracle connection

Description

int ora_logoff (int connection)

Returns true on success, false on error. Details about the error + can be retrieved using the ora_error() and + ora_errorcode() functions. +

Logs out the user and disconnects from the server. +

See also ora_logon(). +


PrevHomeNext
Ora_GetColumnUpOra_Logon
\ No newline at end of file diff --git a/function.ora-logon.html b/function.ora-logon.html new file mode 100644 index 0000000..223796d --- /dev/null +++ b/function.ora-logon.html @@ -0,0 +1,243 @@ +Ora_Logon
PHP Manual
PrevNext

Ora_Logon

(PHP3 , PHP4 )

Ora_Logon -- open an Oracle connection

Description

int ora_logon (string user, string password)

Establishes a connection between PHP and an Oracle database with the + given username and password. +

Connections can be made using SQL*Net + by supplying the TNS name to + user like this: +


$conn = Ora_Logon("user@TNSNAME", "pass");
+

+

If you have character data with non-ASCII characters, you should + make sure that NLS_LANG is set in your + environment. For server modules, you should set it in the + server's environment before starting the server. +

Returns a connection index on success, or false on failure. + Details about the error can be retrieved using the + ora_error() and ora_errorcode() + functions. +


PrevHomeNext
Ora_LogoffUpOra_pLogon
\ No newline at end of file diff --git a/function.ora-numcols.html b/function.ora-numcols.html new file mode 100644 index 0000000..c9c268e --- /dev/null +++ b/function.ora-numcols.html @@ -0,0 +1,204 @@ +Ora_Numcols
PHP Manual
PrevNext

Ora_Numcols

(PHP3 , PHP4 )

Ora_Numcols -- Returns the number of columns

Description

int ora_numcols (int cursor_ind)

ora_numcols() returns the number of columns in a result. + Only returns meaningful values after an parse/exec/fetch sequence. +

See also ora_parse(),ora_exec(), + ora_fetch(), and ora_do(). +


PrevHomeNext
Ora_pLogonUpOra_Numrows
\ No newline at end of file diff --git a/function.ora-numrows.html b/function.ora-numrows.html new file mode 100644 index 0000000..84b8705 --- /dev/null +++ b/function.ora-numrows.html @@ -0,0 +1,175 @@ +Ora_Numrows
PHP Manual
PrevNext

Ora_Numrows

(PHP3 , PHP4 )

Ora_Numrows -- Returns the number of rows

Description

int ora_numrows (int cursor_ind)

ora_numrows() returns the number of rows in a result. +


PrevHomeNext
Ora_NumcolsUpOra_Open
\ No newline at end of file diff --git a/function.ora-open.html b/function.ora-open.html new file mode 100644 index 0000000..dbb2a33 --- /dev/null +++ b/function.ora-open.html @@ -0,0 +1,189 @@ +Ora_Open
PHP Manual
PrevNext

Ora_Open

(PHP3 , PHP4 )

Ora_Open -- open an Oracle cursor

Description

int ora_open (int connection)

Opens an Oracle cursor associated with connection. +

Returns a cursor index or False on failure. Details about the + error can be retrieved using the ora_error() + and ora_errorcode() functions. +


PrevHomeNext
Ora_NumrowsUpOra_Parse
\ No newline at end of file diff --git a/function.ora-parse.html b/function.ora-parse.html new file mode 100644 index 0000000..6bf794a --- /dev/null +++ b/function.ora-parse.html @@ -0,0 +1,199 @@ +Ora_Parse
PHP Manual
PrevNext

Ora_Parse

(PHP3 , PHP4 )

Ora_Parse -- parse an SQL statement

Description

int ora_parse (int cursor_ind, string sql_statement, int defer)

This function parses an SQL statement or a PL/SQL block and + associates it with the given cursor. +

Returns 0 on success or -1 on + error. +

See also ora_exec(), + ora_fetch(), and ora_do(). +


PrevHomeNext
Ora_OpenUpOra_Rollback
\ No newline at end of file diff --git a/function.ora-plogon.html b/function.ora-plogon.html new file mode 100644 index 0000000..4bfd3f1 --- /dev/null +++ b/function.ora-plogon.html @@ -0,0 +1,184 @@ +Ora_pLogon
PHP Manual
PrevNext

Ora_pLogon

(PHP3 , PHP4 )

Ora_pLogon --  + Open a persistent Oracle connection +

Description

int ora_plogon (string user, string password)

Establishes a persistant connection between PHP and an Oracle database with + the given username and password. +

See also ora_logon(). +


PrevHomeNext
Ora_LogonUpOra_Numcols
\ No newline at end of file diff --git a/function.ora-rollback.html b/function.ora-rollback.html new file mode 100644 index 0000000..9a80ac2 --- /dev/null +++ b/function.ora-rollback.html @@ -0,0 +1,197 @@ +Ora_Rollback
PHP Manual
PrevNext

Ora_Rollback

(PHP3 , PHP4 )

Ora_Rollback -- roll back transaction

Description

int ora_rollback (int connection)

This function undoes an Oracle transaction. (See + ora_commit() for the definition of a + transaction.) +

Returns true on success, false on error. Details about the error + can be retrieved using the ora_error() and + ora_errorcode() functions. +


PrevHomeNext
Ora_ParseUpOutput Control Functions
\ No newline at end of file diff --git a/function.ord.html b/function.ord.html new file mode 100644 index 0000000..cf24ed5 --- /dev/null +++ b/function.ord.html @@ -0,0 +1,234 @@ +Ord
PHP Manual
PrevNext

Ord

(PHP3 , PHP4 )

Ord -- Return ASCII value of character

Description

int ord (string string)

Returns the ASCII value of the first character of + string. This function complements + chr(). +

Example 1. Ord() example


if (ord ($str) == 10) {
+    echo "The first character of \$str is a line feed.\n";
+}
+      
+

See also chr(). +


PrevHomeNext
nl2brUpparse_str
\ No newline at end of file diff --git a/function.pack.html b/function.pack.html new file mode 100644 index 0000000..be1081c --- /dev/null +++ b/function.pack.html @@ -0,0 +1,366 @@ +pack
PHP Manual
PrevNext

pack

(PHP3 , PHP4 )

pack -- Pack data into binary string.

Description

string pack (string format [, mixed + args ...])

Pack given arguments into binary string according to + format. Returns binary string containing + data. +

The idea to this function was taken from Perl and all formatting + codes work the same as there, however, there are some formatting + codes that are missing such as Perl's "u" format code. The format + string consists of format codes followed by an optional repeater + argument. The repeater argument can be either an integer value or + * for repeating to the end of the input data. For a, A, h, H the + repeat count specifies how many characters of one data argument + are taken, for @ it is the absolute position where to put the + next data, for everything else the repeat count specifies how + many data arguments are consumed and packed into the resulting + binary string. Currently implemented are +

  • a NUL-padded string +

  • A SPACE-padded string +

  • h Hex string, low nibble first +

  • H Hex string, high nibble first +

  • c signed char +

  • C unsigned char +

  • s signed short (always 16 bit, machine byte order) +

  • S unsigned short (always 16 bit, machine byte order) +

  • n unsigned short (always 16 bit, big endian byte order) +

  • v unsigned short (always 16 bit, little endian byte order) +

  • i signed integer (machine dependent size and byte order) +

  • I unsigned integer (machine dependent size and byte order) +

  • l signed long (always 32 bit, machine byte order) +

  • L unsigned long (always 32 bit, machine byte order) +

  • N unsigned long (always 32 bit, big endian byte order) +

  • V unsigned long (always 32 bit, little endian byte order) +

  • f float (machine dependent size and representation) +

  • d double (machine dependent size and representation) +

  • x NUL byte +

  • X Back up one byte +

  • @ NUL-fill to absolute position +

+

Example 1. Pack() format string


$binarydata = pack ("nvc*", 0x1234, 0x5678, 65, 66);
+      

The resulting binary string will be 6 bytes long and contain + the byte sequence 0x12, 0x34, 0x78, 0x56, 0x41, 0x42. +

+

Note that the distinction between signed and unsigned values only + affects the function unpack(), where as + function pack() gives the same result for + signed and unsigned format codes. +

Also note that PHP internally stores integral values as signed + values of a machine dependent size. If you give it an unsigned + integral value too large to be stored that way it is converted to + a double which often yields an undesired result. +


PrevHomeNext
leakUpshow_source
\ No newline at end of file diff --git a/function.parse-str.html b/function.parse-str.html new file mode 100644 index 0000000..de896c8 --- /dev/null +++ b/function.parse-str.html @@ -0,0 +1,229 @@ +parse_str
PHP Manual
PrevNext

parse_str

(PHP3 , PHP4 )

parse_str -- Parses the string into variables

Description

void parse_str (string str [, array arr])

Parses str as if it were the query string + passed via an URL and sets variables in the current scope. If + the second parameter arr is present, + variables are stored in this variable as an array elements instead. +

Example 1. Using parse_str()


$str = "first=value&second[]=this+works&second[]=another";
+parse_str($str);
+echo $first;     /* prints "value" */
+echo $second[0]; /* prints "this works" */
+echo $second[1]; /* prints "another" */
+      
+


PrevHomeNext
OrdUpprint
\ No newline at end of file diff --git a/function.parse-url.html b/function.parse-url.html new file mode 100644 index 0000000..89df2b9 --- /dev/null +++ b/function.parse-url.html @@ -0,0 +1,175 @@ +parse_url
PHP Manual
PrevNext

parse_url

(PHP3 , PHP4 )

parse_url -- Parse a URL and return its components

Description

array parse_url (string url)

This function returns an associative array returning any of the + various components of the URL that are present. This includes the + "scheme", "host", "port", "user", "pass", "path", "query", and + "fragment". +


PrevHomeNext
base64_encodeUprawurldecode
\ No newline at end of file diff --git a/function.passthru.html b/function.passthru.html new file mode 100644 index 0000000..020a5f5 --- /dev/null +++ b/function.passthru.html @@ -0,0 +1,248 @@ +passthru
PHP Manual
PrevNext

passthru

(PHP3 , PHP4 )

passthru --  + Execute an external program and display raw output +

Description

void passthru (string command [, int + return_var])

The passthru() function is similar to the + Exec() function in that it executes a + command. If the + return_var argument is present, the return + status of the Unix command will be placed here. This function + should be used in place of Exec() or + System() when the output from the Unix command + is binary data which needs to be passed directly back to the + browser. A common use for this is to execute something like the + pbmplus utilities that can output an image stream directly. By + setting the content-type to image/gif and + then calling a pbmplus program to output a gif, you can create + PHP scripts that output images directly.

Note that if you start a program using this function and want to + leave it running in the background, you have to make sure that the + output of that program is redirected to a file or some other + output stream or else PHP will hang until the execution of the + program ends. +

See also exec(), system(), + popen(), EscapeShellCmd(), + and the backtick + operator. +


PrevHomeNext
execUpsystem
\ No newline at end of file diff --git a/function.pclose.html b/function.pclose.html new file mode 100644 index 0000000..60a486a --- /dev/null +++ b/function.pclose.html @@ -0,0 +1,204 @@ +pclose
PHP Manual
PrevNext

pclose

(PHP3 , PHP4 )

pclose -- Closes process file pointer

Description

int pclose (int fp)

+ Closes a file pointer to a pipe opened by + popen(). +

+ The file pointer must be valid, and must have been returned by a + successful call to popen(). +

Returns the termination status of the process that was + run. +

See also popen(). +


PrevHomeNext
move_uploaded_fileUppopen
\ No newline at end of file diff --git a/function.pdf-add-annotation.html b/function.pdf-add-annotation.html new file mode 100644 index 0000000..2200743 --- /dev/null +++ b/function.pdf-add-annotation.html @@ -0,0 +1,197 @@ +pdf_add_annotation
PHP Manual
PrevNext

pdf_add_annotation

(PHP3 >= 3.0.12, PHP4 >= 4.0b2)

pdf_add_annotation -- Adds annotation

Description

void pdf_add_annotation (int pdf document, double llx, double lly, double urx, double ury, string title, string content)

The pdf_add_annotation() adds a note with + the lower left corner at (llx, + lly) and the upper right corner at + (urx, ury).


PrevHomeNext
pdf_execute_imageUppdf_set_border_style
\ No newline at end of file diff --git a/function.pdf-add-outline.html b/function.pdf-add-outline.html new file mode 100644 index 0000000..6c20960 --- /dev/null +++ b/function.pdf-add-outline.html @@ -0,0 +1,201 @@ +pdf_add_outline
PHP Manual
PrevNext

pdf_add_outline

(PHP3 >= 3.0.6, PHP4 )

pdf_add_outline -- Adds bookmark for current page

Description

int pdf_add_outline (int pdf document, string text [, int parent [, int open]])

The pdf_add_outline() function adds a bookmark + with text text that points to the current page. + The bookmark is inserted as a child of parent and + is by default open if open is not 0. The + return value is an identifier for the bookmark which can be used + as a parent for other bookmarks. Therefore you can build up hierarchies + of bookmarks. +

Unfortunately pdflib does not make a copy of the string, which forces + PHP to allocate the memory. Currently this piece of memory is not + been freed by any PDF function but it will be taken care of by the + PHP memory manager.


PrevHomeNext
pdf_setrgbcolorUppdf_set_transition
\ No newline at end of file diff --git a/function.pdf-arc.html b/function.pdf-arc.html new file mode 100644 index 0000000..06377a0 --- /dev/null +++ b/function.pdf-arc.html @@ -0,0 +1,219 @@ +pdf_arc
PHP Manual
PrevNext

pdf_arc

(PHP3 >= 3.0.6, PHP4 )

pdf_arc -- Draws an arc

Description

void pdf_arc (int pdf document, double x-coor, double y-coor, double radius, double start, double end)

The pdf_arc() function draws an arc with + center at point + (x-coor, y-coor) + and radius radius, starting at angle + start and ending at angle + end.

See also pdf_circle(), + pdf_stroke().


PrevHomeNext
pdf_circleUppdf_rect
\ No newline at end of file diff --git a/function.pdf-begin-page.html b/function.pdf-begin-page.html new file mode 100644 index 0000000..0f16cb5 --- /dev/null +++ b/function.pdf-begin-page.html @@ -0,0 +1,202 @@ +pdf_begin_page
PHP Manual
PrevNext

pdf_begin_page

(PHP3 >= 3.0.6, PHP4 )

pdf_begin_page -- Starts new page

Description

void pdf_begin_page (int pdf document, double width, double height)

The pdf_begin_page() function starts a new + page with height height and width + width. In order to create a valid + document you must call this function and + pdf_end_page() at least once.

See also pdf_end_page().


PrevHomeNext
pdf_closeUppdf_end_page
\ No newline at end of file diff --git a/function.pdf-circle.html b/function.pdf-circle.html new file mode 100644 index 0000000..a8deaa1 --- /dev/null +++ b/function.pdf-circle.html @@ -0,0 +1,207 @@ +pdf_circle
PHP Manual
PrevNext

pdf_circle

(PHP3 >= 3.0.6, PHP4 )

pdf_circle -- Draws a circle

Description

void pdf_circle (int pdf document, double x-coor, double y-coor, double radius)

The pdf_circle() function draws a circle with + center at point + (x-coor, y-coor) + and radius radius.

See also pdf_arc(), + pdf_stroke().


PrevHomeNext
pdf_linetoUppdf_arc
\ No newline at end of file diff --git a/function.pdf-clip.html b/function.pdf-clip.html new file mode 100644 index 0000000..4a3af62 --- /dev/null +++ b/function.pdf-clip.html @@ -0,0 +1,175 @@ +pdf_clip
PHP Manual
PrevNext

pdf_clip

(PHP3 >= 3.0.6, PHP4 )

pdf_clip -- Clips to current path

Description

void pdf_clip (int pdf document)

The pdf_clip() function clips all drawing + to the current path.


PrevHomeNext
pdf_endpathUppdf_setgray_fill
\ No newline at end of file diff --git a/function.pdf-close-image.html b/function.pdf-close-image.html new file mode 100644 index 0000000..98969dc --- /dev/null +++ b/function.pdf-close-image.html @@ -0,0 +1,201 @@ +pdf_close_image
PHP Manual
PrevNext

pdf_close_image

(PHP3 >= 3.0.7, PHP4 >= 4.0b2)

pdf_close_image -- Closes an image

Description

void pdf_close_image (int image)

The pdf_close_image() function closes an image + which has been opened with any of the pdf_open_xxx() + functions.

See also pdf_open_jpeg(), + pdf_open_gif(), + pdf_open_memory_image().


PrevHomeNext
pdf_open_tiffUppdf_place_image
\ No newline at end of file diff --git a/function.pdf-close.html b/function.pdf-close.html new file mode 100644 index 0000000..6939770 --- /dev/null +++ b/function.pdf-close.html @@ -0,0 +1,190 @@ +pdf_close
PHP Manual
PrevNext

pdf_close

(PHP3 >= 3.0.6, PHP4 )

pdf_close -- Closes a pdf document

Description

void pdf_close (int pdf document)

The pdf_close() function closes the pdf document. +

See also pdf_open(), + fclose().


PrevHomeNext
pdf_openUppdf_begin_page
\ No newline at end of file diff --git a/function.pdf-closepath-fill-stroke.html b/function.pdf-closepath-fill-stroke.html new file mode 100644 index 0000000..532f94a --- /dev/null +++ b/function.pdf-closepath-fill-stroke.html @@ -0,0 +1,226 @@ +pdf_closepath_fill_stroke
PHP Manual
PrevNext

pdf_closepath_fill_stroke

(PHP3 >= 3.0.6, PHP4 )

pdf_closepath_fill_stroke -- Closes, fills and strokes current path

Description

void pdf_closepath_fill_stroke (int pdf document)

The pdf_closepath_fill_stroke() function closes, + fills the interior of + the current path with the current fill color and draws current path.

See also pdf_closepath(), + pdf_stroke(), + pdf_fill(), + pdf_setgray_fill(), + pdf_setgray(), + pdf_setrgbcolor_fill(), + pdf_setrgbcolor().


PrevHomeNext
pdf_fill_strokeUppdf_endpath
\ No newline at end of file diff --git a/function.pdf-closepath-stroke.html b/function.pdf-closepath-stroke.html new file mode 100644 index 0000000..4ffb16c --- /dev/null +++ b/function.pdf-closepath-stroke.html @@ -0,0 +1,203 @@ +pdf_closepath_stroke
PHP Manual
PrevNext

pdf_closepath_stroke

(PHP3 >= 3.0.6, PHP4 )

pdf_closepath_stroke -- Closes path and draws line along path

Description

void pdf_closepath_stroke (int pdf document)

The pdf_closepath_stroke() function is a + combination of pdf_closepath() and + pdf_stroke(). It also clears the path.

See also pdf_closepath(), + pdf_stroke().


PrevHomeNext
pdf_strokeUppdf_fill
\ No newline at end of file diff --git a/function.pdf-closepath.html b/function.pdf-closepath.html new file mode 100644 index 0000000..0fa8811 --- /dev/null +++ b/function.pdf-closepath.html @@ -0,0 +1,196 @@ +pdf_closepath
PHP Manual
PrevNext

pdf_closepath

(PHP3 >= 3.0.6, PHP4 )

pdf_closepath -- Closes path

Description

void pdf_closepath (int pdf document)

The pdf_closepath() function closes the + current path. This means, it draws a line from current point to + the point where the first line was started. Many functions like + pdf_moveto(), pdf_circle() + and pdf_rect() start a new path.


PrevHomeNext
pdf_rectUppdf_stroke
\ No newline at end of file diff --git a/function.pdf-continue-text.html b/function.pdf-continue-text.html new file mode 100644 index 0000000..d85f846 --- /dev/null +++ b/function.pdf-continue-text.html @@ -0,0 +1,210 @@ +pdf_continue_text
PHP Manual
PrevNext

pdf_continue_text

(PHP3 >= 3.0.6, PHP4 )

pdf_continue_text -- Outputs text in next line

Description

void pdf_continue_text (int pdf document, string text)

The pdf_continue_text() function outputs the + string in text in the next line. + The distance between the lines can be set with + pdf_set_leading().

See also pdf_show_xy(), + pdf_set_leading(), + pdf_set_text_pos().


PrevHomeNext
pdf_skewUppdf_stringwidth
\ No newline at end of file diff --git a/function.pdf-curveto.html b/function.pdf-curveto.html new file mode 100644 index 0000000..4e83c8e --- /dev/null +++ b/function.pdf-curveto.html @@ -0,0 +1,231 @@ +pdf_curveto
PHP Manual
PrevNext

pdf_curveto

(PHP3 >= 3.0.6, PHP4 )

pdf_curveto -- Draws a curve

Description

void pdf_curveto (int pdf document, double x1, double y1, double x2, double y2, double x3, double y3)

The pdf_curveto() function draws a Bezier curve + from the current point to the point + (x3, y3) using + (x1, y1) and + (x2, y2) as control + points.

See also pdf_moveto(), + pdf_lineto(), + pdf_stroke().


PrevHomeNext
pdf_movetoUppdf_lineto
\ No newline at end of file diff --git a/function.pdf-end-page.html b/function.pdf-end-page.html new file mode 100644 index 0000000..491273d --- /dev/null +++ b/function.pdf-end-page.html @@ -0,0 +1,183 @@ +pdf_end_page
PHP Manual
PrevNext

pdf_end_page

(PHP3 >= 3.0.6, PHP4 )

pdf_end_page -- Ends a page

Description

void pdf_end_page (int pdf document)

The pdf_end_page() function ends a page. + Once a page is ended it cannot be modified anymore.

See also pdf_begin_page().


PrevHomeNext
pdf_begin_pageUppdf_show
\ No newline at end of file diff --git a/function.pdf-endpath.html b/function.pdf-endpath.html new file mode 100644 index 0000000..67d1a6f --- /dev/null +++ b/function.pdf-endpath.html @@ -0,0 +1,183 @@ +pdf_endpath
PHP Manual
PrevNext

pdf_endpath

(PHP3 >= 3.0.6, PHP4 )

pdf_endpath -- Ends current path

Description

void pdf_endpath (int pdf document)

The pdf_endpath() function ends + the current path but does not close it.

See also pdf_closepath().


PrevHomeNext
pdf_closepath_fill_strokeUppdf_clip
\ No newline at end of file diff --git a/function.pdf-execute-image.html b/function.pdf-execute-image.html new file mode 100644 index 0000000..49f411a --- /dev/null +++ b/function.pdf-execute-image.html @@ -0,0 +1,242 @@ +pdf_execute_image
PHP Manual
PrevNext

pdf_execute_image

(PHP3 >= 3.0.7, 4.0b2 - 4.0b4 only)

pdf_execute_image -- Places a stored image on the page

Description

void pdf_execute_image (int pdf document, int image, double x-coor, double y-coor, double scale)

The pdf_execute_image() function displays an image that has been + put in the PDF file with the pdf_put_image() + function on the current page at the given coordinates.

The image can be scaled while displaying it. A scale of 1.0 + will show the image in the original size. +

Note: This function has become meaningless with version + 2.01 of pdflib. It will just output a warning.

+ +

Example 1. Multiple show of an image


<?php
+$im = ImageCreate(100, 100);
+$col1 = ImageColorAllocate($im, 80, 45, 190);
+ImageFill($im, 10, 10, $col1);
+$pim = pdf_open_memory_image($pdf, $im);
+pdf_put_image($pdf, $pim);
+pdf_execute_image($pdf, $pim, 100, 100, 1);
+pdf_execute_image($pdf, $pim, 200, 200, 2);
+pdf_close_image($pdf, $pim);
+?>
+     


PrevHomeNext
pdf_put_imageUppdf_add_annotation
\ No newline at end of file diff --git a/function.pdf-fill-stroke.html b/function.pdf-fill-stroke.html new file mode 100644 index 0000000..37da490 --- /dev/null +++ b/function.pdf-fill-stroke.html @@ -0,0 +1,225 @@ +pdf_fill_stroke
PHP Manual
PrevNext

pdf_fill_stroke

(PHP3 >= 3.0.6, PHP4 )

pdf_fill_stroke -- Fills and strokes current path

Description

void pdf_fill_stroke (int pdf document)

The pdf_fill_stroke() function fills the interior of + the current path with the current fill color and draws current path.

See also pdf_closepath(), + pdf_stroke(), + pdf_fill(), + pdf_setgray_fill(), + pdf_setgray(), + pdf_setrgbcolor_fill(), + pdf_setrgbcolor().


PrevHomeNext
pdf_fillUppdf_closepath_fill_stroke
\ No newline at end of file diff --git a/function.pdf-fill.html b/function.pdf-fill.html new file mode 100644 index 0000000..21ce86f --- /dev/null +++ b/function.pdf-fill.html @@ -0,0 +1,218 @@ +pdf_fill
PHP Manual
PrevNext

pdf_fill

(PHP3 >= 3.0.6, PHP4 )

pdf_fill -- Fills current path

Description

void pdf_fill (int pdf document)

The pdf_fill() function fills the interior of + the current path with the current fill color.

See also pdf_closepath(), + pdf_stroke(), + pdf_setgray_fill(), + pdf_setgray(), + pdf_setrgbcolor_fill(), + pdf_setrgbcolor().


PrevHomeNext
pdf_closepath_strokeUppdf_fill_stroke
\ No newline at end of file diff --git a/function.pdf-get-image-height.html b/function.pdf-get-image-height.html new file mode 100644 index 0000000..30d1edc --- /dev/null +++ b/function.pdf-get-image-height.html @@ -0,0 +1,197 @@ +pdf_get_image_height
PHP Manual
PrevNext

pdf_get_image_height

(PHP3 >= 3.0.12, PHP4 >= 4.0b2)

pdf_get_image_height -- Returns height of an image

Description

string pdf_get_image_height (int pdf document, int image)

The pdf_get_image_height() function returns the + heights of a pdf image in pixel.

See also pdf_open_image_file(), + pdf_open_memory_image(), + pdf_get_image_width().


PrevHomeNext
pdf_get_valueUppdf_get_image_width
\ No newline at end of file diff --git a/function.pdf-get-image-width.html b/function.pdf-get-image-width.html new file mode 100644 index 0000000..eddf1e3 --- /dev/null +++ b/function.pdf-get-image-width.html @@ -0,0 +1,197 @@ +pdf_get_image_width
PHP Manual
PrevNext

pdf_get_image_width

(PHP3 >= 3.0.12, PHP4 >= 4.0b2)

pdf_get_image_width -- Returns width of an image

Description

string pdf_get_image_width (int pdf document, int image)

The pdf_get_image_width() function returns the + widths of a pdf image in pixel.

See also pdf_open_image_file(), + pdf_open_memory_image(), + pdf_get_image_height().


PrevHomeNext
pdf_get_image_heightUppdf_set_text_rendering
\ No newline at end of file diff --git a/function.pdf-get-info.html b/function.pdf-get-info.html new file mode 100644 index 0000000..ec1569b --- /dev/null +++ b/function.pdf-get-info.html @@ -0,0 +1,209 @@ +PDF_get_info
PHP Manual
PrevNext

PDF_get_info

(PHP3 >= 3.0.6, PHP4 <= 4.0b1)

PDF_get_info -- Returns an empty info structure for a pdf document

Description

info pdf_get_info (string filename)

The PDF_get_info() function returns an + empty info structure for the pdf document. It should be filled + with appropriate information like the author, subject etc. of + the document. + +

Note: + This functions is not available if pdflib 2.x support is activated. +

See also PDF_set_info_creator(), + PDF_set_info_author(), + PDF_set_info_keywords(), + PDF_set_info_title(), + PDF_set_info_subject().


PrevHomeNext
PDF functionsUpPDF_set_info
\ No newline at end of file diff --git a/function.pdf-get-parameter.html b/function.pdf-get-parameter.html new file mode 100644 index 0000000..66dd96c --- /dev/null +++ b/function.pdf-get-parameter.html @@ -0,0 +1,204 @@ +pdf_get_parameter
PHP Manual
PrevNext

pdf_get_parameter

(PHP4 >= 4.0.1)

pdf_get_parameter -- Gets certain parameters

Description

string pdf_get_parameter (int pdf document, string name [, double modifier])

The pdf_get_parameter() function gets several + parameters of pdflib which are of the type string. The function parameter + modifier characterizes the parameter to get. + If the modifier is not needed it has to be 0 or not passed at all.

See also pdf_get_value(), + pdf_set_value(), + pdf_set_parameter().


PrevHomeNext
pdf_set_parameterUppdf_set_value
\ No newline at end of file diff --git a/function.pdf-get-value.html b/function.pdf-get-value.html new file mode 100644 index 0000000..b53acff --- /dev/null +++ b/function.pdf-get-value.html @@ -0,0 +1,204 @@ +pdf_get_value
PHP Manual
PrevNext

pdf_get_value

(PHP4 >= 4.0.1)

pdf_get_value -- Gets certain numerical value

Description

double pdf_get_value (int pdf document, string name [, double modifier])

The pdf_get_value() function gets several + numerical parameters of pdflib. The function parameter + modifier characterizes the parameter to get. + If the modifier is not needed it has to be 0 or not passed at all.

See also pdf_set_value(), + pdf_get_parameter(), + pdf_set_parameter().


PrevHomeNext
pdf_set_valueUppdf_get_image_height
\ No newline at end of file diff --git a/function.pdf-lineto.html b/function.pdf-lineto.html new file mode 100644 index 0000000..96fca3b --- /dev/null +++ b/function.pdf-lineto.html @@ -0,0 +1,208 @@ +pdf_lineto
PHP Manual
PrevNext

pdf_lineto

(PHP3 >= 3.0.6, PHP4 )

pdf_lineto -- Draws a line

Description

void pdf_lineto (int pdf document, double x-coor, double y-coor)

The pdf_lineto() function draws a line from + the current point to the point with coordinates + (x-coor, y-coor).

See also pdf_moveto(), + pdf_curveto(), + pdf_stroke().


PrevHomeNext
pdf_curvetoUppdf_circle
\ No newline at end of file diff --git a/function.pdf-moveto.html b/function.pdf-moveto.html new file mode 100644 index 0000000..4019014 --- /dev/null +++ b/function.pdf-moveto.html @@ -0,0 +1,186 @@ +pdf_moveto
PHP Manual
PrevNext

pdf_moveto

(PHP3 >= 3.0.6, PHP4 )

pdf_moveto -- Sets current point

Description

void pdf_moveto (int pdf document, double x-coor, double y-coor)

The pdf_moveto() function sets the current point + to the coordinates x-coor and + y-coor.


PrevHomeNext
pdf_setdashUppdf_curveto
\ No newline at end of file diff --git a/function.pdf-open-gif.html b/function.pdf-open-gif.html new file mode 100644 index 0000000..9bcfcd5 --- /dev/null +++ b/function.pdf-open-gif.html @@ -0,0 +1,284 @@ +pdf_open_gif
PHP Manual
PrevNext

pdf_open_gif

(PHP3 >= 3.0.7, PHP4 >= 4.0b2)

pdf_open_gif -- Opens a GIF image

Description

int pdf_open_gif (int pdf document, string filename)

The pdf_open_gif() function opens an image stored + in the file with the name filename. + The format of the image has to be gif. The function returns a pdf + image identifier. +

Note: This function shouldn't be used anymore. Please use + the function pdf_open_image_file() instead. +

+ +

Example 1. Including a gif image


<?php
+$im = pdf_open_gif($pdf, "test.gif");
+pdf_place_image($pdf, $im, 100, 100, 1);
+pdf_close_image($pdf, $im);
+?>
+      

See also pdf_close_image(), + pdf_open_jpeg(), + pdf_open_memory_image(), + pdf_execute_image(), + pdf_place_image(), + pdf_put_image().


PrevHomeNext
pdf_set_durationUppdf_open_png
\ No newline at end of file diff --git a/function.pdf-open-image-file.html b/function.pdf-open-image-file.html new file mode 100644 index 0000000..084a9f2 --- /dev/null +++ b/function.pdf-open-image-file.html @@ -0,0 +1,284 @@ +pdf_open_image_file
PHP Manual
PrevNext

pdf_open_image_file

(PHP4 >= 4.0RC2)

pdf_open_image_file -- Reads an image from a file

Description

int pdf_open_image_file (int PDF-document, string format, string filename)

The function pdf_open_image_file() reads an image + of format format from the file + filename. + Possible formats are 'png', 'tiff', 'jpeg' and 'gif'. + The function returns a pdf image identifier. +

Example 1. Inserting an image


<?php
+$pim = pdf_open_image_file($pdf, "png", "picture.png");
+pdf_place_image($pdf, $pim, 100, 100, 1);
+pdf_close_image($pdf, $pim);
+?>
+     

See also pdf_close_image(), + pdf_open_jpeg(), + pdf_open_gif(), + pdf_open_tiff(), + pdf_open_png(), + pdf_execute_image(), + pdf_place_image(), + pdf_put_image().


PrevHomeNext
pdf_open_pngUppdf_open_memory_image
\ No newline at end of file diff --git a/function.pdf-open-jpeg.html b/function.pdf-open-jpeg.html new file mode 100644 index 0000000..0438bdd --- /dev/null +++ b/function.pdf-open-jpeg.html @@ -0,0 +1,251 @@ +pdf_open_jpeg
PHP Manual
PrevNext

pdf_open_jpeg

(PHP3 >= 3.0.7, PHP4 >= 4.0b2)

pdf_open_jpeg -- Opens a JPEG image

Description

int pdf_open_jpeg (int pdf document, string filename)

The pdf_open_jpeg() function opens an image stored + in the file with the name filename. + The format of the image has to be jpeg. The function returns a pdf + image identifier. +

Note: This function shouldn't be used anymore. Please use + the function pdf_open_image_file() instead. +

See also pdf_close_image(), + pdf_open_gif(), + pdf_open_png(), + pdf_open_memory_image(), + pdf_execute_image(), + pdf_place_image(), + pdf_put_image().


PrevHomeNext
pdf_open_memory_imageUppdf_open_tiff
\ No newline at end of file diff --git a/function.pdf-open-memory-image.html b/function.pdf-open-memory-image.html new file mode 100644 index 0000000..d8ff7ec --- /dev/null +++ b/function.pdf-open-memory-image.html @@ -0,0 +1,271 @@ +pdf_open_memory_image
PHP Manual
PrevNext

pdf_open_memory_image

(PHP3 >= 3.0.10, PHP4 >= 4.0b2)

pdf_open_memory_image -- Opens an image created with PHP's image functions

Description

int pdf_open_memory_image (int pdf document, int image)

The pdf_open_memory_image() function takes + an image created with the PHP's image functions and makes it available + for the pdf document. The function returns a pdf + image identifier. + +

Example 1. Including a memory image


<?php
+$im = ImageCreate(100, 100);
+$col = ImageColorAllocate($im, 80, 45, 190);
+ImageFill($im, 10, 10, $col);
+$pim = pdf_open_memory_image($pdf, $im);
+ImageDestroy($im);
+pdf_place_image($pdf, $pim, 100, 100, 1);
+pdf_close_image($pdf, $pim);
+?>
+     

See also pdf_close_image(), + pdf_open_jpeg(), + pdf_open_gif(), + pdf_open_png() + pdf_execute_image(), + pdf_place_image(), + pdf_put_image().


PrevHomeNext
pdf_open_image_fileUppdf_open_jpeg
\ No newline at end of file diff --git a/function.pdf-open-png.html b/function.pdf-open-png.html new file mode 100644 index 0000000..06ad6ab --- /dev/null +++ b/function.pdf-open-png.html @@ -0,0 +1,299 @@ +pdf_open_png
PHP Manual
PrevNext

pdf_open_png

(PHP4 >= 4.0RC2)

pdf_open_png --  + Opens a PNG image +

Description

int + pdf_open_png + (int + pdf, string + png_file)

+ The pdf_open_png() function opens an image stored + in the file with the name filename. + The format of the image has to be png. The function returns a pdf + image identifier. +

Note: This function shouldn't be used anymore. Please use + the function pdf_open_image_file() instead. +

+

Example 1. Including a PNG image


<?php
+$im = pdf_open_png ($pdf, "test.png");
+pdf_place_image ($pdf, $im, 100, 100, 1);
+pdf_close_image ($pdf, $im);
+?>
+          
+

See also pdf_close_image(), + pdf_open_jpeg(), + pdf_open_gif(), + pdf_open_memory_image(), + pdf_execute_image(), + pdf_place_image(), + pdf_put_image(). +


PrevHomeNext
pdf_open_gifUppdf_open_image_file
\ No newline at end of file diff --git a/function.pdf-open-tiff.html b/function.pdf-open-tiff.html new file mode 100644 index 0000000..4f9fb78 --- /dev/null +++ b/function.pdf-open-tiff.html @@ -0,0 +1,260 @@ +pdf_open_tiff
PHP Manual
PrevNext

pdf_open_tiff

(PHP4 >= 4.0b4)

pdf_open_tiff -- Opens a TIFF image

Description

int pdf_open_tiff (int PDF-document, string filename)

The pdf_open_tiff() function opens an image stored + in the file with the name filename. + The format of the image has to be tiff. The function returns a pdf + image identifier. +

Note: This function shouldn't be used anymore. Please use + the function pdf_open_image_file() instead. +

+

See also pdf_close_image(), + pdf_open_gif(), + pdf_open_jpeg(), + pdf_open_png(), + pdf_open_memory_image(), + pdf_execute_image(), + pdf_place_image(), + pdf_put_image(). +


PrevHomeNext
pdf_open_jpegUppdf_close_image
\ No newline at end of file diff --git a/function.pdf-open.html b/function.pdf-open.html new file mode 100644 index 0000000..9df7a67 --- /dev/null +++ b/function.pdf-open.html @@ -0,0 +1,221 @@ +pdf_open
PHP Manual
PrevNext

pdf_open

(PHP3 >= 3.0.6, PHP4 )

pdf_open -- Opens a new pdf document

Description

int pdf_open (int file)

The pdf_open() function opens + a new pdf document. The corresponding file has to be opened + with fopen() and the file descriptor passed + as argument file. + If you do not pass any parameters, the document will be created in memory + and outputed page by page either to stdout or to the web browser. +

Note: + The return value is needed as the first parameter in all other + functions writing to the pdf document. +

+ +

See also fopen(), + pdf_close().


PrevHomeNext
pdf_set_infoUppdf_close
\ No newline at end of file diff --git a/function.pdf-place-image.html b/function.pdf-place-image.html new file mode 100644 index 0000000..9ff3256 --- /dev/null +++ b/function.pdf-place-image.html @@ -0,0 +1,197 @@ +pdf_place_image
PHP Manual
PrevNext

pdf_place_image

(PHP3 >= 3.0.7, PHP4 >= 4.0b2)

pdf_place_image -- Places an image on the page

Description

void pdf_place_image (int pdf document, int image, double x-coor, double y-coor, double scale)

The pdf_place_image() function places an image + on the page at postion (x-coor, + x-coor). The image can be scaled at the same + time. +

See also pdf_put_image(). +


PrevHomeNext
pdf_close_imageUppdf_put_image
\ No newline at end of file diff --git a/function.pdf-put-image.html b/function.pdf-put-image.html new file mode 100644 index 0000000..d067823 --- /dev/null +++ b/function.pdf-put-image.html @@ -0,0 +1,228 @@ +pdf_put_image
PHP Manual
PrevNext

pdf_put_image

(PHP3 >= 3.0.7, 4.0b2 - 4.0b4 only)

pdf_put_image -- Stores an image in the PDF for later use

Description

void pdf_put_image (int pdf document, int image)

The pdf_put_image() function places an image + in the PDF file without showing it. The stored image can be + displayed with the pdf_execute_image() + function as many times as needed. This is useful when using the same + image multiple times in order to keep the file size small. Using + pdf_put_image() and + pdf_execute_image() is highly recommended for + larger images (several kb) if they show up more than once in the + document. +

Note: This function has become meaningless with version + 2.01 of pdflib. It will just output a warning.

See also pdf_put_image(), + pdf_place_image(), + pdf_execute_image().


PrevHomeNext
pdf_place_imageUppdf_execute_image
\ No newline at end of file diff --git a/function.pdf-rect.html b/function.pdf-rect.html new file mode 100644 index 0000000..add1299 --- /dev/null +++ b/function.pdf-rect.html @@ -0,0 +1,206 @@ +pdf_rect
PHP Manual
PrevNext

pdf_rect

(PHP3 >= 3.0.6, PHP4 )

pdf_rect -- Draws a rectangle

Description

void pdf_rect (int pdf document, double x-coor, double y-coor, double width, double height)

The pdf_rect() function draws a rectangle with + its lower left corner at point + (x-coor, y-coor). + This width is set to widgth. + This height is set to height.

See also pdf_stroke().


PrevHomeNext
pdf_arcUppdf_closepath
\ No newline at end of file diff --git a/function.pdf-restore.html b/function.pdf-restore.html new file mode 100644 index 0000000..7527ff2 --- /dev/null +++ b/function.pdf-restore.html @@ -0,0 +1,228 @@ +pdf_restore
PHP Manual
PrevNext

pdf_restore

(PHP3 >= 3.0.6, PHP4 )

pdf_restore -- Restores formerly saved environment

Description

void pdf_restore (int pdf document)

The pdf_restore() function restores the + environment saved with pdf_save(). It works + like the postscript command grestore. + +

Example 1. Save and Restore


<?php pdf_save($pdf);
+// do all kinds of rotations, transformations, ...
+pdf_restore($pdf) ?>
+

See also pdf_save().


PrevHomeNext
pdf_saveUppdf_translate
\ No newline at end of file diff --git a/function.pdf-rotate.html b/function.pdf-rotate.html new file mode 100644 index 0000000..a3d2481 --- /dev/null +++ b/function.pdf-rotate.html @@ -0,0 +1,180 @@ +pdf_rotate
PHP Manual
PrevNext

pdf_rotate

(PHP3 >= 3.0.6, PHP4 )

pdf_rotate -- Sets rotation

Description

void pdf_rotate (int pdf document, double angle)

The pdf_rotate() function sets the rotation in + degress to angle.


PrevHomeNext
pdf_scaleUppdf_setflat
\ No newline at end of file diff --git a/function.pdf-save.html b/function.pdf-save.html new file mode 100644 index 0000000..0497145 --- /dev/null +++ b/function.pdf-save.html @@ -0,0 +1,199 @@ +pdf_save
PHP Manual
PrevNext

pdf_save

(PHP3 >= 3.0.6, PHP4 )

pdf_save -- Saves the current environment

Description

void pdf_save (int pdf document)

The pdf_save() function saves the current + environment. It works like the postscript command gsave. Very + useful if you want to translate or rotate an object without effecting + other objects. pdf_save() should always be + followed by pdf_restore() to restore the environment + before pdf_save().

See also pdf_restore().


PrevHomeNext
pdf_stringwidthUppdf_restore
\ No newline at end of file diff --git a/function.pdf-scale.html b/function.pdf-scale.html new file mode 100644 index 0000000..88e183c --- /dev/null +++ b/function.pdf-scale.html @@ -0,0 +1,216 @@ +pdf_scale
PHP Manual
PrevNext

pdf_scale

(PHP3 >= 3.0.6, PHP4 )

pdf_scale -- Sets scaling

Description

void pdf_scale (int pdf document, double x-scale, double y-scale)

The pdf_scale() function sets the scaling factor + in both directions. The following example scales x and y direction + by 72. The following line will therefore be drawn one inch in both + directions. + +

Example 1. Scaling


<?php pdf_scale($pdf, 72.0, 72.0);
+pdf_lineto($pdf, 1, 1);
+pdf_stroke($pdf);
+?>
+


PrevHomeNext
pdf_translateUppdf_rotate
\ No newline at end of file diff --git a/function.pdf-set-border-color.html b/function.pdf-set-border-color.html new file mode 100644 index 0000000..1fc5cb7 --- /dev/null +++ b/function.pdf-set-border-color.html @@ -0,0 +1,192 @@ +pdf_set_border_color
PHP Manual
PrevNext

pdf_set_border_color

(PHP3 >= 3.0.12, PHP4 >= 4.0b2)

pdf_set_border_color -- Sets color of border around links and annotations

Description

void pdf_set_border_color (int pdf document, double red, double green, double blue)

The pdf_set_border_color() function sets the + color of the suroundig box of links and annotations. + The three color components have to have a value between 0.0 and + 1.0.

See also pdf_set_border_style(), + pdf_set_border_dash().


PrevHomeNext
pdf_set_border_styleUppdf_set_border_dash
\ No newline at end of file diff --git a/function.pdf-set-border-dash.html b/function.pdf-set-border-dash.html new file mode 100644 index 0000000..275f4de --- /dev/null +++ b/function.pdf-set-border-dash.html @@ -0,0 +1,192 @@ +pdf_set_border_dash
PHP Manual
PrevNext

pdf_set_border_dash

(PHP4 >= 4.0.1)

pdf_set_border_dash -- Sets dash style of border around links and annotations

Description

void pdf_set_border_dash (int pdf document, double black, double white)

The pdf_set_border_dash() function sets the + lenght of + black and white areas of a dashed line of the suroundig box of + links and annotations.

See also pdf_set_border_style(), + pdf_set_border_color().


PrevHomeNext
pdf_set_border_colorUpVerisign Payflow Pro functions
\ No newline at end of file diff --git a/function.pdf-set-border-style.html b/function.pdf-set-border-style.html new file mode 100644 index 0000000..6e4d799 --- /dev/null +++ b/function.pdf-set-border-style.html @@ -0,0 +1,197 @@ +pdf_set_border_style
PHP Manual
PrevNext

pdf_set_border_style

(PHP3 >= 3.0.12, PHP4 >= 4.0b2)

pdf_set_border_style -- Sets style of border around links and annotations

Description

void pdf_set_border_style (int pdf document, string style, double width)

The pdf_set_border_style() function sets the + style and width of the suroundig box of links and annotations. + The parameter style can be 'solid' or + 'dashed'.

See also pdf_set_border_color(), + pdf_set_border_dash().


PrevHomeNext
pdf_add_annotationUppdf_set_border_color
\ No newline at end of file diff --git a/function.pdf-set-char-spacing.html b/function.pdf-set-char-spacing.html new file mode 100644 index 0000000..90a5447 --- /dev/null +++ b/function.pdf-set-char-spacing.html @@ -0,0 +1,190 @@ +pdf_set_char_spacing
PHP Manual
PrevNext

pdf_set_char_spacing

(PHP3 >= 3.0.6, PHP4 )

pdf_set_char_spacing -- Sets character spacing

Description

void pdf_set_char_spacing (int pdf document, double space)

The pdf_set_char_spacing() function sets the + spacing between characters.

See also pdf_set_word_spacing(), + pdf_set_leading().


PrevHomeNext
pdf_set_text_posUppdf_set_word_spacing
\ No newline at end of file diff --git a/function.pdf-set-duration.html b/function.pdf-set-duration.html new file mode 100644 index 0000000..c41d4ec --- /dev/null +++ b/function.pdf-set-duration.html @@ -0,0 +1,183 @@ +pdf_set_duration
PHP Manual
PrevNext

pdf_set_duration

(PHP3 >= 3.0.6, PHP4 )

pdf_set_duration -- Sets duration between pages

Description

void pdf_set_duration (int pdf document, double duration)

The pdf_set_duration() function set the duration + between following pages in seconds.

See also pdf_set_transition().


PrevHomeNext
pdf_set_transitionUppdf_open_gif
\ No newline at end of file diff --git a/function.pdf-set-font.html b/function.pdf-set-font.html new file mode 100644 index 0000000..636b4da --- /dev/null +++ b/function.pdf-set-font.html @@ -0,0 +1,236 @@ +pdf_set_font
PHP Manual
PrevNext

pdf_set_font

(PHP3 >= 3.0.6, PHP4 )

pdf_set_font -- Selects a font face and size

Description

void pdf_set_font (int pdf document, string font name, double size, string encoding [, int embed])

The pdf_set_font() function sets the + current font face, font size and encoding. If you use pdflib 0.6 + you will need to + provide the Adobe Font Metrics (afm-files) for the font in the + font path (default is ./fonts). If you use php3 or a version of + pdflib older than 2.20 the fourth parameter + encoding can take the following values: + 0 = builtin, 1 = pdfdoc, 2 = macroman, 3 = macexpert, 4 = winansi. + An encoding greater than 4 and less than 0 will default to winansi. + winansi is often a good choice. + If you use php4 and a version of pdflib >= 2.20 the encoding parameter + has changed to a string. Use 'winansi', 'builtin', 'host', 'macroman' etc. instead. + If the last parameter is set to + 1 the font is embedded into the pdf document otherwise it is not. + To embed a font is usually a good idea if the font is not widely spread + and you cannot ensure that the person watching your document has + access on fonts in the document. + I font is only embedded once even if you call + pdf_set_font() several times. +

Note: + This function has to be called after + pdf_begin_page() in order to create a valid + pdf document. +

Note: + If you reference a font in a .upr file make sure the name + in the afm file and the font name are the same. Otherwise, + the font will be embedded several times (Thanks to Paul Haddon + for finding this.) +


PrevHomeNext
pdf_show_xyUppdf_set_leading
\ No newline at end of file diff --git a/function.pdf-set-horiz-scaling.html b/function.pdf-set-horiz-scaling.html new file mode 100644 index 0000000..572c9b7 --- /dev/null +++ b/function.pdf-set-horiz-scaling.html @@ -0,0 +1,180 @@ +pdf_set_horiz_scaling
PHP Manual
PrevNext

pdf_set_horiz_scaling

(PHP3 >= 3.0.6, PHP4 )

pdf_set_horiz_scaling -- Sets horizontal scaling of text

Description

void pdf_set_horiz_scaling (int pdf document, double scale)

The pdf_set_horiz_scaling() function sets the + horizontal scaling to scale percent.


PrevHomeNext
pdf_set_text_renderingUppdf_set_text_rise
\ No newline at end of file diff --git a/function.pdf-set-info-author.html b/function.pdf-set-info-author.html new file mode 100644 index 0000000..2d1e002 --- /dev/null +++ b/function.pdf-set-info-author.html @@ -0,0 +1,236 @@ +PDF_set_info_author
PHP Manual
PrevNext

PDF_set_info_author

PDF_set_info_author -- Fills the author field of the info structure

Description

void pdf_set_info_author(info info, string author);

The PDF_set_info_author() function sets the + author of a pdf document. It has to be called after + PDF_get_info() and before + PDF_open(). Calling it after PDF_open() + will have no effect on the document. + +

Note: + This function is not part of the pdf library. +

+ +

Note: + This function takes a different first parameter if pdflib 2.0 support + is activated. The first parameter has to be the identifier of the + pdf document as returned by pdf_open(). Consequently, + pdf_open() has to be called before this function. +

See also PDF_get_info(), + PDF_set_info_creator(), + PDF_set_info_keywords(), + PDF_set_info_title(), + PDF_set_info_subject().


PrevHomeNext
PDF_set_info_keywordsUpPDF_open
\ No newline at end of file diff --git a/function.pdf-set-info-creator.html b/function.pdf-set-info-creator.html new file mode 100644 index 0000000..702989c --- /dev/null +++ b/function.pdf-set-info-creator.html @@ -0,0 +1,232 @@ +PDF_set_info_creator
PHP Manual
PrevNext

PDF_set_info_creator

PDF_set_info_creator -- Fills the creator field of the info structure

Description

void pdf_set_info_creator(info info, string creator);

The PDF_set_info_creator() function sets the + creator field of a pdf document. It has to be called after + PDF_get_info() and before + PDF_open(). Calling it after PDF_open() + will have no effect on the document. + +

Note: + This function is not part of the pdf library. +

+ +

Note: + This function takes a different first parameter if pdflib 2.x support + is activated. The first parameter has to be the identifier of the + pdf document as returned by pdf_open(). Consequently, + pdf_open() has to be called before this function. +

See also PDF_get_info(), + PDF_set_info_keywords(), + PDF_set_info_title(), + PDF_set_info_subject().


PrevHomeNext
PDF_get_infoUpPDF_set_info_title
\ No newline at end of file diff --git a/function.pdf-set-info-keywords.html b/function.pdf-set-info-keywords.html new file mode 100644 index 0000000..694ea1f --- /dev/null +++ b/function.pdf-set-info-keywords.html @@ -0,0 +1,236 @@ +PDF_set_info_keywords
PHP Manual
PrevNext

PDF_set_info_keywords

PDF_set_info_keywords -- Fills the keywords field of the info structure

Description

void pdf_set_info_keywords(info info, string keywords);

The PDF_set_info_keywords() function sets the + keywords of a pdf document. It has to be called after + PDF_get_info() and before + PDF_open(). Calling it after PDF_open() + will have no effect on the document. + +

Note: + This function is not part of the pdf library. +

+ +

Note: + This function takes a different first parameter if pdflib 2.0 support + is activated. The first parameter has to be the identifier of the + pdf document as returned by pdf_open(). Consequently, + pdf_open() has to be called before this function. +

See also PDF_get_info(), + PDF_set_info_creator(), + PDF_set_info_author(), + PDF_set_info_title(), + PDF_set_info_subject().


PrevHomeNext
PDF_set_info_subjectUpPDF_set_info_author
\ No newline at end of file diff --git a/function.pdf-set-info-subject.html b/function.pdf-set-info-subject.html new file mode 100644 index 0000000..64644e1 --- /dev/null +++ b/function.pdf-set-info-subject.html @@ -0,0 +1,236 @@ +PDF_set_info_subject
PHP Manual
PrevNext

PDF_set_info_subject

PDF_set_info_subject -- Fills the subject field of the info structure

Description

void pdf_set_info_subject(info info, string subject);

The PDF_set_info_subject() function sets the + subject of a pdf document. It has to be called after + PDF_get_info() and before + PDF_open(). Calling it after + PDF_open() will have no effect on the document. + +

Note: + This function is not part of the pdf library. +

+ +

Note: + This function takes a different first parameter if pdflib 2.0 support + is activated. The first parameter has to be the identifier of the + pdf document as returned by pdf_open(). Consequently, + pdf_open() has to be called before this function. +

See also PDF_get_info(), + PDF_set_info_creator(), + PDF_set_info_author(), + PDF_set_info_title(), + PDF_set_info_keywords().


PrevHomeNext
PDF_set_info_titleUpPDF_set_info_keywords
\ No newline at end of file diff --git a/function.pdf-set-info-title.html b/function.pdf-set-info-title.html new file mode 100644 index 0000000..fdf0bd8 --- /dev/null +++ b/function.pdf-set-info-title.html @@ -0,0 +1,236 @@ +PDF_set_info_title
PHP Manual
PrevNext

PDF_set_info_title

PDF_set_info_title -- Fills the title field of the info structure

Description

void pdf_set_info_title(info info, string title);

The PDF_set_info_title() function sets the + title of a pdf document. It has to be called after + PDF_get_info() and before + PDF_open(). Calling it after + PDF_open() will have no effect on the document. + +

Note: + This function is not part of the pdf library. +

+ +

Note: + This function takes a different first parameter if pdflib 2.0 support + is activated. The first parameter has to be the identifier of the + pdf document as returned by pdf_open(). Consequently, + pdf_open() has to be called before this function. +

See also PDF_get_info(), + PDF_set_info_creator(), + PDF_set_info_author(), + PDF_set_info_keywords(), + PDF_set_info_subject().


PrevHomeNext
PDF_set_info_creatorUpPDF_set_info_subject
\ No newline at end of file diff --git a/function.pdf-set-info.html b/function.pdf-set-info.html new file mode 100644 index 0000000..3b15a8d --- /dev/null +++ b/function.pdf-set-info.html @@ -0,0 +1,257 @@ +pdf_set_info
PHP Manual
PrevNext

pdf_set_info

(PHP4 >= 4.0.1)

pdf_set_info -- Fills a field of the document information

Description

void pdf_set_info (int pdf document, string fieldname, string value)

The pdf_set_info() function sets an information field + of a pdf document. + Possible values for the fieldname are 'Subject', 'Title', 'Creator', + 'Author', 'Keywords' and one user-defined name. + It can be called before beginning a page. + +

Example 1. Setting document information


<?php 
+$fd = fopen("test.pdf", "w");
+$pdfdoc = pdf_open($fd);
+pdf_set_info($pdfdoc, "Author", "Uwe Steinmann");
+pdf_set_info($pdfdoc, "Creator", "Uwe Steinmann");
+pdf_set_info($pdfdoc, "Title", "Testing Info Fields");
+pdf_set_info($pdfdoc, "Subject", "Test");
+pdf_set_info($pdfdoc, "Keywords", "Test, Fields");
+pdf_set_info($pdfdoc, "CustomField", "What ever makes sense");
+pdf_begin_page($pdfdoc, 595, 842);
+pdf_end_page($pdfdoc);
+pdf_close($pdfdoc);
+?>
+

Note: + This function replaces pdf_set_info_keywords(), + pdf_set_info_title(), + pdf_set_info_subject(), + pdf_set_info_creator(), + pdf_set_info_sybject(). +


PrevHomeNext
PDF functionsUppdf_open
\ No newline at end of file diff --git a/function.pdf-set-leading.html b/function.pdf-set-leading.html new file mode 100644 index 0000000..5688ed7 --- /dev/null +++ b/function.pdf-set-leading.html @@ -0,0 +1,190 @@ +pdf_set_leading
PHP Manual
PrevNext

pdf_set_leading

(PHP3 >= 3.0.6, PHP4 )

pdf_set_leading -- Sets distance between text lines

Description

void pdf_set_leading (int pdf document, double distance)

The pdf_set_leading() function sets the distance + between text lines. This will be used if text is output by + pdf_continue_text().

See also pdf_continue_text().


PrevHomeNext
pdf_set_fontUppdf_set_parameter
\ No newline at end of file diff --git a/function.pdf-set-parameter.html b/function.pdf-set-parameter.html new file mode 100644 index 0000000..86fb973 --- /dev/null +++ b/function.pdf-set-parameter.html @@ -0,0 +1,197 @@ +pdf_set_parameter
PHP Manual
PrevNext

pdf_set_parameter

(PHP4 >= 4.0RC1)

pdf_set_parameter -- Sets certain parameters

Description

void pdf_set_parameter (int pdf document, string name, string value)

The pdf_set_parameter() function sets several + parameters of pdflib which are of the type string.

See also pdf_get_value(), + pdf_set_value(), + pdf_get_parameter().


PrevHomeNext
pdf_set_leadingUppdf_get_parameter
\ No newline at end of file diff --git a/function.pdf-set-text-matrix.html b/function.pdf-set-text-matrix.html new file mode 100644 index 0000000..9feef1b --- /dev/null +++ b/function.pdf-set-text-matrix.html @@ -0,0 +1,187 @@ +pdf_set_text_matrix
PHP Manual
PrevNext

pdf_set_text_matrix

(PHP3 >= 3.0.6, PHP4 <= 4.0b4)

pdf_set_text_matrix -- Sets the text matrix

Description

void pdf_set_text_matrix (int pdf document, array matrix)

The pdf_set_text_matrix() function sets + a matrix which describes a transformation applied on the current + text font. The matrix has to passed as an array with six elements.

Note: This function is not available anymore since pdflib 2.3 +


PrevHomeNext
pdf_set_text_riseUppdf_set_text_pos
\ No newline at end of file diff --git a/function.pdf-set-text-pos.html b/function.pdf-set-text-pos.html new file mode 100644 index 0000000..c64ec94 --- /dev/null +++ b/function.pdf-set-text-pos.html @@ -0,0 +1,197 @@ +pdf_set_text_pos
PHP Manual
PrevNext

pdf_set_text_pos

(PHP3 >= 3.0.6, PHP4 )

pdf_set_text_pos -- Sets text position

Description

void pdf_set_text_pos (int pdf document, double x-coor, double y-coor)

The pdf_set_text_pos() function sets the + position of text for the next pdf_show() + function call.

See also pdf_show(), + pdf_show_xy().


PrevHomeNext
pdf_set_text_matrixUppdf_set_char_spacing
\ No newline at end of file diff --git a/function.pdf-set-text-rendering.html b/function.pdf-set-text-rendering.html new file mode 100644 index 0000000..7fb252d --- /dev/null +++ b/function.pdf-set-text-rendering.html @@ -0,0 +1,184 @@ +pdf_set_text_rendering
PHP Manual
PrevNext

pdf_set_text_rendering

(PHP3 >= 3.0.6, PHP4 )

pdf_set_text_rendering -- Determines how text is rendered

Description

void pdf_set_text_rendering (int pdf document, int mode)

The pdf_set_text_rendering() function determines + how text is rendered. The possible values for mode + are 0=fill text, 1=stroke text, 2=fill and stroke text, 3=invisible, + 4=fill text and add it to cliping path, 5=stroke text and add it to + clipping path, 6=fill and stroke text and add + it to cliping path, 7=add it to clipping path.


PrevHomeNext
pdf_get_image_widthUppdf_set_horiz_scaling
\ No newline at end of file diff --git a/function.pdf-set-text-rise.html b/function.pdf-set-text-rise.html new file mode 100644 index 0000000..ea6e1c5 --- /dev/null +++ b/function.pdf-set-text-rise.html @@ -0,0 +1,180 @@ +pdf_set_text_rise
PHP Manual
PrevNext

pdf_set_text_rise

(PHP3 >= 3.0.6, PHP4 )

pdf_set_text_rise -- Sets the text rise

Description

void pdf_set_text_rise (int pdf document, double rise)

The pdf_set_text_rise() function sets the + text rising to rise points.


PrevHomeNext
pdf_set_horiz_scalingUppdf_set_text_matrix
\ No newline at end of file diff --git a/function.pdf-set-transition.html b/function.pdf-set-transition.html new file mode 100644 index 0000000..9170567 --- /dev/null +++ b/function.pdf-set-transition.html @@ -0,0 +1,240 @@ +pdf_set_transition
PHP Manual
PrevNext

pdf_set_transition

(PHP3 >= 3.0.6, PHP4 )

pdf_set_transition -- Sets transition between pages

Description

void pdf_set_transition (int pdf document, int transition)

The pdf_set_transition() function set the transition + between following pages. The value of transition + can be + +

0 for none, +
1 for two lines sweeping across the screen reveal the page, +
2 for multiple lines sweeping across the screen reveal the page, +
3 for a box reveals the page, +
4 for a single line sweeping across the screen reveals the page, +
5 for the old page dissolves to reveal the page, +
6 for the dissolve effect moves from one screen edge to another, +
7 for the old page is simply replaced by the new page (default) +

See also pdf_set_duration().


PrevHomeNext
pdf_add_outlineUppdf_set_duration
\ No newline at end of file diff --git a/function.pdf-set-value.html b/function.pdf-set-value.html new file mode 100644 index 0000000..92c6b8e --- /dev/null +++ b/function.pdf-set-value.html @@ -0,0 +1,197 @@ +pdf_set_value
PHP Manual
PrevNext

pdf_set_value

(PHP4 >= 4.0.1)

pdf_set_value -- Sets certain numerical value

Description

void pdf_set_value (int pdf document, string name, double value)

The pdf_set_value() function sets several + numerical parameters of pdflib.

See also pdf_get_value(), + pdf_get_parameter(), + pdf_set_parameter().


PrevHomeNext
pdf_get_parameterUppdf_get_value
\ No newline at end of file diff --git a/function.pdf-set-word-spacing.html b/function.pdf-set-word-spacing.html new file mode 100644 index 0000000..882a01d --- /dev/null +++ b/function.pdf-set-word-spacing.html @@ -0,0 +1,190 @@ +pdf_set_word_spacing
PHP Manual
PrevNext

pdf_set_word_spacing

(PHP3 >= 3.0.6, PHP4 )

pdf_set_word_spacing -- Sets spacing between words

Description

void pdf_set_word_spacing (int pdf document, double space)

The pdf_set_word_spacing() function sets the + spacing between words.

See also pdf_set_char_spacing(), + pdf_set_leading().


PrevHomeNext
pdf_set_char_spacingUppdf_skew
\ No newline at end of file diff --git a/function.pdf-setdash.html b/function.pdf-setdash.html new file mode 100644 index 0000000..84aa7f1 --- /dev/null +++ b/function.pdf-setdash.html @@ -0,0 +1,186 @@ +pdf_setdash
PHP Manual
PrevNext

pdf_setdash

(PHP3 >= 3.0.6, PHP4 )

pdf_setdash -- Sets dash pattern

Description

void pdf_setdash (int pdf document, double white, double black)

The pdf_setdash() function sets the dash pattern + white white points and black + black points. If both are 0 a solid line is set.


PrevHomeNext
pdf_setlinewidthUppdf_moveto
\ No newline at end of file diff --git a/function.pdf-setflat.html b/function.pdf-setflat.html new file mode 100644 index 0000000..8a6498e --- /dev/null +++ b/function.pdf-setflat.html @@ -0,0 +1,175 @@ +pdf_setflat
PHP Manual
PrevNext

pdf_setflat

(PHP3 >= 3.0.6, PHP4 )

pdf_setflat -- Sets flatness

Description

void pdf_setflat (int pdf document, double value)

The pdf_setflat() function sets the flatness to + a value between 0 and 100.


PrevHomeNext
pdf_rotateUppdf_setlinejoin
\ No newline at end of file diff --git a/function.pdf-setgray-fill.html b/function.pdf-setgray-fill.html new file mode 100644 index 0000000..94ff125 --- /dev/null +++ b/function.pdf-setgray-fill.html @@ -0,0 +1,183 @@ +pdf_setgray_fill
PHP Manual
PrevNext

pdf_setgray_fill

(PHP3 >= 3.0.6, PHP4 )

pdf_setgray_fill -- Sets filling color to gray value

Description

void pdf_setgray_fill (int pdf document, double gray value)

The pdf_setgray_fill() function sets the current + gray value to fill a path.

See also pdf_setrgbcolor_fill().


PrevHomeNext
pdf_clipUppdf_setgray_stroke
\ No newline at end of file diff --git a/function.pdf-setgray-stroke.html b/function.pdf-setgray-stroke.html new file mode 100644 index 0000000..a363497 --- /dev/null +++ b/function.pdf-setgray-stroke.html @@ -0,0 +1,183 @@ +pdf_setgray_stroke
PHP Manual
PrevNext

pdf_setgray_stroke

(PHP3 >= 3.0.6, PHP4 )

pdf_setgray_stroke -- Sets drawing color to gray value

Description

void pdf_setgray_stroke (int pdf document, double gray value)

The pdf_setgray_stroke() function sets the current + drawing color to the given gray value.

See also pdf_setrgbcolor_stroke().


PrevHomeNext
pdf_setgray_fillUppdf_setgray
\ No newline at end of file diff --git a/function.pdf-setgray.html b/function.pdf-setgray.html new file mode 100644 index 0000000..57db448 --- /dev/null +++ b/function.pdf-setgray.html @@ -0,0 +1,190 @@ +pdf_setgray
PHP Manual
PrevNext

pdf_setgray

(PHP3 >= 3.0.6, PHP4 )

pdf_setgray -- Sets drawing and filling color to gray value

Description

void pdf_setgray (int pdf document, double gray value)

The pdf_setgray() function sets the current + drawing and filling color to the given gray value.

See also pdf_setrgbcolor_stroke(), + pdf_setrgbcolor_fill().


PrevHomeNext
pdf_setgray_strokeUppdf_setrgbcolor_fill
\ No newline at end of file diff --git a/function.pdf-setlinecap.html b/function.pdf-setlinecap.html new file mode 100644 index 0000000..eee2ea4 --- /dev/null +++ b/function.pdf-setlinecap.html @@ -0,0 +1,175 @@ +pdf_setlinecap
PHP Manual
PrevNext

pdf_setlinecap

(PHP3 >= 3.0.6, PHP4 )

pdf_setlinecap -- Sets linecap parameter

Description

void pdf_setlinecap (int pdf document, int value)

The pdf_setlinecap() function sets the linecap + parameter between a value of 0 and 2.


PrevHomeNext
pdf_setlinejoinUppdf_setmiterlimit
\ No newline at end of file diff --git a/function.pdf-setlinejoin.html b/function.pdf-setlinejoin.html new file mode 100644 index 0000000..23ccc65 --- /dev/null +++ b/function.pdf-setlinejoin.html @@ -0,0 +1,175 @@ +pdf_setlinejoin
PHP Manual
PrevNext

pdf_setlinejoin

(PHP3 >= 3.0.6, PHP4 )

pdf_setlinejoin -- Sets linejoin parameter

Description

void pdf_setlinejoin (int pdf document, long value)

The pdf_setlinejoin() function sets the linejoin + parameter between a value of 0 and 2.


PrevHomeNext
pdf_setflatUppdf_setlinecap
\ No newline at end of file diff --git a/function.pdf-setlinewidth.html b/function.pdf-setlinewidth.html new file mode 100644 index 0000000..ef413af --- /dev/null +++ b/function.pdf-setlinewidth.html @@ -0,0 +1,180 @@ +pdf_setlinewidth
PHP Manual
PrevNext

pdf_setlinewidth

(PHP3 >= 3.0.6, PHP4 )

pdf_setlinewidth -- Sets line width

Description

void pdf_setlinewidth (int pdf document, double width)

The pdf_setlinewidth() function sets the line width + to width.


PrevHomeNext
pdf_setmiterlimitUppdf_setdash
\ No newline at end of file diff --git a/function.pdf-setmiterlimit.html b/function.pdf-setmiterlimit.html new file mode 100644 index 0000000..b2194f7 --- /dev/null +++ b/function.pdf-setmiterlimit.html @@ -0,0 +1,175 @@ +pdf_setmiterlimit
PHP Manual
PrevNext

pdf_setmiterlimit

(PHP3 >= 3.0.6, PHP4 )

pdf_setmiterlimit -- Sets miter limit

Description

void pdf_setmiterlimit (int pdf document, double value)

The pdf_setmiterlimit() function sets the miter limit + to a value greater of equal than 1.


PrevHomeNext
pdf_setlinecapUppdf_setlinewidth
\ No newline at end of file diff --git a/function.pdf-setrgbcolor-fill.html b/function.pdf-setrgbcolor-fill.html new file mode 100644 index 0000000..ed1ea69 --- /dev/null +++ b/function.pdf-setrgbcolor-fill.html @@ -0,0 +1,180 @@ +pdf_setrgbcolor_fill
PHP Manual
PrevNext

pdf_setrgbcolor_fill

(PHP3 >= 3.0.6, PHP4 )

pdf_setrgbcolor_fill -- Sets filling color to rgb color value

Description

void pdf_setrgbcolor_fill (int pdf document, double red value, double green value, double blue value)

The pdf_setrgbcolor_fill() function sets the current + rgb color value to fill a path.

See also pdf_setrgbcolor_fill().


PrevHomeNext
pdf_setgrayUppdf_setrgbcolor_stroke
\ No newline at end of file diff --git a/function.pdf-setrgbcolor-stroke.html b/function.pdf-setrgbcolor-stroke.html new file mode 100644 index 0000000..10bc003 --- /dev/null +++ b/function.pdf-setrgbcolor-stroke.html @@ -0,0 +1,180 @@ +pdf_setrgbcolor_stroke
PHP Manual
PrevNext

pdf_setrgbcolor_stroke

(PHP3 >= 3.0.6, PHP4 )

pdf_setrgbcolor_stroke -- Sets drawing color to rgb color value

Description

void pdf_setrgbcolor_stroke (int pdf document, double red value, double green value, double blue value)

The pdf_setrgbcolor_stroke() function sets the current + drawing color to the given rgb color value.

See also pdf_setrgbcolor_stroke().


PrevHomeNext
pdf_setrgbcolor_fillUppdf_setrgbcolor
\ No newline at end of file diff --git a/function.pdf-setrgbcolor.html b/function.pdf-setrgbcolor.html new file mode 100644 index 0000000..bc13a96 --- /dev/null +++ b/function.pdf-setrgbcolor.html @@ -0,0 +1,193 @@ +pdf_setrgbcolor
PHP Manual
PrevNext

pdf_setrgbcolor

(PHP3 >= 3.0.6, PHP4 )

pdf_setrgbcolor -- Sets drawing and filling color to rgb color value

Description

void pdf_setrgbcolor (int pdf document, double red value, double green value, double blue value)

The pdf_setrgbcolor_stroke() function sets the current + drawing and filling color to the given rgb color value.

See also pdf_setrgbcolor_stroke(), + pdf_setrgbcolor_fill().


PrevHomeNext
pdf_setrgbcolor_strokeUppdf_add_outline
\ No newline at end of file diff --git a/function.pdf-show-boxed.html b/function.pdf-show-boxed.html new file mode 100644 index 0000000..6149317 --- /dev/null +++ b/function.pdf-show-boxed.html @@ -0,0 +1,259 @@ +pdf_show_boxed
PHP Manual
PrevNext

pdf_show_boxed

(PHP4 >= 4.0RC1)

pdf_show_boxed -- Output text in a box

Description

int pdf_show_boxed (int pdf document, string text, double x-coor, double y-coor, double width, double height, string mode)

The pdf_show_boxed() function outputs the + string text in a box with its lower left position + at (x-coor, y-coor). + The boxes dimension is height by + width. The parameter mode + determines how the text is type set. If width + and height are zero, the + mode can be "left", "right" or "center". + If width or height is + unequal zero it can also be "justify" and "fulljustify". +

Returns the number of characters that could not be processed because + they did not fit into the box. +

See also pdf_show(), + pdf_show_xy(). +


PrevHomeNext
pdf_showUppdf_show_xy
\ No newline at end of file diff --git a/function.pdf-show-xy.html b/function.pdf-show-xy.html new file mode 100644 index 0000000..cd02ce1 --- /dev/null +++ b/function.pdf-show-xy.html @@ -0,0 +1,206 @@ +pdf_show_xy
PHP Manual
PrevNext

pdf_show_xy

(PHP3 >= 3.0.6, PHP4 )

pdf_show_xy -- Output text at given position

Description

void pdf_show_xy (int pdf document, string text, double x-coor, double y-coor)

The pdf_show_xy() function outputs the + string text at position + (x-coor, y-coor).

See also pdf_show(), + pdf_show_boxed().


PrevHomeNext
pdf_show_boxedUppdf_set_font
\ No newline at end of file diff --git a/function.pdf-show.html b/function.pdf-show.html new file mode 100644 index 0000000..d07ee5b --- /dev/null +++ b/function.pdf-show.html @@ -0,0 +1,210 @@ +pdf_show
PHP Manual
PrevNext

pdf_show

(PHP3 >= 3.0.6, PHP4 )

pdf_show -- Output text at current position

Description

void pdf_show (int pdf document, string text)

The pdf_show() function outputs the + string text at the current text position + using the current font.

See also pdf_show_xy(), + pdf_show_boxed(), + pdf_set_text_pos(), + pdf_set_font().


PrevHomeNext
pdf_end_pageUppdf_show_boxed
\ No newline at end of file diff --git a/function.pdf-skew.html b/function.pdf-skew.html new file mode 100644 index 0000000..1403b8c --- /dev/null +++ b/function.pdf-skew.html @@ -0,0 +1,198 @@ +pdf_skew
PHP Manual
PrevNext

pdf_skew

(PHP4 >= 4.0RC1)

pdf_skew -- Skews the coordinate system

Description

void pdf_skew (int pdf document, double alpha, double beta)

The pdf_skew() function skew the coordinate + system by alpha (x) and + beta (y) degrees. + alpha and beta may + not be 90 or 270 degrees.


PrevHomeNext
pdf_set_word_spacingUppdf_continue_text
\ No newline at end of file diff --git a/function.pdf-stringwidth.html b/function.pdf-stringwidth.html new file mode 100644 index 0000000..bf739cd --- /dev/null +++ b/function.pdf-stringwidth.html @@ -0,0 +1,196 @@ +pdf_stringwidth
PHP Manual
PrevNext

pdf_stringwidth

(PHP3 >= 3.0.6, PHP4 )

pdf_stringwidth -- Returns width of text using current font

Description

double pdf_stringwidth (int pdf document, string text)

The pdf_stringwidth() function returns the + width of the string in text by using the + current font. It requires a font to be set before with + pdf_set_font().

See also pdf_set_font().


PrevHomeNext
pdf_continue_textUppdf_save
\ No newline at end of file diff --git a/function.pdf-stroke.html b/function.pdf-stroke.html new file mode 100644 index 0000000..f5189ee --- /dev/null +++ b/function.pdf-stroke.html @@ -0,0 +1,191 @@ +pdf_stroke
PHP Manual
PrevNext

pdf_stroke

(PHP3 >= 3.0.6, PHP4 )

pdf_stroke -- Draws line along path

Description

void pdf_stroke (int pdf document)

The pdf_stroke() function draws a line along + current path. The current path is the sum of all line drawing. + Without this function the line would not be drawn.

See also pdf_closepath(), + pdf_closepath_stroke().


PrevHomeNext
pdf_closepathUppdf_closepath_stroke
\ No newline at end of file diff --git a/function.pdf-translate.html b/function.pdf-translate.html new file mode 100644 index 0000000..8453e1e --- /dev/null +++ b/function.pdf-translate.html @@ -0,0 +1,237 @@ +pdf_translate
PHP Manual
PrevNext

pdf_translate

(PHP3 >= 3.0.6, PHP4 )

pdf_translate -- Sets origin of coordinate system

Description

void pdf_translate (int pdf document, double x-coor, double y-coor)

The pdf_translate() function sets the origin of + coordinate system to the point (x-coor, + y-coor) relativ the current origin. + The following example draws + a line from (0, 0) to (200, 200) relative to the initial coordinate + system. You have to set the current point after + pdf_translate() and before you start drawing + more objects. + +

Example 1. Translation


<?php pdf_moveto($pdf, 0, 0);
+pdf_lineto($pdf, 100, 100);
+pdf_stroke($pdf);
+pdf_translate($pdf, 100, 100);
+pdf_moveto($pdf, 0, 0);
+pdf_lineto($pdf, 100, 100);
+pdf_stroke($pdf);
+?>
+


PrevHomeNext
pdf_restoreUppdf_scale
\ No newline at end of file diff --git a/function.pfpro-cleanup.html b/function.pfpro-cleanup.html new file mode 100644 index 0000000..0764298 --- /dev/null +++ b/function.pfpro-cleanup.html @@ -0,0 +1,193 @@ +pfpro_cleanup
PHP Manual
PrevNext

pfpro_cleanup

(PHP4 >= 4.0.2)

pfpro_cleanup -- Shuts down the Payflow Pro library

Description

void pfpro_cleanup(void);

pfpro_cleanup() is used to shutdown the + Payflow Pro library cleanly. It should be called after you + have processed any transactions and before the end of your script. + However you may omit this call, in which case this + extension will automatically call pfpro_cleanup() + after your script terminates. +

+ See also pfpro_init(). +


PrevHomeNext
pfpro_initUppfpro_process
\ No newline at end of file diff --git a/function.pfpro-init.html b/function.pfpro-init.html new file mode 100644 index 0000000..11857f9 --- /dev/null +++ b/function.pfpro-init.html @@ -0,0 +1,191 @@ +pfpro_init
PHP Manual
PrevNext

pfpro_init

(PHP4 >= 4.0.2)

pfpro_init -- Initialises the Payflow Pro library

Description

void pfpro_init(void);

pfpro_init() is used to initialise + the Payflow Pro library. You may omit this call, in which case + this extension will automatically call pfpro_init() + before the first transaction. +

+ See also pfpro_cleanup(). +


PrevHomeNext
Verisign Payflow Pro functionsUppfpro_cleanup
\ No newline at end of file diff --git a/function.pfpro-process-raw.html b/function.pfpro-process-raw.html new file mode 100644 index 0000000..872ff3d --- /dev/null +++ b/function.pfpro-process-raw.html @@ -0,0 +1,275 @@ +pfpro_process_raw
PHP Manual
PrevNext

pfpro_process_raw

(PHP4 >= 4.0.2)

pfpro_process_raw -- Process a raw transaction with Payflow Pro

Description

string pfpro_process_raw (string parameters [, string + address [, int + port [, int + timeout [, string + proxy address [, int + proxy port [, string + proxy logon [, string + proxy password]]]]]]])

Returns: A string containing the response. +

+ pfpro_process_raw() processes a raw transaction + string with Payflow Pro. You should really use + pfpro_process() instead, as the encoding + rules of these transactions are non-standard. +

The first parameter in this case is a string containing the raw + transaction request. All other parameters are the same as with + pfpro_process(). The return value is a string + containing the raw response. +

Note: + Be sure to read the Payflow Pro Developers Guide for full details + of the required parameters and encoding rules. You would be + well advised to use pfpro_process() instead. +

Example 1. Payflow Pro raw example


<?php
+
+pfpro_init();
+
+$response = pfpro_process("USER=mylogin&PWD[5]=m&ndy&TRXTYPE=S&TENDER=C&AMT=1.50&ACCT=4111111111111111&EXPDATE=0904");
+
+if (!$response) {
+  die("Couldn't establish link to Verisign.\n");
+}
+
+echo "Verisign raw response was ".$response;
+
+pfpro_cleanup();
+
+?>
+     

PrevHomeNext
pfpro_processUppfpro_version
\ No newline at end of file diff --git a/function.pfpro-process.html b/function.pfpro-process.html new file mode 100644 index 0000000..9a2190e --- /dev/null +++ b/function.pfpro-process.html @@ -0,0 +1,295 @@ +pfpro_process
PHP Manual
PrevNext

pfpro_process

(PHP4 >= 4.0.2)

pfpro_process -- Process a transaction with Payflow Pro

Description

array pfpro_process (array parameters [, string + address [, int + port [, int + timeout [, string + proxy address [, int + proxy port [, string + proxy logon [, string + proxy password]]]]]]])

Returns: An associative array containing the response +

+ pfpro_process() processes a transaction + with Payflow Pro. The first parameter is an associative + array containing keys and values that will be encoded and + passed to the processor. +

The second parameter is optional and specifies the host + to connect to. By default this is "test.signio.com", so + you will certainly want to change this to "connect.signio.com" + in order to process live transactions. +

The third parameter specifies the port to connect on. It + defaults to 443, the standard SSL port. +

The fourth parameter specifies the timeout to be used, in seconds. + This defaults to 30 seconds. Note that this timeout appears to only + begin once a link to the processor has been established and so your + script could potentially continue for a very long time in the event + of DNS or network problems. +

The fifth parameter, if required, specifies the hostname of your + SSL proxy. The sixth parameter specifies the port to use. +

The seventh and eighth parameters specify the logon identity + and password to use on the proxy. +

The function returns an associative array of the keys and values + in the response. +

Note: + Be sure to read the Payflow Pro Developers Guide for full details + of the required parameters. +

Example 1. Payflow Pro example


<?php
+
+pfpro_init();
+
+$transaction = array(USER	=> 'mylogin',
+		     PWD	=> 'mypassword',
+		     TRXTYPE	=> 'S',
+		     TENDER	=> 'C',
+		     AMT	=> 1.50,
+		     ACCT	=> '4111111111111111',
+		     EXPDATE	=> '0904'
+		     );
+
+$response = pfpro_process($transaction);
+
+if (!$response) {
+  die("Couldn't establish link to Verisign.\n");
+}
+
+echo "Verisign response code was ".$response[RESULT];
+echo ", which means: ".$response[RESPMSG]."\n";
+
+echo "\nThe transaction request: ";
+print_r($transaction);
+
+echo "\nThe response: ";
+print_r($response);
+
+pfpro_cleanup();
+
+?>
+     

PrevHomeNext
pfpro_cleanupUppfpro_process_raw
\ No newline at end of file diff --git a/function.pfpro-version.html b/function.pfpro-version.html new file mode 100644 index 0000000..e31ee58 --- /dev/null +++ b/function.pfpro-version.html @@ -0,0 +1,177 @@ +pfpro_version
PHP Manual
PrevNext

pfpro_version

(PHP4 >= 4.0.2)

pfpro_version -- Returns the version of the Payflow Pro software

Description

string pfpro_version(void);

+ pfpro_version() returns the version string + of the Payflow Pro library. At the time of writing, this was L211. +


PrevHomeNext
pfpro_process_rawUpPHP options & information
\ No newline at end of file diff --git a/function.pfsockopen.html b/function.pfsockopen.html new file mode 100644 index 0000000..8710643 --- /dev/null +++ b/function.pfsockopen.html @@ -0,0 +1,192 @@ +pfsockopen
PHP Manual
PrevNext

pfsockopen

(PHP3 >= 3.0.7, PHP4 )

pfsockopen --  + Open persistent Internet or Unix domain socket connection +

Description

int pfsockopen (string hostname, int port [, int + errno [, string + errstr [, int + timeout]]])

This function behaves exactly as fsockopen() + with the difference that the connection is not closed after the + script finishes. It is the persistent version of + fsockopen(). +


PrevHomeNext
openlogUpsocket_get_status
\ No newline at end of file diff --git a/function.pg-client-encoding.html b/function.pg-client-encoding.html new file mode 100644 index 0000000..4d1984c --- /dev/null +++ b/function.pg-client-encoding.html @@ -0,0 +1,208 @@ +pg_client_encoding
PHP Manual
PrevNext

pg_client_encoding

(PHP4 CVS only)

pg_client_encoding --  + Get the client encoding +

Description

string pg_client_encoding ([int + connection])

The functions returns the client encoding as the string. The + returned string should be either : + SQL_ASCII, EUC_JP, EUC_CN, EUC_KR, EUC_TW, UNICODE, + MULE_INTERNAL, LATINX (X=1...9), KOI8, WIN, ALT, + SJIS, BIG5, WIN1250. +

Note: + This function requires PHP-4.0.2 or higher and PostgreSQL-7.0 or + higher. +

The function used to be called + pg_clientencoding(). +

See also pg_set_client_encoding(). +


PrevHomeNext
pg_set_client_encodingUppg_trace
\ No newline at end of file diff --git a/function.pg-clientencoding.html b/function.pg-clientencoding.html new file mode 100644 index 0000000..46fbe0a --- /dev/null +++ b/function.pg-clientencoding.html @@ -0,0 +1,198 @@ +pg_clientencoding
PHP Manual
PrevNext

pg_clientencoding

(PHP4 >= 4.0.2)

pg_clientencoding --  + Get the client encoding +

Description

string pg_clientencoding ([int + connection])

The functions returns the client encoding as the string. The + returned string should be either : + SQL_ASCII, EUC_JP, EUC_CN, EUC_KR, EUC_TW, UNICODE, + MULE_INTERNAL, LATINX (X=1...9), KOI8, WIN, ALT, + SJIS, BIG5, WIN1250. +

Note: + This function requires PHP-4.0.2 or higher and PostgreSQL-7.0 or + higher. +

See also pg_setclientencoding(). +


PrevHomeNext
pg_setclientencodingUppg_trace
\ No newline at end of file diff --git a/function.pg-close.html b/function.pg-close.html new file mode 100644 index 0000000..d4a5269 --- /dev/null +++ b/function.pg-close.html @@ -0,0 +1,202 @@ +pg_close
PHP Manual
PrevNext

pg_close

(PHP3 , PHP4 )

pg_close -- Close a PostgreSQL connection

Description

bool pg_close (int connection)

Returns false if connection is not a valid connection index, true + otherwise. Closes down the connection to a PostgreSQL database + associated with the given connection index. +

Note: + This isn't usually necessary, as non-persistent open + links are automatically closed at the end of the script's + execution. +

+ pg_close() will not close persistent links + generated by pg_pconnect(). +


PrevHomeNext
PostgreSQL functionsUppg_cmdtuples
\ No newline at end of file diff --git a/function.pg-cmdtuples.html b/function.pg-cmdtuples.html new file mode 100644 index 0000000..b9e434c --- /dev/null +++ b/function.pg-cmdtuples.html @@ -0,0 +1,219 @@ +pg_cmdtuples
PHP Manual
PrevNext

pg_cmdtuples

(PHP3 , PHP4 )

pg_cmdtuples -- Returns number of affected tuples

Description

int pg_cmdtuples (int result_id)

Pg_cmdtuples() returns the number of tuples + (instances) affected by INSERT, UPDATE, and DELETE queries. If no + tuple is affected the function will return 0. +

Example 1. Pg_cmdtuples()


<?php
+$result = pg_exec ($conn, "INSERT INTO publisher VALUES ('Author')");
+$cmdtuples = pg_cmdtuples ($result);
+echo $cmdtuples . " <- cmdtuples affected.";
+?>
+      
+


PrevHomeNext
pg_closeUppg_connect
\ No newline at end of file diff --git a/function.pg-connect.html b/function.pg-connect.html new file mode 100644 index 0000000..b00225d --- /dev/null +++ b/function.pg-connect.html @@ -0,0 +1,279 @@ +pg_connect
PHP Manual
PrevNext

pg_connect

(PHP3 , PHP4 )

pg_connect -- Open a PostgreSQL connection

Description

int pg_connect (string conn_string)

Returns a connection index on success, or false if the connection + could not be made. Opens a connection to a PostgreSQL database. + The arguments should be within a quoted string. +

Example 1. Using pg_connect arguments


<?php
+$dbconn = pg_Connect ("dbname=mary");
+//connect to a database named "mary"
+$dbconn2 = pg_Connect ("host=localhost port=5432 dbname=mary");
+//connect to a database named "mary" on "localhost" at port "5432"
+$dbconn3 = pg_Connect ("user=lamb passwd=baaaa dbname=mary ");
+//connect to a database named "mary" with a username and password
+?>
+     
+ The arguments available include dbname + port, host, + tty, options, + user, and password +

This function returns a connection index that is needed by other + PostgreSQL functions. You can have multiple connections open at + once. +

The previous syntax of: + $conn = pg_connect ("host", "port", "options", "tty", + "dbname") + + has been deprecated. +

See also pg_pconnect(). +


PrevHomeNext
pg_cmdtuplesUppg_dbname
\ No newline at end of file diff --git a/function.pg-dbname.html b/function.pg-dbname.html new file mode 100644 index 0000000..867ac16 --- /dev/null +++ b/function.pg-dbname.html @@ -0,0 +1,174 @@ +pg_dbname
PHP Manual
PrevNext

pg_dbname

(PHP3 , PHP4 )

pg_dbname -- Get the database name

Description

string pg_dbname (int connection)

Returns the name of the database that the given PostgreSQL + connection index is connected to, or false if connection is not a + valid connection index. +


PrevHomeNext
pg_connectUppg_end_copy
\ No newline at end of file diff --git a/function.pg-end-copy.html b/function.pg-end-copy.html new file mode 100644 index 0000000..e0a1a79 --- /dev/null +++ b/function.pg-end-copy.html @@ -0,0 +1,189 @@ +pg_end_copy
PHP Manual
PrevNext

pg_end_copy

(PHP4 CVS only)

pg_end_copy -- Sync with PostgreSQL backend

Description

bool pg_end_copy ([resource + connection])

pg_end_copy() syncs PostgreSQL frontend with + the backend after doing a copy operation. It must be issued or + the backend may get "out of sync" with the frontend. Returns + TRUE if successfull, FALSE otherwise. +

For further details and an example, see also + pg_put_line(). +


PrevHomeNext
pg_dbnameUppg_errormessage
\ No newline at end of file diff --git a/function.pg-errormessage.html b/function.pg-errormessage.html new file mode 100644 index 0000000..c9e453d --- /dev/null +++ b/function.pg-errormessage.html @@ -0,0 +1,180 @@ +pg_errormessage
PHP Manual
PrevNext

pg_errormessage

(PHP3 , PHP4 )

pg_errormessage -- Get the error message string

Description

string pg_errormessage (int connection)

Returns a string containing the error message, false on failure. + Details about the error probably cannot be retrieved using the + pg_errormessage() function if an error occured + on the last database action for which a valid connection exists, + this function will return a string containing the error message + generated by the backend server. +


PrevHomeNext
pg_end_copyUppg_exec
\ No newline at end of file diff --git a/function.pg-exec.html b/function.pg-exec.html new file mode 100644 index 0000000..df475c2 --- /dev/null +++ b/function.pg-exec.html @@ -0,0 +1,202 @@ +pg_exec
PHP Manual
PrevNext

pg_exec

(PHP3 , PHP4 )

pg_exec -- Execute a query

Description

int pg_exec (int connection, string query)

Returns a result index if query could be executed, false on + failure or if connection is not a valid connection index. Details + about the error can be retrieved using the + pg_ErrorMessage() function if connection is + valid. Sends an SQL statement to the PostgreSQL database + specified by the connection index. The connection must be a valid + index that was returned by pg_Connect(). The + return value of this function is an index to be used to access + the results from other PostgreSQL functions. +

Note: + PHP/FI returned 1 if the query was not expected to return data + (inserts or updates, for example) and greater than 1 even on + selects that did not return anything. No such assumption can be + made in PHP. +

+


PrevHomeNext
pg_errormessageUppg_fetch_array
\ No newline at end of file diff --git a/function.pg-fetch-array.html b/function.pg-fetch-array.html new file mode 100644 index 0000000..40c8c6e --- /dev/null +++ b/function.pg-fetch-array.html @@ -0,0 +1,298 @@ +pg_fetch_array
PHP Manual
PrevNext

pg_fetch_array

(PHP3 >= 3.0.1, PHP4 )

pg_fetch_array -- Fetch a row as an array

Description

array pg_fetch_array (int result, int row [, int + result_type])

+ Returns: An array that corresponds to the fetched row, or false + if there are no more rows. +

Pg_fetch_array() is an extended version of + pg_fetch_row(). In addition to storing the + data in the numeric indices of the result array, it also stores + the data in associative indices, using the field names as keys. +

The third optional argument result_type in + pg_fetch_array() is a constant and can take the + following values: PGSQL_ASSOC, PGSQL_NUM, and PGSQL_BOTH. +

Note: + Result_type was added in PHP 4.0. +

+

An important thing to note is that using + pg_fetch_array() is NOT significantly + slower than using pg_fetch_row(), while it + provides a significant added value. +

For further details, see also + pg_fetch_row() +

Example 1. PostgreSQL fetch array


<?php 
+$conn = pg_pconnect ("dbname=publisher");
+if (!$conn) {
+    echo "An error occured.\n";
+    exit;
+}
+
+$result = pg_Exec ($conn, "SELECT * FROM authors");
+if (!$result) {
+    echo "An error occured.\n";
+    exit;
+}
+
+$arr = pg_fetch_array ($result, 0);
+echo $arr[0] . " <- array\n";
+
+$arr = pg_fetch_array ($result, 1);
+echo $arr["author"] . " <- array\n";
+?>
+     

PrevHomeNext
pg_execUppg_fetch_object
\ No newline at end of file diff --git a/function.pg-fetch-object.html b/function.pg-fetch-object.html new file mode 100644 index 0000000..0687bf0 --- /dev/null +++ b/function.pg-fetch-object.html @@ -0,0 +1,329 @@ +pg_fetch_object
PHP Manual
PrevNext

pg_fetch_object

(PHP3 >= 3.0.1, PHP4 )

pg_fetch_object -- Fetch a row as an object

Description

object pg_fetch_object (int result, int row [, int + result_type])

+ Returns: An object with properties that correspond to the fetched + row, or false if there are no more rows. +

+ Pg_fetch_object() is similar to + pg_fetch_array(), with one difference - an + object is returned, instead of an array. Indirectly, that means + that you can only access the data by the field names, and not by + their offsets (numbers are illegal property names). +

The third optional argument result_type in + pg_fetch_object() is a constant and can take the + following values: PGSQL_ASSOC, PGSQL_NUM, and PGSQL_BOTH. +

Note: + Result_type was added in PHP 4.0. +

+

Speed-wise, the function is identical to + pg_fetch_array(), and almost as quick as + pg_fetch_row() (the difference is + insignificant). +

+ See also: pg_fetch_array() and + pg_fetch_row(). +

Example 1. Postgres fetch object


<?php 
+$database = "verlag";
+$db_conn = pg_connect ("host=localhost port=5432 dbname=$database");
+if (!$db_conn): ?>
+    <H1>Failed connecting to postgres database <? echo $database ?></H1> <?
+    exit;
+endif;
+
+$qu = pg_exec ($db_conn, "SELECT * FROM verlag ORDER BY autor");
+$row = 0; // postgres needs a row counter other dbs might not 
+
+while ($data = pg_fetch_object ($qu, $row)):
+    echo $data->autor." (";
+    echo $data->jahr ."): ";
+    echo $data->titel."<BR>";
+    $row++;
+endwhile; ?>
+
+<PRE><?php
+$fields[] = Array ("autor", "Author");
+$fields[] = Array ("jahr",  "  Year");
+$fields[] = Array ("titel", " Title");
+
+$row= 0; // postgres needs a row counter other dbs might not
+while ($data = pg_fetch_object ($qu, $row)):
+    echo "----------\n";
+    reset ($fields);
+    while (list (,$item) = each ($fields)):
+        echo $item[1].": ".$data->$item[0]."\n";
+    endwhile;
+    $row++;
+endwhile;
+echo "----------\n"; ?>
+</PRE> <?php
+pg_freeResult ($qu);
+pg_close ($db_conn);
+?>
+      
+


PrevHomeNext
pg_fetch_arrayUppg_fetch_row
\ No newline at end of file diff --git a/function.pg-fetch-row.html b/function.pg-fetch-row.html new file mode 100644 index 0000000..0364ac6 --- /dev/null +++ b/function.pg-fetch-row.html @@ -0,0 +1,267 @@ +pg_fetch_row
PHP Manual
PrevNext

pg_fetch_row

(PHP3 >= 3.0.1, PHP4 )

pg_fetch_row -- Get a row as an enumerated array

Description

array pg_fetch_row (int result, int row)

+ Returns: An array that corresponds to the fetched row, or false + if there are no more rows. +

Pg_fetch_row() fetches one row of data from + the result associated with the specified result identifier. The + row is returned as an array. Each result column is stored in an + array offset, starting at offset 0. +

See also: pg_fetch_array(), + pg_fetch_object(), + pg_result(). +

Example 1. Postgres fetch row


<?php 
+$conn = pg_pconnect ("dbname=publisher");
+if (!$conn) {
+    echo "An error occured.\n";
+    exit;
+}
+
+$result = pg_Exec ($conn, "SELECT * FROM authors");
+if (!$result) {
+    echo "An error occured.\n";
+    exit;
+}
+
+$num = pg_numrows($result); 
+
+for ($i=0; $i<$num; $i++) {
+  $r = pg_fetch_row($result, $i);
+
+  for ($j=0; $j<count($r); $j++) {
+    echo "$r[$j]&nbsp;";
+  }
+
+  echo "<BR>";
+
+}
+ 
+?>
+      
+


PrevHomeNext
pg_fetch_objectUppg_fieldisnull
\ No newline at end of file diff --git a/function.pg-fieldisnull.html b/function.pg-fieldisnull.html new file mode 100644 index 0000000..df936c9 --- /dev/null +++ b/function.pg-fieldisnull.html @@ -0,0 +1,175 @@ +pg_fieldisnull
PHP Manual
PrevNext

pg_fieldisnull

(PHP3 , PHP4 )

pg_fieldisnull -- Test if a field is NULL

Description

int pg_fieldisnull (int result_id, int row, mixed field)

Test if a field is NULL or not. Returns 0 if the field in the + given row is not NULL. Returns 1 if the field in the given row is + NULL. Field can be specified as number or fieldname. Row + numbering starts at 0. +


PrevHomeNext
pg_fetch_rowUppg_fieldname
\ No newline at end of file diff --git a/function.pg-fieldname.html b/function.pg-fieldname.html new file mode 100644 index 0000000..fb0f816 --- /dev/null +++ b/function.pg-fieldname.html @@ -0,0 +1,177 @@ +pg_fieldname
PHP Manual
PrevNext

pg_fieldname

(PHP3 , PHP4 )

pg_fieldname -- Returns the name of a field

Description

string pg_fieldname (int result_id, int field_number)

Pg_fieldname() will return the name of the + field occupying the given column number in the given PostgreSQL + result identifier. Field numbering starts from 0. +


PrevHomeNext
pg_fieldisnullUppg_fieldnum
\ No newline at end of file diff --git a/function.pg-fieldnum.html b/function.pg-fieldnum.html new file mode 100644 index 0000000..87cfed4 --- /dev/null +++ b/function.pg-fieldnum.html @@ -0,0 +1,178 @@ +pg_fieldnum
PHP Manual
PrevNext

pg_fieldnum

(PHP3 , PHP4 )

pg_fieldnum -- Returns the field number of the named field

Description

int pg_fieldnum (int result_id, string field_name)

Pg_fieldnum() will return the number of the + column slot that corresponds to the named field in the given + PosgreSQL result identifier. Field numbering starts at 0. This + function will return -1 on error. +


PrevHomeNext
pg_fieldnameUppg_fieldprtlen
\ No newline at end of file diff --git a/function.pg-fieldprtlen.html b/function.pg-fieldprtlen.html new file mode 100644 index 0000000..dc25a5f --- /dev/null +++ b/function.pg-fieldprtlen.html @@ -0,0 +1,178 @@ +pg_fieldprtlen
PHP Manual
PrevNext

pg_fieldprtlen

(PHP3 , PHP4 )

pg_fieldprtlen -- Returns the printed length

Description

int pg_fieldprtlen (int result_id, int row_number, string field_name)

Pg_fieldprtlen() will return the actual + printed length (number of characters) of a specific value in a + PostgreSQL result. Row numbering starts at 0. This function + will return -1 on an error. +


PrevHomeNext
pg_fieldnumUppg_fieldsize
\ No newline at end of file diff --git a/function.pg-fieldsize.html b/function.pg-fieldsize.html new file mode 100644 index 0000000..79d842a --- /dev/null +++ b/function.pg-fieldsize.html @@ -0,0 +1,181 @@ +pg_fieldsize
PHP Manual
PrevNext

pg_fieldsize

(PHP3 , PHP4 )

pg_fieldsize --  + Returns the internal storage size of the named field +

Description

int pg_fieldsize (int result_id, int field_number)

Pg_fieldsize() will return the internal + storage size (in bytes) of the field number in the given + PostgreSQL result. Field numbering starts at 0. A field size of + -1 indicates a variable length field. This function will return + false on error. +


PrevHomeNext
pg_fieldprtlenUppg_fieldtype
\ No newline at end of file diff --git a/function.pg-fieldtype.html b/function.pg-fieldtype.html new file mode 100644 index 0000000..e147f8a --- /dev/null +++ b/function.pg-fieldtype.html @@ -0,0 +1,179 @@ +pg_fieldtype
PHP Manual
PrevNext

pg_fieldtype

(PHP3 , PHP4 )

pg_fieldtype --  + Returns the type name for the corresponding field number +

Description

string pg_fieldtype (int result_id, int field_number)

Pg_fieldtype() will return a string containing + the type name of the given field in the given PostgreSQL result + identifier. Field numbering starts at 0. +


PrevHomeNext
pg_fieldsizeUppg_freeresult
\ No newline at end of file diff --git a/function.pg-freeresult.html b/function.pg-freeresult.html new file mode 100644 index 0000000..1e7a944 --- /dev/null +++ b/function.pg-freeresult.html @@ -0,0 +1,184 @@ +pg_freeresult
PHP Manual
PrevNext

pg_freeresult

(PHP3 , PHP4 )

pg_freeresult -- Free reult memory

Description

int pg_freeresult (int result_id)

Pg_freeresult() only needs to be called if you + are worried about using too much memory while your script is + running. All result memory will automatically be freed when the + script is finished. But, if you are sure you are not going to + need the result data anymore in a script, you may call + pg_freeresult() with the result identifier as + an argument and the associated result memory will be freed. +


PrevHomeNext
pg_fieldtypeUppg_getlastoid
\ No newline at end of file diff --git a/function.pg-getlastoid.html b/function.pg-getlastoid.html new file mode 100644 index 0000000..cc4524d --- /dev/null +++ b/function.pg-getlastoid.html @@ -0,0 +1,200 @@ +pg_getlastoid
PHP Manual
PrevNext

pg_getlastoid

(PHP3 , PHP4 )

pg_getlastoid -- Returns the last object identifier

Description

int pg_getlastoid (int result_id)

Pg_getlastoid() can be used to retrieve the + oid assigned to an inserted tuple if the + result identifier is used from the last command sent via + pg_exec() and was an SQL INSERT. This + function will return a positive integer if there was a valid + oid. It will return -1 if an error occured or + the last command sent via pg_exec() was not an + INSERT. +


PrevHomeNext
pg_freeresultUppg_host
\ No newline at end of file diff --git a/function.pg-host.html b/function.pg-host.html new file mode 100644 index 0000000..a4d3c36 --- /dev/null +++ b/function.pg-host.html @@ -0,0 +1,178 @@ +pg_host
PHP Manual
PrevNext

pg_host

(PHP3 , PHP4 )

pg_host --  + Returns the host name associated with the connection +

Description

string pg_host (int connection_id)

Pg_host() will return the host name of the + given PostgreSQL connection identifier is connected to. +


PrevHomeNext
pg_getlastoidUppg_loclose
\ No newline at end of file diff --git a/function.pg-loclose.html b/function.pg-loclose.html new file mode 100644 index 0000000..7bfd274 --- /dev/null +++ b/function.pg-loclose.html @@ -0,0 +1,188 @@ +pg_loclose
PHP Manual
PrevNext

pg_loclose

(PHP3 , PHP4 )

pg_loclose -- Close a large object

Description

void pg_loclose (int fd)

Pg_loclose() closes an Inversion Large + Object. Fd is a file descriptor for the + large object from pg_loopen(). +


PrevHomeNext
pg_hostUppg_locreate
\ No newline at end of file diff --git a/function.pg-locreate.html b/function.pg-locreate.html new file mode 100644 index 0000000..fd36950 --- /dev/null +++ b/function.pg-locreate.html @@ -0,0 +1,189 @@ +pg_locreate
PHP Manual
PrevNext

pg_locreate

(PHP3 , PHP4 )

pg_locreate -- Create a large object

Description

int pg_locreate (int conn)

Pg_locreate() creates an Inversion Large + Object and returns the oid of the large + object. conn specifies a valid database + connection. PostgreSQL access modes INV_READ, INV_WRITE, and + INV_ARCHIVE are not supported, the object is created always with + both read and write access. INV_ARCHIVE has been removed from + PostgreSQL itself (version 6.3 and above). +


PrevHomeNext
pg_locloseUppg_loexport
\ No newline at end of file diff --git a/function.pg-loexport.html b/function.pg-loexport.html new file mode 100644 index 0000000..919d144 --- /dev/null +++ b/function.pg-loexport.html @@ -0,0 +1,190 @@ +pg_loexport
PHP Manual
PrevNext

pg_loexport

(PHP4 >= 4.0.1)

pg_loexport -- Export a large object to file

Description

bool pg_loexport (int + oid, int + file [, int + connection_id])

The oid argument specifies the object id + of the large object to export and the + filename argument specifies the pathname + of the file. Returns FALSE if an error occurred, TRUE + otherwise. Remember that handling large objects in PostgreSQL + must happen inside a transaction. +


PrevHomeNext
pg_locreateUppg_loimport
\ No newline at end of file diff --git a/function.pg-loimport.html b/function.pg-loimport.html new file mode 100644 index 0000000..94b47f1 --- /dev/null +++ b/function.pg-loimport.html @@ -0,0 +1,183 @@ +pg_loimport
PHP Manual
PrevNext

pg_loimport

(PHP4 >= 4.0.1)

pg_loimport -- Import a large object from file

Description

int pg_loimport (int + file [, int + connection_id])

The filename argument specifies the + pathname of the file to be imported as a large object. Returns + FALSE if an error occurred, object id of the just created large + object otherwise. Remember that handling large objects in + PostgreSQL must happen inside a transaction. +


PrevHomeNext
pg_loexportUppg_loopen
\ No newline at end of file diff --git a/function.pg-loopen.html b/function.pg-loopen.html new file mode 100644 index 0000000..7171b1b --- /dev/null +++ b/function.pg-loopen.html @@ -0,0 +1,190 @@ +pg_loopen
PHP Manual
PrevNext

pg_loopen

(PHP3 , PHP4 )

pg_loopen -- Open a large object

Description

int pg_loopen (int conn, int objoid, string mode)

Pg_loopen() open an Inversion Large Object and + returns file descriptor of the large object. The file descriptor + encapsulates information about the connection. Do not close the + connection before closing the large object file descriptor. + objoid specifies a valid large object oid + and mode can be either "r", "w", or "rw". +


PrevHomeNext
pg_loimportUppg_loread
\ No newline at end of file diff --git a/function.pg-loread.html b/function.pg-loread.html new file mode 100644 index 0000000..7b008a6 --- /dev/null +++ b/function.pg-loread.html @@ -0,0 +1,195 @@ +pg_loread
PHP Manual
PrevNext

pg_loread

(PHP3 , PHP4 )

pg_loread -- Read a large object

Description

string pg_loread (int fd, int len)

pg_loread() reads at most + len bytes from a large object and + returns it as a string. + fd specifies a valid large object file + descriptor andlen specifies the maximum + allowable size of the large object segment. +


PrevHomeNext
pg_loopenUppg_loreadall
\ No newline at end of file diff --git a/function.pg-loreadall.html b/function.pg-loreadall.html new file mode 100644 index 0000000..f848162 --- /dev/null +++ b/function.pg-loreadall.html @@ -0,0 +1,179 @@ +pg_loreadall
PHP Manual
PrevNext

pg_loreadall

(PHP3 , PHP4 )

pg_loreadall --  + Read a entire large object and send straight to browser +

Description

void pg_loreadall (int fd)

Pg_loreadall() reads a large object and + passes it straight through to the browser after sending all pending + headers. Mainly intended for sending binary data like images or sound. +


PrevHomeNext
pg_loreadUppg_lounlink
\ No newline at end of file diff --git a/function.pg-lounlink.html b/function.pg-lounlink.html new file mode 100644 index 0000000..a112d3d --- /dev/null +++ b/function.pg-lounlink.html @@ -0,0 +1,181 @@ +pg_lounlink
PHP Manual
PrevNext

pg_lounlink

(PHP3 , PHP4 )

pg_lounlink -- Delete a large object

Description

void pg_lounlink (int conn, int lobjid)

Pg_lounlink() deletes a large object with the + lobjid identifier for that large object. +


PrevHomeNext
pg_loreadallUppg_lowrite
\ No newline at end of file diff --git a/function.pg-lowrite.html b/function.pg-lowrite.html new file mode 100644 index 0000000..0f700a0 --- /dev/null +++ b/function.pg-lowrite.html @@ -0,0 +1,195 @@ +pg_lowrite
PHP Manual
PrevNext

pg_lowrite

(PHP3 , PHP4 )

pg_lowrite -- Write a large object

Description

int pg_lowrite (int fd, string buf)

Pg_lowrite() writes at most to a large object + from a variable buf and returns the number + of bytes actually written, or false in the case of an error. + fd is a file descriptor for the large + object from pg_loopen(). +


PrevHomeNext
pg_lounlinkUppg_numfields
\ No newline at end of file diff --git a/function.pg-numfields.html b/function.pg-numfields.html new file mode 100644 index 0000000..d675a2f --- /dev/null +++ b/function.pg-numfields.html @@ -0,0 +1,184 @@ +pg_numfields
PHP Manual
PrevNext

pg_numfields

(PHP3 , PHP4 )

pg_numfields -- Returns the number of fields

Description

int pg_numfields (int result_id)

Pg_numfields() will return the number of + fields (columns) in a PostgreSQL result. The argument is a valid + result identifier returned by pg_exec(). This + function will return -1 on error. +


PrevHomeNext
pg_lowriteUppg_numrows
\ No newline at end of file diff --git a/function.pg-numrows.html b/function.pg-numrows.html new file mode 100644 index 0000000..e0e797f --- /dev/null +++ b/function.pg-numrows.html @@ -0,0 +1,184 @@ +pg_numrows
PHP Manual
PrevNext

pg_numrows

(PHP3 , PHP4 )

pg_numrows -- Returns the number of rows

Description

int pg_numrows (int result_id)

Pg_numrows() will return the number of rows in a + PostgreSQL result. The argument is a valid result identifier + returned by pg_exec(). This function will + return -1 on error. +


PrevHomeNext
pg_numfieldsUppg_options
\ No newline at end of file diff --git a/function.pg-options.html b/function.pg-options.html new file mode 100644 index 0000000..2f97087 --- /dev/null +++ b/function.pg-options.html @@ -0,0 +1,177 @@ +pg_options
PHP Manual
PrevNext

pg_options

(PHP3 , PHP4 )

pg_options -- Get the options associated with the connection

Description

string pg_options (int connection_id)

Pg_options() will return a string containing + the options specified on the given PostgreSQL connection + identifier. +


PrevHomeNext
pg_numrowsUppg_pconnect
\ No newline at end of file diff --git a/function.pg-pconnect.html b/function.pg-pconnect.html new file mode 100644 index 0000000..f48fcc3 --- /dev/null +++ b/function.pg-pconnect.html @@ -0,0 +1,237 @@ +pg_pconnect
PHP Manual
PrevNext

pg_pconnect

(PHP3 , PHP4 )

pg_pconnect -- Open a persistant PostgreSQL connection

Description

int pg_pconnect (string conn_string)

Returns a connection index on success, or false if the connection + could not be made. Opens a connection to a PostgreSQL database. + The arguments should be within a quoted string. + The arguments available include dbname + port, host, + tty, options, + user, and password +

This function returns a connection index that is needed by other + PostgreSQL functions. You can have multiple connections open at + once. +

The previous syntax of: + $conn = pg_pconnect ("host", "port", "options", "tty", + "dbname") + + has been deprecated. +

See also pg_connect(). +


PrevHomeNext
pg_optionsUppg_port
\ No newline at end of file diff --git a/function.pg-port.html b/function.pg-port.html new file mode 100644 index 0000000..de462d5 --- /dev/null +++ b/function.pg-port.html @@ -0,0 +1,178 @@ +pg_port
PHP Manual
PrevNext

pg_port

(PHP3 , PHP4 )

pg_port --  + Return the port number associated with the connection +

Description

int pg_port (int connection_id)

Pg_port() will return the port number that the + given PostgreSQL connection identifier is connected to. +


PrevHomeNext
pg_pconnectUppg_put_line
\ No newline at end of file diff --git a/function.pg-put-line.html b/function.pg-put-line.html new file mode 100644 index 0000000..b627cf4 --- /dev/null +++ b/function.pg-put-line.html @@ -0,0 +1,247 @@ +pg_put_line
PHP Manual
PrevNext

pg_put_line

(PHP4 CVS only)

pg_put_line -- Send a NULL-terminated string to PostgreSQL backend

Description

bool pg_put_line ([resource + connection_id, string data])

pg_put_line() sends a NULL-terminated string + to the PostgreSQL backend server. This is useful for example for + very high-speed inserting of data into a table, initiated by + starting a PostgreSQL copy-operation. That final NULL-character + is added automatically. Returns TRUE if successfull, FALSE + otherwise. +

Note: + Note the application must explicitly send the two characters "\." + on a final line to indicate to the backend that it has finished + sending its data. +

See also pg_end_copy(). +

Example 1. High-speed insertion of data into a table


<?php 
+    $conn = pg_pconnect ("dbname=foo");
+    pg_exec($conn, "create table bar (a int4, b char(16), d float8)");
+    pg_exec($conn, "copy bar from stdin");
+    pg_put_line($conn, "3\thello world\t4.5\n");
+    pg_put_line($conn, "4\tgoodbye world\t7.11\n");
+    pg_put_line($conn, "\\.\n");
+    pg_end_copy($conn);
+?>
+      
+


PrevHomeNext
pg_portUppg_result
\ No newline at end of file diff --git a/function.pg-result.html b/function.pg-result.html new file mode 100644 index 0000000..7abd2fa --- /dev/null +++ b/function.pg-result.html @@ -0,0 +1,206 @@ +pg_result
PHP Manual
PrevNext

pg_result

(PHP3 , PHP4 )

pg_result -- Returns values from a result identifier

Description

mixed pg_result (int result_id, int row_number, mixed fieldname)

Pg_result() will return values from a result + identifier produced by pg_Exec(). The + row_number and + fieldname sepcify what cell in the table + of results to return. Row numbering starts from 0. Instead of + naming the field, you may use the field index as an unquoted + number. Field indices start from 0. +

PostgreSQL has many built in types and only the basic ones are + directly supported here. All forms of integer, boolean and oid + types are returned as integer values. All forms of float, and + real types are returned as double values. All other types, + including arrays are returned as strings formatted in the same + default PostgreSQL manner that you would see in the + psql program. +


PrevHomeNext
pg_put_lineUppg_set_client_encoding
\ No newline at end of file diff --git a/function.pg-set-client-encoding.html b/function.pg-set-client-encoding.html new file mode 100644 index 0000000..672c64b --- /dev/null +++ b/function.pg-set-client-encoding.html @@ -0,0 +1,217 @@ +pg_set_client_encoding
PHP Manual
PrevNext

pg_set_client_encoding

(PHP4 CVS only)

pg_set_client_encoding --  + Set the client encoding +

Description

int pg_set_client_encoding ([int + connection, string encoding])

The function set the client encoding and return 0 if success or + -1 if error. +

encoding is the client + encoding and can be either : + SQL_ASCII, EUC_JP, EUC_CN, EUC_KR, EUC_TW, UNICODE, + MULE_INTERNAL, LATINX (X=1...9), KOI8, WIN, ALT, + SJIS, BIG5, WIN1250. +

Note: + This function requires PHP-4.0.2 or higher and PostgreSQL-7.0 or + higher. +

The function used to be called + pg_setclientencoding(). +

See also pg_client_encoding(). +


PrevHomeNext
pg_resultUppg_client_encoding
\ No newline at end of file diff --git a/function.pg-setclientencoding.html b/function.pg-setclientencoding.html new file mode 100644 index 0000000..e2ce7c1 --- /dev/null +++ b/function.pg-setclientencoding.html @@ -0,0 +1,207 @@ +pg_setclientencoding
PHP Manual
PrevNext

pg_setclientencoding

(PHP4 >= 4.0.2)

pg_setclientencoding --  + Set the client encoding +

Description

int pg_setclientencoding ([int + connection, string encoding])

The function set the client encoding and return 0 if success or + -1 if error. +

encoding is the client + encoding and can be either : + SQL_ASCII, EUC_JP, EUC_CN, EUC_KR, EUC_TW, UNICODE, + MULE_INTERNAL, LATINX (X=1...9), KOI8, WIN, ALT, + SJIS, BIG5, WIN1250. +

Note: + This function requires PHP-4.0.2 or higher and PostgreSQL-7.0 or + higher. +

See also pg_clientencoding(). +


PrevHomeNext
pg_resultUppg_clientencoding
\ No newline at end of file diff --git a/function.pg-trace.html b/function.pg-trace.html new file mode 100644 index 0000000..d4c0976 --- /dev/null +++ b/function.pg-trace.html @@ -0,0 +1,242 @@ +pg_trace
PHP Manual
PrevNext

pg_trace

(PHP4 >= 4.0.1)

pg_trace -- Enable tracing a PostgreSQL connection

Description

bool pg_trace (string + filename [, string + mode [, int + connection]])

Enables tracing of the PostgreSQL frontend/backend communication + to a debugging file. To fully understand the results one needs to + be familiar with the internals of PostgreSQL communication + protocol. For those who are not, it can still be useful for + tracing errors in queries sent to the server, you could do for + example grep '^To backend' trace.log and see + what query actually were sent to the PostgreSQL server. +

Filename and mode + are the same as in fopen() + (mode defaults to 'w'), + connection specifies the connection to + trace and defaults to the last one opened. +

Returns TRUE if filename could be opened + for logging, FALSE otherwise. +

See also fopen() and + pg_untrace(). +


PrevHomeNext
pg_client_encodingUppg_tty
\ No newline at end of file diff --git a/function.pg-tty.html b/function.pg-tty.html new file mode 100644 index 0000000..26f73fe --- /dev/null +++ b/function.pg-tty.html @@ -0,0 +1,179 @@ +pg_tty
PHP Manual
PrevNext

pg_tty

(PHP3 , PHP4 )

pg_tty --  + Return the tty name associated with the connection +

Description

string pg_tty (int connection_id)

Pg_tty() will return the tty name that server + side debugging output is sent to on the given PostgreSQL + connection identifier. +


PrevHomeNext
pg_traceUppg_untrace
\ No newline at end of file diff --git a/function.pg-untrace.html b/function.pg-untrace.html new file mode 100644 index 0000000..0c685b9 --- /dev/null +++ b/function.pg-untrace.html @@ -0,0 +1,198 @@ +pg_untrace
PHP Manual
PrevNext

pg_untrace

(PHP4 >= 4.0.1)

pg_untrace -- Disable tracing of a PostgreSQL connection

Description

bool pg_untrace ([int + connection])

Stop tracing started by pg_trace(). + connection specifies the connection that was + traced and defaults to the last one opened. +

Returns always TRUE. +

See also pg_trace(). +


PrevHomeNext
pg_ttyUpProgram Execution functions
\ No newline at end of file diff --git a/function.php-logo-guid.html b/function.php-logo-guid.html new file mode 100644 index 0000000..3bae7ee --- /dev/null +++ b/function.php-logo-guid.html @@ -0,0 +1,207 @@ +php_logo_guid
PHP Manual
PrevNext

php_logo_guid

(PHP4 >= 4.0b4)

php_logo_guid -- Get the logo guid

Description

string php_logo_guid (void)

Note: + This funcionality was added in PHP 4 Beta 4. +

+

See also phpinfo(). + phpversion(), + phpcredits() +


PrevHomeNext
phpversionUpphp_sapi_name
\ No newline at end of file diff --git a/function.php-sapi-name.html b/function.php-sapi-name.html new file mode 100644 index 0000000..53dec02 --- /dev/null +++ b/function.php-sapi-name.html @@ -0,0 +1,224 @@ +php_sapi_name
PHP Manual
PrevNext

php_sapi_name

(PHP4 >= 4.0.1)

php_sapi_name --  + Returns the type of interface between web server and PHP +

Description

string php_sapi_name(void);

Php_sapi_name() returns a lowercase string which + describes the type of interface between web server and PHP + (Server API, SAPI). In CGI PHP, this string is "cgi", in + mod_php for Apache, this string is "apache" and so on. +

Example 1. Php_sapi_name() Example


$inter_type = php_sapi_name();
+if ($inter_type == "cgi")
+    print "You are using CGI PHP\n";
+else
+    print "You are not using CGI PHP\n";
+      
+


PrevHomeNext
php_logo_guidUpphp_uname
\ No newline at end of file diff --git a/function.php-uname.html b/function.php-uname.html new file mode 100644 index 0000000..a28ac58 --- /dev/null +++ b/function.php-uname.html @@ -0,0 +1,220 @@ +php_uname
PHP Manual
PrevNext

php_uname

(PHP4 >= 4.0.2)

php_uname --  + Returns information about the operating system PHP was built on +

Description

string php_uname(void);

php_uname() returns a string with a description + of the operating system PHP is built on. +

Example 1. php_uname() Example


if (substr(php_uname(), 0, 7) == "Windows") {
+    die("Sorry, this script doesn't run on Windows.\n");
+}
+
+


PrevHomeNext
php_sapi_nameUpputenv
\ No newline at end of file diff --git a/function.phpcredits.html b/function.phpcredits.html new file mode 100644 index 0000000..235713b --- /dev/null +++ b/function.phpcredits.html @@ -0,0 +1,406 @@ +phpcredits
PHP Manual
PrevNext

phpcredits

(PHP4 )

phpcredits -- Prints out the credits for PHP.

Description

void phpcredits (int flag)

This function prints out the credits listing the PHP developers, + modules, etc. It generates the appropriate HTML codes to insert + the information in a page. A parameter indicating what will be + printed (a pre-defined constant flag, see table below) needs + to be passed. For example to print the general credits, you will + use somewhere in your code: +


...
+phpcredits(CREDITS_GENERAL);
+...
+      

+ And if you want to print the core developers and the documentation + group, in a page of its own, you will use: +


<?php
+  phpcredits(CREDITS_GROUP + CREDITS_DOCS + CREDITS_FULLPAGE);
+?>  
+      

+ And if you feel like embedding all the credits in your page, then + code like the one below will do it: +


<html>
+  <head>
+    <title>My credits page</title>
+  </head>
+  <body>
+  <?php
+    // some code of your own
+    phpcredits(CREDITS_ALL + CREDITS_FULLPAGE);
+    // some more code
+  ?>
+  </body>
+</html>
+      

+

Table 1. Pre-defined phpcredits() flags

namedescription
CREDITS_ALL All the credits, equivalent to using: CREDITS_DOCS + CREDITS_GENERAL + + CREDITS_GROUP + CREDITS_MODULES + CREDITS_FULLPAGE. It generates a + complete stand-alone HTML page with the appropriate tags. +
CREDITS_DOCSThe credits for the documentation team
CREDITS_FULLPAGE Usually used in combination with the other flags. + Indicates that the a complete stand-alone HTML page + needs to be printed including the information indicated + by the other flags. +
CREDITS_GENERAL General credits: Language design and concept, PHP 4.0 authors + and SAPI module. +
CREDITS_GROUPA list of the core developers
CREDITS_MODULESA list of the extension modules for PHP, and their authors
CREDITS_SAPIThis flag is defined but, as of PHP 4.0.1pl2, it is not used
+

See also phpinfo(), + phpversion(), + php_logo_guid(). +


PrevHomeNext
ini_setUpphpinfo
\ No newline at end of file diff --git a/function.phpinfo.html b/function.phpinfo.html new file mode 100644 index 0000000..08897fd --- /dev/null +++ b/function.phpinfo.html @@ -0,0 +1,200 @@ +phpinfo
PHP Manual
PrevNext

phpinfo

(PHP3 , PHP4 )

phpinfo -- Output lots of PHP information.

Description

int phpinfo (void)

Outputs a large amount of information about the current state of + PHP. This includes information about PHP compilation options and + extensions, the PHP version, server information and environment + (if compiled as a module), the PHP environment, OS version + information, paths, master and local values of configuration + options, HTTP headers, and the GNU Public License. +

See also phpversion(), + phpcredits(), + php_logo_guid() +


PrevHomeNext
phpcreditsUpphpversion
\ No newline at end of file diff --git a/function.phpversion.html b/function.phpversion.html new file mode 100644 index 0000000..a0969c1 --- /dev/null +++ b/function.phpversion.html @@ -0,0 +1,232 @@ +phpversion
PHP Manual
PrevNext

phpversion

(PHP3 , PHP4 )

phpversion -- Get the current PHP version.

Description

string phpversion (void)

Returns a string containing the version of the currently running + PHP parser. +

Example 1. phpversion() example


// prints e.g. 'Current PHP version: 3.0rel-dev'
+echo "Current PHP version: ".phpversion();
+      
+

See also phpinfo(), + phpcredits(), + php_logo_guid() +


PrevHomeNext
phpinfoUpphp_logo_guid
\ No newline at end of file diff --git a/function.pi.html b/function.pi.html new file mode 100644 index 0000000..270d5bc --- /dev/null +++ b/function.pi.html @@ -0,0 +1,172 @@ +pi
PHP Manual
PrevNext

pi

(PHP3 , PHP4 )

pi -- Get value of pi

Description

double pi (void)

Returns an approximation of pi. +


PrevHomeNext
octdecUppow
\ No newline at end of file diff --git a/function.popen.html b/function.popen.html new file mode 100644 index 0000000..4f4dcc7 --- /dev/null +++ b/function.popen.html @@ -0,0 +1,251 @@ +popen
PHP Manual
PrevNext

popen

(PHP3 , PHP4 )

popen -- Opens process file pointer

Description

int popen (string command, string mode)

+ Opens a pipe to a process executed by forking the command given + by command. +

+ Returns a file pointer identical to that returned by + fopen(), except that it is unidirectional (may + only be used for reading or writing) and must be closed with + pclose(). This pointer may be used with + fgets(), fgetss(), and + fputs(). +

If an error occurs, returns false. +


$fp = popen ("/bin/ls", "r");
+      

+

See also pclose(). +


PrevHomeNext
pcloseUpreadfile
\ No newline at end of file diff --git a/function.pos.html b/function.pos.html new file mode 100644 index 0000000..47614d8 --- /dev/null +++ b/function.pos.html @@ -0,0 +1,207 @@ +pos
PHP Manual
PrevNext

pos

(PHP3 , PHP4 )

pos -- Get the current element from an array

Description

mixed pos (array array)

This is an alias for current(). +

See also: + end(), next(), + prev() and reset(). +


PrevHomeNext
nextUpprev
\ No newline at end of file diff --git a/function.posix-ctermid.html b/function.posix-ctermid.html new file mode 100644 index 0000000..9b2d222 --- /dev/null +++ b/function.posix-ctermid.html @@ -0,0 +1,171 @@ +posix_ctermid
PHP Manual
PrevNext

posix_ctermid

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

posix_ctermid -- Get path name of controlling terminal

Description

string posix_ctermid (void )

Needs to be written.


PrevHomeNext
posix_timesUpposix_ttyname
\ No newline at end of file diff --git a/function.posix-getcwd.html b/function.posix-getcwd.html new file mode 100644 index 0000000..3cddd5c --- /dev/null +++ b/function.posix-getcwd.html @@ -0,0 +1,171 @@ +posix_getcwd
PHP Manual
PrevNext

posix_getcwd

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

posix_getcwd -- Pathname of current directory

Description

string posix_getcwd (void )

Needs to be written ASAP.


PrevHomeNext
posix_isattyUpposix_mkfifo
\ No newline at end of file diff --git a/function.posix-getegid.html b/function.posix-getegid.html new file mode 100644 index 0000000..27a7b2b --- /dev/null +++ b/function.posix-getegid.html @@ -0,0 +1,181 @@ +posix_getegid
PHP Manual
PrevNext

posix_getegid

(PHP3 >= 3.0.10, PHP4 >= 4.0b4)

posix_getegid --  + Return the effective group ID of the current process +

Description

int posix_getegid (void )

Return the numeric effective group ID of the current process. See + also posix_getgrgid() for information on how + to convert this into a useable group name.


PrevHomeNext
posix_getgidUpposix_setuid
\ No newline at end of file diff --git a/function.posix-geteuid.html b/function.posix-geteuid.html new file mode 100644 index 0000000..5483227 --- /dev/null +++ b/function.posix-geteuid.html @@ -0,0 +1,181 @@ +posix_geteuid
PHP Manual
PrevNext

posix_geteuid

(PHP3 >= 3.0.10, PHP4 >= 4.0b4)

posix_geteuid --  + Return the effective user ID of the current process +

Description

int posix_geteuid (void )

Return the numeric effective user ID of the current process. See + also posix_getpwuid() for information on how + to convert this into a useable username.


PrevHomeNext
posix_getuidUpposix_getgid
\ No newline at end of file diff --git a/function.posix-getgid.html b/function.posix-getgid.html new file mode 100644 index 0000000..1ca0c16 --- /dev/null +++ b/function.posix-getgid.html @@ -0,0 +1,181 @@ +posix_getgid
PHP Manual
PrevNext

posix_getgid

(PHP3 >= 3.0.10, PHP4 >= 4.0b4)

posix_getgid --  + Return the real group ID of the current process +

Description

int posix_getgid (void )

Return the numeric real group ID of the current process. See also + posix_getgrgid() for information on how to + convert this into a useable group name.


PrevHomeNext
posix_geteuidUpposix_getegid
\ No newline at end of file diff --git a/function.posix-getgrgid.html b/function.posix-getgrgid.html new file mode 100644 index 0000000..4516094 --- /dev/null +++ b/function.posix-getgrgid.html @@ -0,0 +1,171 @@ +posix_getgrgid
PHP Manual
PrevNext

posix_getgrgid

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

posix_getgrgid -- Return info about a group by group id

Description

array posix_getgrgid (int gid)

Needs to be written.


PrevHomeNext
posix_getgrnamUpposix_getpwnam
\ No newline at end of file diff --git a/function.posix-getgrnam.html b/function.posix-getgrnam.html new file mode 100644 index 0000000..e630db7 --- /dev/null +++ b/function.posix-getgrnam.html @@ -0,0 +1,171 @@ +posix_getgrnam
PHP Manual
PrevNext

posix_getgrnam

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

posix_getgrnam -- Return info about a group by name

Description

array posix_getgrnam (string name)

Needs to be written.


PrevHomeNext
posix_mkfifoUpposix_getgrgid
\ No newline at end of file diff --git a/function.posix-getgroups.html b/function.posix-getgroups.html new file mode 100644 index 0000000..98279b6 --- /dev/null +++ b/function.posix-getgroups.html @@ -0,0 +1,182 @@ +posix_getgroups
PHP Manual
PrevNext

posix_getgroups

(PHP3 >= 3.0.10, PHP4 >= 4.0b4)

posix_getgroups --  + Return the group set of the current process +

Description

array posix_getgroups (void )

Returns an array of integers containing the numeric group ids of + the group set of the current process. See also + posix_getgrgid() for information on how to + convert this into useable group names.


PrevHomeNext
posix_setgidUpposix_getlogin
\ No newline at end of file diff --git a/function.posix-getlogin.html b/function.posix-getlogin.html new file mode 100644 index 0000000..72e5a98 --- /dev/null +++ b/function.posix-getlogin.html @@ -0,0 +1,179 @@ +posix_getlogin
PHP Manual
PrevNext

posix_getlogin

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

posix_getlogin -- Return login name

Description

string posix_getlogin (void )

Returns the login name of the user owning the current process. + See posix_getpwnam() for information how to + get more information about this user.


PrevHomeNext
posix_getgroupsUpposix_getpgrp
\ No newline at end of file diff --git a/function.posix-getpgid.html b/function.posix-getpgid.html new file mode 100644 index 0000000..972a35e --- /dev/null +++ b/function.posix-getpgid.html @@ -0,0 +1,181 @@ +posix_getpgid
PHP Manual
PrevNext

posix_getpgid

(PHP3 >= 3.0.10, PHP4 >= 4.0b4)

posix_getpgid -- Get process group id for job control

Description

int posix_getpgid (int pid)

Returns the process group identifier of the process + pid.

This is not a POSIX function, but is common on BSD and System V + systems. If your system does not support this function at system + level, this PHP function will always return FALSE.


PrevHomeNext
posix_setpgidUpposix_getsid
\ No newline at end of file diff --git a/function.posix-getpgrp.html b/function.posix-getpgrp.html new file mode 100644 index 0000000..a047fa2 --- /dev/null +++ b/function.posix-getpgrp.html @@ -0,0 +1,175 @@ +posix_getpgrp
PHP Manual
PrevNext

posix_getpgrp

(PHP3 >= 3.0.10, PHP4 >= 4.0b4)

posix_getpgrp --  + Return the current process group identifier +

Description

int posix_getpgrp (void )

Return the process group identifier of the current process. See + POSIX.1 and the getpgrp(2) manual page on your POSIX system for + more information on process groups.


PrevHomeNext
posix_getloginUpposix_setsid
\ No newline at end of file diff --git a/function.posix-getpid.html b/function.posix-getpid.html new file mode 100644 index 0000000..081ae41 --- /dev/null +++ b/function.posix-getpid.html @@ -0,0 +1,171 @@ +posix_getpid
PHP Manual
PrevNext

posix_getpid

(PHP3 >= 3.0.10, PHP4 >= 4.0b4)

posix_getpid -- Return the current process identifier

Description

int posix_getpid (void )

Return the process identifier of the current process.


PrevHomeNext
posix_killUpposix_getppid
\ No newline at end of file diff --git a/function.posix-getppid.html b/function.posix-getppid.html new file mode 100644 index 0000000..7c98008 --- /dev/null +++ b/function.posix-getppid.html @@ -0,0 +1,173 @@ +posix_getppid
PHP Manual
PrevNext

posix_getppid

(PHP3 >= 3.0.10, PHP4 >= 4.0b4)

posix_getppid -- Return the parent process identifier

Description

int posix_getppid (void )

Return the process identifier of the parent process of the current + process. +


PrevHomeNext
posix_getpidUpposix_getuid
\ No newline at end of file diff --git a/function.posix-getpwnam.html b/function.posix-getpwnam.html new file mode 100644 index 0000000..a483a1b --- /dev/null +++ b/function.posix-getpwnam.html @@ -0,0 +1,314 @@ +posix_getpwnam
PHP Manual
PrevNext

posix_getpwnam

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

posix_getpwnam -- Return info about a user by username

Description

array posix_getpwnam (string username)

Returns an associative array containing information about a + user referenced by an alphanumeric username, passed in the + username parameter. +

The array elements returned are: +

Table 1. The user information array

ElementDescription
name The name element contains the username of the user. This is + a short, usually less than 16 character "handle" of the user, + not her real, full name. This should be the same as the + username parameter used when calling the + function, and hence redundant. +
passwd The passwd element contains the user's password in an encrypted + format. Often, for example on a system employing "shadow" + passwords, an asterisk is returned instead. +
uid User ID of the user in numeric form. +
gid The group ID of the user. Use the function + posix_getgrgid() to resolve the + group name and a list of its members. +
gecos GECOS is an obsolete term that refers to the finger information + field on a Honeywell batch processing system. The field, however, + lives on, and its contents have been formalized by POSIX. The + field contains a comma separated list containing the user's full + name, office phone, office number, and home phone number. On most + systems, only the user's full name is available. +
dir This element contains the absolute path to the + home directory of the user. +
shell The shell element contains the absolute path to the executable of + the user's default shell. +
+


PrevHomeNext
posix_getgrgidUpposix_getpwuid
\ No newline at end of file diff --git a/function.posix-getpwuid.html b/function.posix-getpwuid.html new file mode 100644 index 0000000..6ab0463 --- /dev/null +++ b/function.posix-getpwuid.html @@ -0,0 +1,313 @@ +posix_getpwuid
PHP Manual
PrevNext

posix_getpwuid

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

posix_getpwuid -- Return info about a user by user id

Description

array posix_getpwuid (int uid)

Returns an associative array containing information about a + user referenced by a numeric user ID, passed in the + uid parameter. +

The array elements returned are: +

Table 1. The user information array

ElementDescription
name The name element contains the username of the user. This is + a short, usually less than 16 character "handle" of the user, + not her real, full name. +
passwd The passwd element contains the user's password in an encrypted + format. Often, for example on a system employing "shadow" + passwords, an asterisk is returned instead. +
uid User ID, should be the same as the uid + parameter used when calling the function, and hence redundant. +
gid The group ID of the user. Use the function + posix_getgrgid() to resolve the + group name and a list of its members. +
gecos GECOS is an obsolete term that refers to the finger information + field on a Honeywell batch processing system. The field, however, + lives on, and its contents have been formalized by POSIX. The + field contains a comma separated list containing the user's full + name, office phone, office number, and home phone number. On most + systems, only the user's full name is available. +
dir This element contains the absolute path to the + home directory of the user. +
shell The shell element contains the absolute path to the executable of + the user's default shell. +
+


PrevHomeNext
posix_getpwnamUpposix_getrlimit
\ No newline at end of file diff --git a/function.posix-getrlimit.html b/function.posix-getrlimit.html new file mode 100644 index 0000000..d0ff750 --- /dev/null +++ b/function.posix-getrlimit.html @@ -0,0 +1,171 @@ +posix_getrlimit
PHP Manual
PrevNext

posix_getrlimit

(PHP3 >= 3.0.10, PHP4 >= 4.0b4)

posix_getrlimit -- Return info about system ressource limits

Description

array posix_getrlimit (void )

Needs to be written ASAP.


PrevHomeNext
posix_getpwuidUpPostgreSQL functions
\ No newline at end of file diff --git a/function.posix-getsid.html b/function.posix-getsid.html new file mode 100644 index 0000000..fc90278 --- /dev/null +++ b/function.posix-getsid.html @@ -0,0 +1,187 @@ +posix_getsid
PHP Manual
PrevNext

posix_getsid

(PHP3 >= 3.0.10, PHP4 >= 4.0b4)

posix_getsid -- Get the current sid of the process

Description

int posix_getsid (int pid)

Return the sid of the process pid. + If pid is 0, the sid of the + current process is returned.

This is not a POSIX function, but is common on System V + systems. If your system does not support this function at system + level, this PHP function will always return FALSE.


PrevHomeNext
posix_getpgidUpposix_uname
\ No newline at end of file diff --git a/function.posix-getuid.html b/function.posix-getuid.html new file mode 100644 index 0000000..5e4bcde --- /dev/null +++ b/function.posix-getuid.html @@ -0,0 +1,181 @@ +posix_getuid
PHP Manual
PrevNext

posix_getuid

(PHP3 >= 3.0.10, PHP4 >= 4.0b4)

posix_getuid --  + Return the real user ID of the current process +

Description

int posix_getuid (void )

Return the numeric real user ID of the current process. See also + posix_getpwuid() for information on how to + convert this into a useable username.


PrevHomeNext
posix_getppidUpposix_geteuid
\ No newline at end of file diff --git a/function.posix-isatty.html b/function.posix-isatty.html new file mode 100644 index 0000000..90ddb1d --- /dev/null +++ b/function.posix-isatty.html @@ -0,0 +1,173 @@ +posix_isatty
PHP Manual
PrevNext

posix_isatty

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

posix_isatty --  + Determine if a file descriptor is an interactive terminal +

Description

bool posix_isatty (int fd)

Needs to be written.


PrevHomeNext
posix_ttynameUpposix_getcwd
\ No newline at end of file diff --git a/function.posix-kill.html b/function.posix-kill.html new file mode 100644 index 0000000..3d79178 --- /dev/null +++ b/function.posix-kill.html @@ -0,0 +1,188 @@ +posix_kill
PHP Manual
PrevNext

posix_kill

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

posix_kill -- Send a signal to a process

Description

bool posix_kill (int pid, int sig)

Send the signal sig to the process + with the process identifier pid. + Returns FALSE, if unable to send the signal, TRUE otherwise.

See also the kill(2) manual page of your POSIX system, which + contains additional information about negative process + identifiers, the special pid 0, the special pid -1, and the + signal number 0.


PrevHomeNext
POSIX functionsUpposix_getpid
\ No newline at end of file diff --git a/function.posix-mkfifo.html b/function.posix-mkfifo.html new file mode 100644 index 0000000..4fe6364 --- /dev/null +++ b/function.posix-mkfifo.html @@ -0,0 +1,173 @@ +posix_mkfifo
PHP Manual
PrevNext

posix_mkfifo

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

posix_mkfifo --  + Create a fifo special file (a named pipe) +

Description

bool posix_getcwd (string pathname, int mode)

Needs to be written ASAP..


PrevHomeNext
posix_getcwdUpposix_getgrnam
\ No newline at end of file diff --git a/function.posix-setgid.html b/function.posix-setgid.html new file mode 100644 index 0000000..be41f69 --- /dev/null +++ b/function.posix-setgid.html @@ -0,0 +1,189 @@ +posix_setgid
PHP Manual
PrevNext

posix_setgid

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

posix_setgid --  + Set the effective GID of the current process +

Description

bool posix_setgid (int gid)

Set the real group ID of the current process. This is a + privileged function and you need appropriate privileges (usually + root) on your system to be able to perform this function. The + appropriate order of function calls is + posix_setgid() first, + posix_setuid() last.

Returns TRUE on success, FALSE otherwise.


PrevHomeNext
posix_setuidUpposix_getgroups
\ No newline at end of file diff --git a/function.posix-setpgid.html b/function.posix-setpgid.html new file mode 100644 index 0000000..3d92601 --- /dev/null +++ b/function.posix-setpgid.html @@ -0,0 +1,185 @@ +posix_setpgid
PHP Manual
PrevNext

posix_setpgid

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

posix_setpgid -- set process group id for job control

Description

int posix_setpgid (int pid, int pgid)

Let the process pid join the process + group pgid. See POSIX.1 and + the setsid(2) manual page on your POSIX system for more + informations on process groups and job control. Returns + TRUE on success, FALSE otherwise.


PrevHomeNext
posix_setsidUpposix_getpgid
\ No newline at end of file diff --git a/function.posix-setsid.html b/function.posix-setsid.html new file mode 100644 index 0000000..ba66e35 --- /dev/null +++ b/function.posix-setsid.html @@ -0,0 +1,174 @@ +posix_setsid
PHP Manual
PrevNext

posix_setsid

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

posix_setsid -- Make the current process a session leader

Description

int posix_setsid (void )

Make the current process a session leader. See POSIX.1 and + the setsid(2) manual page on your POSIX system for more + informations on process groups and job control. Returns + the session id.


PrevHomeNext
posix_getpgrpUpposix_setpgid
\ No newline at end of file diff --git a/function.posix-setuid.html b/function.posix-setuid.html new file mode 100644 index 0000000..7e15bbd --- /dev/null +++ b/function.posix-setuid.html @@ -0,0 +1,184 @@ +posix_setuid
PHP Manual
PrevNext

posix_setuid

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

posix_setuid --  + Set the effective UID of the current process +

Description

bool posix_setuid (int uid)

Set the real user ID of the current process. This is a privileged + function and you need appropriate privileges (usually root) on + your system to be able to perform this function.

Returns TRUE on success, FALSE otherwise. See also + posix_setgid().


PrevHomeNext
posix_getegidUpposix_setgid
\ No newline at end of file diff --git a/function.posix-times.html b/function.posix-times.html new file mode 100644 index 0000000..0bc306d --- /dev/null +++ b/function.posix-times.html @@ -0,0 +1,203 @@ +posix_times
PHP Manual
PrevNext

posix_times

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

posix_times -- Get process times

Description

array posix_times (void )

Returns a hash of strings with information about the + current process CPU usage. The indices of the hash are +

  • ticks - the number of clock ticks that have elapsed since + reboot. +

  • utime - user time used by the current process. +

  • stime - system time used by the current process. +

  • cutime - user time used by current process and children. +

  • cstime - system time used by current process and children. +


PrevHomeNext
posix_unameUpposix_ctermid
\ No newline at end of file diff --git a/function.posix-ttyname.html b/function.posix-ttyname.html new file mode 100644 index 0000000..d94a6f8 --- /dev/null +++ b/function.posix-ttyname.html @@ -0,0 +1,171 @@ +posix_ttyname
PHP Manual
PrevNext

posix_ttyname

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

posix_ttyname -- Determine terminal device name

Description

string posix_ttyname (int fd)

Needs to be written.


PrevHomeNext
posix_ctermidUpposix_isatty
\ No newline at end of file diff --git a/function.posix-uname.html b/function.posix-uname.html new file mode 100644 index 0000000..44dd5d5 --- /dev/null +++ b/function.posix-uname.html @@ -0,0 +1,207 @@ +posix_uname
PHP Manual
PrevNext

posix_uname

(PHP3 >= 3.0.10, PHP4 >= 4.0b4)

posix_uname -- Get system name

Description

array posix_uname (void )

Returns a hash of strings with information about the + system. The indices of the hash are +

  • sysname - operating system name (e.g. Linux) +

  • nodename - system name (e.g. valiant) +

  • release - operating system release (e.g. 2.2.10) +

  • version - operating system version (e.g. #4 Tue Jul 20 + 17:01:36 MEST 1999) +

  • machine - system architecture (e.g. i586) +

Posix requires that you must not make any assumptions about the + format of the values, e.g. you cannot rely on three digit version + numbers or anything else returned by this function.


PrevHomeNext
posix_getsidUpposix_times
\ No newline at end of file diff --git a/function.pow.html b/function.pow.html new file mode 100644 index 0000000..6678328 --- /dev/null +++ b/function.pow.html @@ -0,0 +1,182 @@ +pow
PHP Manual
PrevNext

pow

(PHP3 , PHP4 )

pow -- Exponential expression

Description

float pow (float base, float exp)

Returns base raised to the power of exp. +

+ See also exp(). +


PrevHomeNext
piUprad2deg
\ No newline at end of file diff --git a/function.preg-grep.html b/function.preg-grep.html new file mode 100644 index 0000000..8c3e015 --- /dev/null +++ b/function.preg-grep.html @@ -0,0 +1,230 @@ +preg_grep
PHP Manual
PrevNext

preg_grep

(PHP4 )

preg_grep --  + Return array entries that match the pattern +

Description

array preg_grep (string pattern, array input)

preg_grep() returns the array consisting of + the elements of the input array that match + the given pattern.

Example 1. preg_grep() example


// return all array elements
+// containing floating point numbers
+$fl_array = preg_grep ("/^(\d+)?\.\d+$/", $array);
+      
+


PrevHomeNext
preg_quoteUpPattern Modifiers
\ No newline at end of file diff --git a/function.preg-match-all.html b/function.preg-match-all.html new file mode 100644 index 0000000..55e62bc --- /dev/null +++ b/function.preg-match-all.html @@ -0,0 +1,493 @@ +preg_match_all
PHP Manual
PrevNext

preg_match_all

(PHP3 >= 3.0.9, PHP4 )

preg_match_all -- Perform a global regular expression match

Description

int preg_match_all (string pattern, string subject, array matches [, int + order])

Searches subject for all matches to the regular + expression given in pattern and puts them in + matches in the order specified by + order. +

After the first match is found, the subsequent searches are continued + on from end of the last match. +

order can be one of two things: +

PREG_PATTERN_ORDER

Orders results so that $matches[0] is an array of full + pattern matches, $matches[1] is an array of strings matched by + the first parenthesized subpattern, and so on. +


preg_match_all ("|<[^>]+>(.*)</[^>]+>|U", 
+    "<b>example: </b><div align=left>this is a test</div>", 
+    $out, PREG_PATTERN_ORDER);
+print $out[0][0].", ".$out[0][1]."\n";
+print $out[1][0].", ".$out[1][1]."\n"
+	  

+ This example will produce: +


<b>example: </b>, <div align=left>this is a test</div>
+example: , this is a test
+	  

+ So, $out[0] contains array of strings that matched full pattern, + and $out[1] contains array of strings enclosed by tags. +

PREG_SET_ORDER

Orders results so that $matches[0] is an array of first set + of matches, $matches[1] is an array of second set of matches, + and so on. +


preg_match_all ("|<[^>]+>(.*)</[^>]+>|U", 
+    "<b>example: </b><div align=left>this is a test</div>", 
+    $out, PREG_SET_ORDER);
+print $out[0][0].", ".$out[0][1]."\n";
+print $out[1][0].", ".$out[1][1]."\n"
+	  

+ This example will produce: +


<b>example: </b>, example: 
+<div align=left>this is a test</div>, this is a test
+	  

+ In this case, $matches[0] is the first set of matches, and + $matches[0][0] has text matched by full pattern, $matches[0][1] + has text matched by first subpattern and so on. Similarly, + $matches[1] is the second set of matches, etc. +

If order is not specified, it is assumed + to be PREG_PATTERN_ORDER. +

Returns the number of full pattern matches, or false if + no match is found or an error occurred. +

Example 1. Getting all phone numbers out of some text.


preg_match_all ("/\(?  (\d{3})?  \)?  (?(1)  [\-\s] ) \d{3}-\d{4}/x",
+                "Call 555-1212 or 1-800-555-1212", $phones);
+      
+

Example 2. Find matching HTML tags (greedy)


// the \\2 is an example of backreferencing. This tells pcre that
+// it must match the 2nd set of parenthesis in the regular expression
+// itself, which would be the ([\w]+) in this case.
+$html = "<b>bold text</b><a href=howdy.html>click me</a>
+
+preg_match_all ("/(<([\w]+)[^>]*>)(.*)(<\/\\2>)/", $html, $matches);
+
+for ($i=0; $i< count($matches[0]); $i++) {
+echo "matched: ".$matches[0][$i]."\n";
+echo "part 1: ".$matches[1][$i]."\n";
+echo "part 2: ".$matches[3][$i]."\n";
+echo "part 3: ".$matches[4][$i]."\n\n";
+}
+      
+ This example will produce: +

matched: <b>bold text</b>
+part 1: <b>
+part 2: bold text
+part 3: </b>
+
+matched: <a href=howdy.html>click me</a>
+part 1: <a href=howdy.html>
+part 2: click me
+part 3: </a>
+     
+

See also preg_match(), + preg_replace(), + and preg_split(). +


PrevHomeNext
preg_matchUppreg_replace
\ No newline at end of file diff --git a/function.preg-match.html b/function.preg-match.html new file mode 100644 index 0000000..a5f86b5 --- /dev/null +++ b/function.preg-match.html @@ -0,0 +1,366 @@ +preg_match
PHP Manual
PrevNext

preg_match

(PHP3 >= 3.0.9, PHP4 )

preg_match -- Perform a regular expression match

Description

int preg_match (string pattern, string subject [, array + matches])

Searches subject for a match to the regular + expression given in pattern. +

If matches is provided, then it is filled + with the results of search. $matches[0] will contain the text that + match the full pattern, $matches[1] will have the text that matched + the first captured parenthesized subpattern, and so on. +

Returns true if a match for pattern was + found in the subject string, or false if not match was found + or an error occurred.

Example 1. find the string of text "php"


// the "i" after the pattern delimiter indicates a case-insensitive search
+if (preg_match ("/php/i", "PHP is the web scripting language of choice.")) {
+    print "A match was found.";
+} else {
+    print "A match was not found.";
+}
+      
+

Example 2. find the word "web"


// the \b in the pattern indicates a word boundary, so only the distinct
+// word "web" is matched, and not a word partial like "webbing" or "cobweb"
+if (preg_match ("/\bweb\b/i", "PHP is the web scripting language of choice.")) {
+    print "A match was found.";
+} else {
+    print "A match was not found.";
+}
+if (preg_match ("/\bweb\b/i", "PHP is the website scripting language of choice.")) {
+    print "A match was found.";
+} else {
+    print "A match was not found.";
+}
+      
+

Example 3. Getting the domain name out of a URL


preg_match("/^(.*)([^\.]+\.[^\.]+)(\/.*)?/U",
+           "http://www.php.net/index.html", $matches);
+// show the second parenthesized subpattern
+echo "domain name is: ".$matches[2]."\n"; 
+      
+ This example will produce: +

domain name is: php.net
+     
+ See also preg_match_all(), + preg_replace(), and + preg_split(). +


PrevHomeNext
Regular Expression Functions (Perl-Compatible)Uppreg_match_all
\ No newline at end of file diff --git a/function.preg-quote.html b/function.preg-quote.html new file mode 100644 index 0000000..6b99f69 --- /dev/null +++ b/function.preg-quote.html @@ -0,0 +1,294 @@ +preg_quote
PHP Manual
PrevNext

preg_quote

(PHP3 >= 3.0.9, PHP4 )

preg_quote -- Quote regular expression characters

Description

string preg_quote (string str [, string + delimiter])

preg_quote() takes str + and puts a backslash in front of every character that is part of + the regular expression syntax. This is useful if you have a + run-time string that you need to match in some text and the + string may contain special regex characters. +

If the optional delimiter is specified, it + will also be escaped. This is useful for escaping the delimeter + that is required by the PCRE functions. The / is the most commonly + used delimiter.

The special regular expression characters are: +
. \\ + * ? [ ^ ] $ ( ) { } = ! < > | :
+

Example 1.


$keywords = "$40 for a g3/400";
+$keywords = preg_quote ($keywords, "/");
+echo $keywords; // returns \$40 for a g3\/400
+      
+

Example 2. Italicizing a word within some text


+// In this example, preg_quote($word) is used to keep the
+// asterisks from having special meaning to the regular
+// expression.
+
+$textbody = "This book is *very* difficult to find.";
+$word = "*very*";
+$textbody = preg_replace ("/".preg_quote($word)."/",
+                          "<i>".$word."</i>",
+                          $textbody);
+      
+


PrevHomeNext
preg_splitUppreg_grep
\ No newline at end of file diff --git a/function.preg-replace.html b/function.preg-replace.html new file mode 100644 index 0000000..bb0b4b3 --- /dev/null +++ b/function.preg-replace.html @@ -0,0 +1,566 @@ +preg_replace
PHP Manual
PrevNext

preg_replace

(PHP3 >= 3.0.9, PHP4 )

preg_replace -- Perform a regular expression search and replace

Description

mixed preg_replace (mixed pattern, mixed replacement, mixed subject [, int + limit])

Searches subject for matches to + pattern and replaces them with + replacement . If + limit is specified, then only + limit matches will be replaced; if + limit is omitted or is -1, then all + matches are replaced. +

Replacement may contain references of the + form \\n. Every + such reference will be replaced by the text captured by the + n'th parenthesized pattern. + n can be from 0 to 99, and + \\0 refers to the text matched by the whole + pattern. Opening parentheses are counted from left to right + (starting from 1) to obtain the number of the capturing + subpattern. +

If no matches are found in subject, then + it will be returned unchanged. +

Every parameter to preg_replace() can be an + array. +

If subject is an array, then the search + and replace is performed on every entry of + subject, and the return value is an array + as well. +

If pattern and + replacement are arrays, then + preg_replace() takes a value from each array + and uses them to do search and replace on + subject. If + replacement has fewer values than + pattern, then empty string is used for the + rest of replacement values. If pattern + is an array and replacement is a string; + then this replacement string is used for every value of + pattern. The converse would not make + sense, though. +

/e modifier makes + preg_replace() treat the + replacement parameter as PHP code after + the appropriate references substitution is done. Tip: make sure + that replacement constitutes a valid PHP + code string, otherwise PHP will complain about a parse error at + the line containing preg_replace(). +

Example 1. Replacing several values


$patterns = array ("/(19|20)(\d{2})-(\d{1,2})-(\d{1,2})/",
+                   "/^\s*{(\w+)}\s*=/");
+$replace = array ("\\3/\\4/\\1\\2", "$\\1 =");
+print preg_replace ($patterns, $replace, "{startDate} = 1999-5-27");
+      
+ This example will produce: +

$startDate = 5/27/1999
+     
+

Example 2. Using /e modifier


preg_replace ("/(<\/?)(\w+)([^>]*>)/e", 
+              "'\\1'.strtoupper('\\2').'\\3'", 
+              $html_body);
+      

This would capitalize all HTML tags in the input text. +

+

Example 3. Convert HTML to text


// $document should contain an HTML document.
+// This will remove HTML tags, javascript sections
+// and white space. It will also convert some
+// common HTML entities to their text equivalent.
+
+$search = array ("'<script[^>]*?>.*?</script>'si",  // Strip out javascript
+                 "'<[\/\!]*?[^<>]*?>'si",  // Strip out html tags
+                 "'([\r\n])[\s]+'",  // Strip out white space
+                 "'&(quot|#34);'i",  // Replace html entities
+                 "'&(amp|#38);'i",
+                 "'&(lt|#60);'i",
+                 "'&(gt|#62);'i",
+                 "'&(nbsp|#160);'i",
+                 "'&(iexcl|#161);'i",
+                 "'&(cent|#162);'i",
+                 "'&(pound|#163);'i",
+                 "'&(copy|#169);'i",
+                 "'&#(\d+);'e");  // evaluate as php
+
+$replace = array ("",
+                  "",
+                  "\\1",
+                  "\"",
+                  "&",
+                  "<",
+                  ">",
+                  " ",
+                  chr(161),
+                  chr(162),
+                  chr(163),
+                  chr(169),
+                  "chr(\\1)");
+
+$text = preg_replace ($search, $replace, $document);
+      
+

Note: + Parameter limit was added after PHP 4.0.1pl2. +

See also preg_match(), + preg_match_all(), and + preg_split(). +


PrevHomeNext
preg_match_allUppreg_split
\ No newline at end of file diff --git a/function.preg-split.html b/function.preg-split.html new file mode 100644 index 0000000..3c1d666 --- /dev/null +++ b/function.preg-split.html @@ -0,0 +1,307 @@ +preg_split
PHP Manual
PrevNext

preg_split

(PHP3 >= 3.0.9, PHP4 )

preg_split -- Split string by a regular expression

Description

array preg_split (string pattern, string subject [, int + limit [, int + flags]])

Note: + Parameter flags was added in PHP 4 Beta 3. +

Returns an array containing substrings of + subject split along boundaries matched by + pattern. +

If limit is specified, then only substrings + up to limit are returned. +

If flags is PREG_SPLIT_NO_EMPTY then only + non-empty pieces will be returned by preg_split(). +

Example 1. preg_split() example

Get the parts of a search string. +


// split the phrase by any number of commas or space characters,
+// which include " ", \r, \t, \n and \f
+$keywords = preg_split ("/[\s,]+/", "hypertext language, programming");
+     

Splitting a string into component characters. +


$str = 'string';
+$chars = preg_split('//', $str, 0, PREG_SPLIT_NO_EMPTY);
+print_r($chars);
+     

See also preg_match(), + preg_match_all(), and + preg_replace(). +


PrevHomeNext
preg_replaceUppreg_quote
\ No newline at end of file diff --git a/function.prev.html b/function.prev.html new file mode 100644 index 0000000..ad747c6 --- /dev/null +++ b/function.prev.html @@ -0,0 +1,252 @@ +prev
PHP Manual
PrevNext

prev

(PHP3 , PHP4 )

prev -- Rewind the internal array pointer

Description

mixed prev (array array)

Returns the array element in the previous place that's pointed by + the internal array pointer, or false if there are no more + elements. +

Warning

If the array contains empty elements then this function will + return false for these elements as well. To properly traverse + an array which may contain empty elements see the + each() function. +

+

+ Prev() behaves just like + next(), except it rewinds the internal array + pointer one place instead of advancing it. +

See also: current(), end(), + next(), and reset(). +


PrevHomeNext
posUprange
\ No newline at end of file diff --git a/function.print-r.html b/function.print-r.html new file mode 100644 index 0000000..80b2971 --- /dev/null +++ b/function.print-r.html @@ -0,0 +1,256 @@ +print_r
PHP Manual
PrevNext

print_r

(PHP4 )

print_r --  + Prints human-readable information about a variable +

Description

void print_r (mixed expression)

This function displays information about the values of variables + in a way that's readable by humans. If given a string, integer + or double, the value itself will be printed. If given an array, + values will be presented in a format that shows keys and + elements. Similar notation is used for objects. +

Compare print_r() to + var_dump(). +


<?php
+$a = array (1, 2, array ("a", "b", "c"));
+print_r ($a);
+?>
+      

+

Warning

This function will continue forever if given an array or object + that contains a direct or indirect reference to itself or that + contains an array or object on a deeper level that does so. + This is especially true for print_r($GLOBALS), + as $GLOBALS is itself a global variable and + contains a reference to itself as such. +


PrevHomeNext
issetUpserialize
\ No newline at end of file diff --git a/function.print.html b/function.print.html new file mode 100644 index 0000000..7b86914 --- /dev/null +++ b/function.print.html @@ -0,0 +1,199 @@ +print
PHP Manual
PrevNext

print

(unknown)

print -- Output a string

Description

print (string arg)

Outputs arg. +

See also: echo(), printf(), + and flush(). +


PrevHomeNext
parse_strUpprintf
\ No newline at end of file diff --git a/function.printf.html b/function.printf.html new file mode 100644 index 0000000..ec6ecfe --- /dev/null +++ b/function.printf.html @@ -0,0 +1,220 @@ +printf
PHP Manual
PrevNext

printf

(PHP3 , PHP4 )

printf -- Output a formatted string

Description

int printf (string format [, mixed + args...])

Produces output according to format, which + is described in the documentation for sprintf(). +

See also: print(), sprintf(), + sscanf(), fscanf(), + and flush(). +


PrevHomeNext
printUpquoted_printable_decode
\ No newline at end of file diff --git a/function.pspell-add-to-personal.html b/function.pspell-add-to-personal.html new file mode 100644 index 0000000..1c09a2d --- /dev/null +++ b/function.pspell-add-to-personal.html @@ -0,0 +1,243 @@ +pspell_add_to_personal
PHP Manual
PrevNext

pspell_add_to_personal

(PHP4 >= 4.0.2)

pspell_add_to_personal -- Add the word to a personal wordlist.

Description

int pspell_add_to_personal (int dictionary_link, string word)

Pspell_add_to_personal() adds a word to the personal + wordlist. If you used pspell_new_config() with + pspell_config_personal() to open the dictionary, + you can save the wordlist later with + pspell_save_wordlist(). Please, note that this function + will not work unless you have pspell .11.2 and aspell .32.5 or later. +

Example 1. Pspell_add_to_personal()


$pspell_config = pspell_config_create ("en");
+pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws");
+$pspell_link = pspell_new_config ($pspell_config);
+
+pspell_add_to_personal ($pspell_link, "Vlad");
+pspell_save_wordlist ($pspell_link);
+      
+


PrevHomeNext
Pspell FunctionsUppspell_add_to_session
\ No newline at end of file diff --git a/function.pspell-add-to-session.html b/function.pspell-add-to-session.html new file mode 100644 index 0000000..6075e4e --- /dev/null +++ b/function.pspell-add-to-session.html @@ -0,0 +1,184 @@ +pspell_add_to_session
PHP Manual
PrevNext

pspell_add_to_session

(PHP4 >= 4.0.2)

pspell_add_to_session -- Add the word to the wordlist in the current session. +

Description

int pspell_add_to_session (int dictionary_link, string word)

Pspell_add_to_session() adds a word to the wordlist + associated with the current session. It is very similar to + pspell_add_to_personal() +


PrevHomeNext
pspell_add_to_personalUppspell_check
\ No newline at end of file diff --git a/function.pspell-check.html b/function.pspell-check.html new file mode 100644 index 0000000..6ebdbf1 --- /dev/null +++ b/function.pspell-check.html @@ -0,0 +1,222 @@ +pspell_check
PHP Manual
PrevNext

pspell_check

(PHP4 >= 4.0.2)

pspell_check -- Check a word

Description

boolean pspell_check (int dictionary_link, string word)

Pspell_check() checks the spelling of a word + and returns true if the spelling is correct, false if not. +

Example 1. Pspell_check()


$pspell_link = pspell_new ("en");
+
+if (pspell_check ($pspell_link, "testt")) {
+    echo "This is a valid spelling";
+} else {
+    echo "Sorry, wrong spelling";
+}
+      
+


PrevHomeNext
pspell_add_to_sessionUppspell_clear_session
\ No newline at end of file diff --git a/function.pspell-clear-session.html b/function.pspell-clear-session.html new file mode 100644 index 0000000..61c92ab --- /dev/null +++ b/function.pspell-clear-session.html @@ -0,0 +1,229 @@ +pspell_clear_session
PHP Manual
PrevNext

pspell_clear_session

(PHP4 >= 4.0.2)

pspell_clear_session -- Clear the current session.

Description

int pspell_clear_session (int dictionary_link)

Pspell_clear_session() clears the current session. + The current wordlist becomes blank, and, for example, if you try to save + it with pspell_save_wordlist(), nothing happens. +

Example 1. Pspell_add_to_personal()


$pspell_config = pspell_config_create ("en");
+pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws");
+$pspell_link = pspell_new_config ($pspell_config);
+
+pspell_add_to_personal ($pspell_link, "Vlad");
+pspell_clear_session ($pspell_link);
+pspell_save_wordlist ($pspell_link);	//"Vlad" will not be saved
+      
+


PrevHomeNext
pspell_checkUppspell_config_create
\ No newline at end of file diff --git a/function.pspell-config-create.html b/function.pspell-config-create.html new file mode 100644 index 0000000..5f8663b --- /dev/null +++ b/function.pspell-config-create.html @@ -0,0 +1,306 @@ +pspell_config_create
PHP Manual
PrevNext

pspell_config_create

(PHP4 >= 4.0.2)

pspell_config_create -- Create a config used to open a dictionary.

Description

int pspell_config_create (string language [, string + spelling [, string + jargon [, string + encoding]]])

Pspell_config_create() has a very similar syntax to + pspell_new(). In fact, using + pspell_config_create() immediatelly followed by + pspell_new_config() will produce the exact same result. + However, after creating a new config, you can also use + pspell_config_*() functions before calling + pspell_new_config() to take advantage of some + advanced functionality. +

The language parameter is the language code which consists of the + two letter ISO 639 language code and an optional two letter ISO + 3166 country code after a dash or underscore. +

The spelling parameter is the requested spelling for languages + with more than one spelling such as English. Known values are + 'american', 'british', and 'canadian'. +

The jargon parameter contains extra information to distinguish + two different words lists that have the same language and + spelling parameters. +

The encoding parameter is the encoding that words are expected to + be in. Valid values are 'utf-8', 'iso8859-*', 'koi8-r', + 'viscii', 'cp1252', 'machine unsigned 16', 'machine unsigned + 32'. This parameter is largely untested, so be careful when + using. +

The mode parameter is the mode in which spellchecker will work. + There are several modes available: +

  • PSPELL_FAST - Fast mode (least number of suggestions) +

  • PSPELL_NORMAL - Normal mode (more suggestions) +

  • PSPELL_BAD_SPELLERS - Slow mode (a lot of suggestions) +

+

For more information and examples, check out inline manual pspell + website:http://pspell.sourceforge.net/. +

Example 1. Pspell_config_create()


$pspell_config = pspell_config_create ("en");
+pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws");
+pspell_config_repl ($pspell_config, "/var/dictionaries/custom.repl");
+$pspell_link = pspell_new_personal (pspell_config);
+      
+


PrevHomeNext
pspell_clear_sessionUppspell_config_ignore
\ No newline at end of file diff --git a/function.pspell-config-ignore.html b/function.pspell-config-ignore.html new file mode 100644 index 0000000..3beabea --- /dev/null +++ b/function.pspell-config-ignore.html @@ -0,0 +1,227 @@ +pspell_config_ignore
PHP Manual
PrevNext

pspell_config_ignore

(PHP4 >= 4.0.2)

pspell_config_ignore -- Ignore words less than N characters long.

Description

int pspell_config_ignore (int dictionary_link, int n)

Pspell_config_ignore() should be used on a config + before calling pspell_new_config(). This function + allows short words to be skipped by the spellchecker. Words less then + n characters will be skipped. +

Example 1. Pspell_config_ignore()


$pspell_config = pspell_config_create ("en");
+pspell_config_ignore($pspell_config, 5);
+$pspell_link = pspell_new_config($pspell_config);
+pspell_check($pspell_link, "abcd");	//will not result in an error
+      
+


PrevHomeNext
pspell_config_createUppspell_config_mode
\ No newline at end of file diff --git a/function.pspell-config-mode.html b/function.pspell-config-mode.html new file mode 100644 index 0000000..e8fd81e --- /dev/null +++ b/function.pspell-config-mode.html @@ -0,0 +1,257 @@ +pspell_config_mode
PHP Manual
PrevNext

pspell_config_mode

(PHP4 >= 4.0.2)

pspell_config_mode -- Change the mode number of suggestions returned.

Description

int pspell_config_mode (int dictionary_link, int mode)

Pspell_config_mode() should be used on a config + before calling pspell_new_config(). This function + determines how many suggestions will be returned by + pspell_suggest(). +

The mode parameter is the mode in which spellchecker will work. + There are several modes available: +

  • PSPELL_FAST - Fast mode (least number of suggestions) +

  • PSPELL_NORMAL - Normal mode (more suggestions) +

  • PSPELL_BAD_SPELLERS - Slow mode (a lot of suggestions) +

+

Example 1. Pspell_config_mode()


$pspell_config = pspell_config_create ("en");
+pspell_config_mode($pspell_config, PSPELL_FAST);
+$pspell_link = pspell_new_config($pspell_config);
+pspell_check($pspell_link, "thecat");
+      
+


PrevHomeNext
pspell_config_ignoreUppspell_config_personal
\ No newline at end of file diff --git a/function.pspell-config-personal.html b/function.pspell-config-personal.html new file mode 100644 index 0000000..eda67e1 --- /dev/null +++ b/function.pspell-config-personal.html @@ -0,0 +1,244 @@ +pspell_config_personal
PHP Manual
PrevNext

pspell_config_personal

(PHP4 >= 4.0.2)

pspell_config_personal -- Set a file that contains personal wordlist.

Description

int pspell_config_personal (int dictionary_link, string file)

Pspell_config_personal() should be used on a config + before calling pspell_new_config(). The personal + wordlist will be loaded and used in addition to the standard one after + you call pspell_new_config(). If the file does not + exist, it will be created. The file is also the file where + pspell_save_wordlist() will save personal wordlist to. + The file should be writable by whoever php runs as (e.g. nobody). Please, + note that this function will not work unless you have pspell .11.2 and + aspell .32.5 or later. +

Example 1. Pspell_config_personal()


$pspell_config = pspell_config_create ("en");
+pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws");
+$pspell_link = pspell_new_config ($pspell_config);
+pspell_check ($pspell_link, "thecat");
+      
+


PrevHomeNext
pspell_config_modeUppspell_config_repl
\ No newline at end of file diff --git a/function.pspell-config-repl.html b/function.pspell-config-repl.html new file mode 100644 index 0000000..73dfc36 --- /dev/null +++ b/function.pspell-config-repl.html @@ -0,0 +1,246 @@ +pspell_config_repl
PHP Manual
PrevNext

pspell_config_repl

(PHP4 >= 4.0.2)

pspell_config_repl -- Set a file that contains replacement pairs.

Description

int pspell_config_repl (int dictionary_link, string file)

Pspell_config_repl() should be used on a config + before calling pspell_new_config(). The replacement + pairs improve the quality of the spellchecker. When a word is misspelled, + and a proper suggestion was not found in the list, + pspell_store_replacement() can be used to store a + replacement pair and then pspell_save_wordlist() to + save the wordlist along with the replacement pairs. The file should be + writable by whoever php runs as (e.g. nobody). Please, note that this + function will not work unless you have pspell .11.2 and aspell .32.5 or + later. +

Example 1. Pspell_config_repl()


$pspell_config = pspell_config_create ("en");
+pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws");
+pspell_config_repl ($pspell_config, "/var/dictionaries/custom.repl");
+$pspell_link = pspell_new_config ($pspell_config);
+pspell_check ($pspell_link, "thecat");
+      
+


PrevHomeNext
pspell_config_personalUppspell_config_runtogether
\ No newline at end of file diff --git a/function.pspell-config-runtogether.html b/function.pspell-config-runtogether.html new file mode 100644 index 0000000..372b363 --- /dev/null +++ b/function.pspell-config-runtogether.html @@ -0,0 +1,243 @@ +pspell_config_runtogether
PHP Manual
PrevNext

pspell_config_runtogether

(PHP4 >= 4.0.2)

pspell_config_runtogether -- Consider run-together words as valid compounds.

Description

int pspell_config_runtogether (int dictionary_link, boolean flag)

Pspell_config_runtogether() should be used on a config + before calling pspell_new_config(). This function + determines whether run-together words will be treated as legal + compounds. That is, "thecat" will be a legal compound, + athough there should be a space between the two + words. Changing this setting only affects the results returned + by pspell_check(); + pspell_suggest() will still return suggestions. +

Example 1. Pspell_config_runtogether()


$pspell_config = pspell_config_create ("en");
+pspell_config_runtogether ($pspell_config, true);
+$pspell_link = pspell_new_config ($pspell_config);
+pspell_check ($pspell_link, "thecat");
+      
+


PrevHomeNext
pspell_config_replUppspell_config_save_repl
\ No newline at end of file diff --git a/function.pspell-config-save-repl.html b/function.pspell-config-save-repl.html new file mode 100644 index 0000000..190d080 --- /dev/null +++ b/function.pspell-config-save-repl.html @@ -0,0 +1,208 @@ +pspell_config_save_repl
PHP Manual
PrevNext

pspell_config_save_repl

(PHP4 >= 4.0.2)

pspell_config_save_repl -- Determine whether to save a replacement pairs list + along with the wordlist.

Description

int pspell_config_save_repl (int dictionary_link, boolean flag)

Pspell_config_save_repl() should be used on a config + before calling pspell_new_config(). It determines + whether pspell_save_wordlist() will save the + replacement pairs along with the wordlist. Usually there is no need to use + this function because if pspell_config_repl() is used, + the replacement pairs will be saved by + pspell_save_wordlist() anyway, and if it is not, + the replacement pairs will not be saved. Please, note that this function + will not work unless you have pspell .11.2 and aspell .32.5 or later. +


PrevHomeNext
pspell_config_runtogetherUppspell_new
\ No newline at end of file diff --git a/function.pspell-new-config.html b/function.pspell-new-config.html new file mode 100644 index 0000000..b4bc749 --- /dev/null +++ b/function.pspell-new-config.html @@ -0,0 +1,256 @@ +pspell_new_config
PHP Manual
PrevNext

pspell_new_config

(PHP4 >= 4.0.2)

pspell_new_config -- Load a new dictionary with settings based on a given config +

Description

int pspell_new_config (int config)

Pspell_new_config() opens up a new dictionary with + settings specified in a config, created with with + pspell_config_create() and modified with + pspell_config_*() functions. This method provides you + with the most flexibility and has all the functionality provided by + pspell_new() and + pspell_new_personal(). +

The config parameter is the one returned by + pspell_config_create() when the config was created. +

Example 1. Pspell_new_config()


$pspell_config = pspell_config_create ("en");
+pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws");
+pspell_config_repl ($pspell_config, "/var/dictionaries/custom.repl");
+$pspell_link = pspell_new_personal (pspell_config);
+      
+


PrevHomeNext
pspell_newUppspell_new_personal
\ No newline at end of file diff --git a/function.pspell-new-personal.html b/function.pspell-new-personal.html new file mode 100644 index 0000000..bac518e --- /dev/null +++ b/function.pspell-new-personal.html @@ -0,0 +1,343 @@ +pspell_new_personal
PHP Manual
PrevNext

pspell_new_personal

(PHP4 >= 4.0.2)

pspell_new_personal -- Load a new dictionary with personal wordlist

Description

int pspell_new_personal (string personal, string language [, string + spelling [, string + jargon [, string + encoding [, int + mode]]]])

Pspell_new_personal() opens up a new dictionary with + a personal wordlist and returns the dictionary link identifier for use + in other pspell functions. The wordlist can be modified and saved with + pspell_save_wordlist(), if desired. However, the + replacement pairs are not saved. In order to save replacement pairs, you + should create a config using pspell_config_create(), + set the personal wordlist file with pspell_config_personal + (), set the file for replacement pairs with + pspell_config_repl(), and open a new dictionary with + pspell_new_config(). +

The personal parameter specifies the file where words added to the + personal list will be stored. It should be an absolute filename + beginning with '/' because otherwise it will be relative to $HOME, + which is "/root" for most systems, and is probably not what you want. +

The language parameter is the language code which consists of the + two letter ISO 639 language code and an optional two letter ISO + 3166 country code after a dash or underscore. +

The spelling parameter is the requested spelling for languages + with more than one spelling such as English. Known values are + 'american', 'british', and 'canadian'. +

The jargon parameter contains extra information to distinguish + two different words lists that have the same language and + spelling parameters. +

The encoding parameter is the encoding that words are expected to + be in. Valid values are 'utf-8', 'iso8859-*', 'koi8-r', + 'viscii', 'cp1252', 'machine unsigned 16', 'machine unsigned + 32'. This parameter is largely untested, so be careful when + using. +

The mode parameter is the mode in which spellchecker will work. + There are several modes available: +

  • PSPELL_FAST - Fast mode (least number of suggestions) +

  • PSPELL_NORMAL - Normal mode (more suggestions) +

  • PSPELL_BAD_SPELLERS - Slow mode (a lot of suggestions) +

  • PSPELL_RUN_TOGETHER - Consider run-together words as legal + compounds. That is, "thecat" will be a legal compound, + athough there should be a space between the two + words. Changing this setting only affects the results returned + by pspell_check(); + pspell_suggest() will still return + suggestions. +

+ Mode is a bitmask constructed from different constants listed + above. However, PSPELL_FAST, PSPELL_NORMAL and + PSPELL_BAD_SPELLERS are mutually exclusive, so you should select + only one of them. +

For more information and examples, check out inline manual pspell + website:http://pspell.sourceforge.net/. +

Example 1. Pspell_new_personal()


$pspell_link = pspell_new_personal ("/var/dictionaries/custom.pws", 
+		"en", "", "", "", PSPELL_FAST|PSPELL_RUN_TOGETHER));
+      
+


PrevHomeNext
pspell_new_configUppspell_save_wordlist
\ No newline at end of file diff --git a/function.pspell-new.html b/function.pspell-new.html new file mode 100644 index 0000000..dd85af5 --- /dev/null +++ b/function.pspell-new.html @@ -0,0 +1,303 @@ +pspell_new
PHP Manual
PrevNext

pspell_new

(PHP4 >= 4.0.2)

pspell_new -- Load a new dictionary

Description

int pspell_new (string language [, string + spelling [, string + jargon [, string + encoding [, int + mode]]]])

Pspell_new() opens up a new dictionary and + returns the dictionary link identifier for use in other pspell + functions. +

The language parameter is the language code which consists of the + two letter ISO 639 language code and an optional two letter ISO + 3166 country code after a dash or underscore. +

The spelling parameter is the requested spelling for languages + with more than one spelling such as English. Known values are + 'american', 'british', and 'canadian'. +

The jargon parameter contains extra information to distinguish + two different words lists that have the same language and + spelling parameters. +

The encoding parameter is the encoding that words are expected to + be in. Valid values are 'utf-8', 'iso8859-*', 'koi8-r', + 'viscii', 'cp1252', 'machine unsigned 16', 'machine unsigned + 32'. This parameter is largely untested, so be careful when + using. +

The mode parameter is the mode in which spellchecker will work. + There are several modes available: +

  • PSPELL_FAST - Fast mode (least number of suggestions) +

  • PSPELL_NORMAL - Normal mode (more suggestions) +

  • PSPELL_BAD_SPELLERS - Slow mode (a lot of suggestions) +

  • PSPELL_RUN_TOGETHER - Consider run-together words as legal + compounds. That is, "thecat" will be a legal compound, + athough there should be a space between the two + words. Changing this setting only affects the results returned + by pspell_check(); + pspell_suggest() will still return + suggestions. +

+ Mode is a bitmask constructed from different constants listed + above. However, PSPELL_FAST, PSPELL_NORMAL and + PSPELL_BAD_SPELLERS are mutually exclusive, so you should select + only one of them. +

For more information and examples, check out inline manual pspell + website:http://pspell.sourceforge.net/. +

Example 1. Pspell_new()


$pspell_link = pspell_new ("en", "", "", "", 
+                           (PSPELL_FAST|PSPELL_RUN_TOGETHER));
+      
+


PrevHomeNext
pspell_config_save_replUppspell_new_config
\ No newline at end of file diff --git a/function.pspell-save-wordlist.html b/function.pspell-save-wordlist.html new file mode 100644 index 0000000..d16773d --- /dev/null +++ b/function.pspell-save-wordlist.html @@ -0,0 +1,244 @@ +pspell_save_wordlist
PHP Manual
PrevNext

pspell_save_wordlist

(PHP4 >= 4.0.2)

pspell_save_wordlist -- Save the personal wordlist to a file.

Description

int pspell_save_wordlist (int dictionary_link)

Pspell_save_wordlist() saves the personal wordlist + from the current session. The dictionary has to be open with + pspell_new_personal(), and the location of files to be + saved specified with pspell_config_personal() and + (optionally) pspell_config_repl(). Please, note that + this function will not work unless you have pspell .11.2 and aspell .32.5 + or later. +

Example 1. Pspell_add_to_personal()


$pspell_config = pspell_config_create ("en");
+pspell_config_personal ($pspell_config, "/tmp/dicts/newdict");
+$pspell_link = pspell_new_config ($pspell_config);
+
+pspell_add_to_personal ($pspell_link, "Vlad");
+pspell_save_wordlist ($pspell_link);
+      
+


PrevHomeNext
pspell_new_personalUppspell_store_replacement
\ No newline at end of file diff --git a/function.pspell-store-replacement.html b/function.pspell-store-replacement.html new file mode 100644 index 0000000..d2452c2 --- /dev/null +++ b/function.pspell-store-replacement.html @@ -0,0 +1,261 @@ +pspell_store_replacement
PHP Manual
PrevNext

pspell_store_replacement

(PHP4 >= 4.0.2)

pspell_store_replacement -- Store a replacement pair for a word

Description

int pspell_store_replacement (int dictionary_link, string misspelled, string correct)

Pspell_store_replacement() stores a replacement pair for + a word, so that replacement can be returned by + pspell_suggest() later. In order to be able to take + advantage of this function, you have to use + pspell_new_personal() to open the dictionary. In order + to permanently save the replacement pair, you have to + use pspell_config_personal() and + pspell_config_repl() to set the path where to save your + custom wordlists, and then use pspell_save_wordlist() + for the changes to be written to disk. Please, note that this function + will not work unless you have pspell .11.2 and aspell .32.5 or later. +

Example 1. Pspell_store_replacement()


$pspell_config = pspell_config_create ("en");
+pspell_config_personal ($pspell_config, "/var/dictionaries/custom.pws");
+pspell_config_repl ($pspell_config, "/var/dictionaries/custom.repl");
+$pspell_link = pspell_new_config ($pspell_config);
+
+pspell_store_replacement ($pspell_link, $misspelled, $correct);
+pspell_save_wordlist ($pspell_link);
+      
+


PrevHomeNext
pspell_save_wordlistUppspell_suggest
\ No newline at end of file diff --git a/function.pspell-suggest.html b/function.pspell-suggest.html new file mode 100644 index 0000000..ae6fc03 --- /dev/null +++ b/function.pspell-suggest.html @@ -0,0 +1,224 @@ +pspell_suggest
PHP Manual
PrevNext

pspell_suggest

(PHP4 >= 4.0.2)

pspell_suggest -- Suggest spellings of a word

Description

array pspell_suggest (int dictionary_link, string word)

Pspell_suggest() returns an array of possible + spellings for the given word. +

Example 1. Pspell_suggest()


$pspell_link = pspell_new ("en");
+
+if (!pspell_check ($pspell_link, "testt")) {
+    $suggestions = pspell_suggest ($pspell_link, "testt");
+
+    for ($i=0; $i < count ($suggestions); $i++) {
+        echo "Possible spelling: " . $suggestions[$i] . "<br>"; 
+    }
+}
+      
+


PrevHomeNext
pspell_store_replacementUpGNU Readline
\ No newline at end of file diff --git a/function.putenv.html b/function.putenv.html new file mode 100644 index 0000000..0b7ad5a --- /dev/null +++ b/function.putenv.html @@ -0,0 +1,214 @@ +putenv
PHP Manual
PrevNext

putenv

(PHP3 , PHP4 )

putenv -- Set the value of an environment variable.

Description

void putenv (string setting)

Adds setting to the server environment. +

Example 1. Setting an Environment Variable


putenv ("UNIQID=$uniqid");
+      
+


PrevHomeNext
php_unameUpset_magic_quotes_runtime
\ No newline at end of file diff --git a/function.quoted-printable-decode.html b/function.quoted-printable-decode.html new file mode 100644 index 0000000..42f6285 --- /dev/null +++ b/function.quoted-printable-decode.html @@ -0,0 +1,185 @@ +quoted_printable_decode
PHP Manual
PrevNext

quoted_printable_decode

(PHP3 >= 3.0.6, PHP4 )

quoted_printable_decode --  + Convert a quoted-printable string to an 8 bit string +

Description

string + quoted_printable_decode + (string str)

This function returns an 8-bit binary string corresponding to the + decoded quoted printable string. This function is similar to + imap_qprint(), except this one does not + require the IMAP module to work. +


PrevHomeNext
printfUpquotemeta
\ No newline at end of file diff --git a/function.quotemeta.html b/function.quotemeta.html new file mode 100644 index 0000000..793c41e --- /dev/null +++ b/function.quotemeta.html @@ -0,0 +1,226 @@ +quotemeta
PHP Manual
PrevNext

quotemeta

(PHP3 , PHP4 )

quotemeta -- Quote meta characters

Description

string quotemeta (string str)

Returns a version of str with a backslash character + (\) before every character that is among + these:
. \\ + * ? [ ^ ] ( $ )
+

See also addslashes(), + htmlentities(), + htmlspecialchars(), + nl2br(), and + stripslashes(). +


PrevHomeNext
quoted_printable_decodeUprtrim
\ No newline at end of file diff --git a/function.rad2deg.html b/function.rad2deg.html new file mode 100644 index 0000000..b2431ad --- /dev/null +++ b/function.rad2deg.html @@ -0,0 +1,189 @@ +rad2deg
PHP Manual
PrevNext

rad2deg

(PHP3 >= 3.0.4, PHP4 )

rad2deg --  + Converts the radian number to the equivalent number in degrees +

Description

double rad2deg (double number)

This function converts number from radian + to degrees. +

See also deg2rad(). +


PrevHomeNext
powUprand
\ No newline at end of file diff --git a/function.rand.html b/function.rand.html new file mode 100644 index 0000000..1530467 --- /dev/null +++ b/function.rand.html @@ -0,0 +1,271 @@ +rand
PHP Manual
PrevNext

rand

(PHP3 , PHP4 )

rand -- Generate a random value

Description

int rand ([int min [, int max]])

If called without the optional min, + max arguments rand() + returns a pseudo-random value between 0 and + RAND_MAX. If you want a random number + between 5 and 15 (inclusive), for example, use rand (5, + 15). +

Remember to seed the random number generator before use with + srand(). +

Note: + In versions before 3.0.7 the meaning of + max was range. To + get the same results in these versions the short example should + be rand (5, 11) to get a random number + between 5 and 15. +

See also srand(), + getrandmax(), mt_rand(), + mt_srand(), and + mt_getrandmax(). +


PrevHomeNext
rad2degUpround
\ No newline at end of file diff --git a/function.range.html b/function.range.html new file mode 100644 index 0000000..788cc93 --- /dev/null +++ b/function.range.html @@ -0,0 +1,198 @@ +range
PHP Manual
PrevNext

range

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

range --  + Create an array containing a range of integers +

Description

array range (int low, int high)

Range() returns an array of integers from + low to high, + inclusive. +

See shuffle() for an example of its use. +


PrevHomeNext
prevUpreset
\ No newline at end of file diff --git a/function.rawurldecode.html b/function.rawurldecode.html new file mode 100644 index 0000000..b845355 --- /dev/null +++ b/function.rawurldecode.html @@ -0,0 +1,226 @@ +rawurldecode
PHP Manual
PrevNext

rawurldecode

(PHP3 , PHP4 )

rawurldecode -- Decode URL-encoded strings

Description

string rawurldecode (string str)

Returns a string in which the sequences with percent + (%) signs followed by two hex digits have been + replaced with literal characters. For example, the string +
foo%20bar%40baz
decodes into
foo
+     bar@baz
. +

See also rawurlencode(), + urldecode(), + urlencode(). +


PrevHomeNext
parse_urlUprawurlencode
\ No newline at end of file diff --git a/function.rawurlencode.html b/function.rawurlencode.html new file mode 100644 index 0000000..288b134 --- /dev/null +++ b/function.rawurlencode.html @@ -0,0 +1,296 @@ +rawurlencode
PHP Manual
PrevNext

rawurlencode

(PHP3 , PHP4 )

rawurlencode -- URL-encode according to RFC1738

Description

string rawurlencode (string str)

Returns a string in which all non-alphanumeric characters except +
-_.
have been replaced with a percent + (%) sign followed by two hex digits. This is + the encoding described in RFC1738 for protecting literal + characters from being interpreted as special URL delimiters, and + for protecting URL's from being mangled by transmission media + with character conversions (like some email systems). For + example, if you want to include a password in an ftp url: +

Example 1. Rawurlencode() example 1


echo '<A HREF="ftp://user:', rawurlencode ('foo @+%/'),
+     '@ftp.my.com/x.txt">';
+      
+ Or, if you pass information in a path info component of the url: +

Example 2. Rawurlencode() example 2


echo '<A HREF="http://x.com/department_list_script/',
+    rawurlencode ('sales and marketing/Miami'), '">';
+      
+

See also rawurldecode(), + urldecode(), + urlencode(). +


PrevHomeNext
rawurldecodeUpurldecode
\ No newline at end of file diff --git a/function.read-exif-data.html b/function.read-exif-data.html new file mode 100644 index 0000000..c646210 --- /dev/null +++ b/function.read-exif-data.html @@ -0,0 +1,262 @@ +read_exif_data
PHP Manual
PrevNext

read_exif_data

(PHP4 >= 4.0.1)

read_exif_data -- Read the EXIF headers from a JPEG

Description

array read_exif_data (string filename)

The read_exif_data() function reads the + EXIF headers from a JPEG image file. It returns an associative + array where the indexes are the Exif header names and the values + are the values associated with those Exif headers. Exif headers + tend to be present in JPEG images generated by digital cameras, but + unfortunately each digital camera maker has a different idea of how + to actually tag their images, so you can't always rely on a specific + Exif header being present. +

Example 1. read_exif_data


<?php
+ $exif = read_exif_data ('p0001807.jpg');
+ while(list($k,$v)=each($exif)) {
+   echo "$k: $v<br>\n";
+ }
+?>
+
+Output:
+FileName: p0001807.jpg
+FileDateTime: 929353056
+FileSize: 378599
+CameraMake: Eastman Kodak Company
+CameraModel: KODAK DC265 ZOOM DIGITAL CAMERA (V01.00)
+DateTime: 1999:06:14 01:37:36
+Height: 1024
+Width: 1536
+IsColor: 1
+FlashUsed: 0
+FocalLength:  8.0mm
+RawFocalLength: 8
+ExposureTime:  0.004 s (1/250)
+RawExposureTime: 0.0040000001899898
+ApertureFNumber: f/ 9.5
+RawApertureFNumber: 9.5100002288818
+FocusDistance: 16.66m
+RawFocusDistance: 16.659999847412
+Orientation: 1
+ExifVersion: 0200
+      
+

Note: + This function is only available in PHP 4 compiled using --enable-exif +

This function does not require the GD image library. +

+


PrevHomeNext
ImageTypesUpIMAP, POP3 and NNTP functions
\ No newline at end of file diff --git a/function.readdir.html b/function.readdir.html new file mode 100644 index 0000000..a075c8a --- /dev/null +++ b/function.readdir.html @@ -0,0 +1,269 @@ +readdir
PHP Manual
PrevNext

readdir

(PHP3 , PHP4 )

readdir -- read entry from directory handle

Description

string readdir (int dir_handle)

Returns the filename of the next file from the directory. The + filenames are not returned in any particular order. +

Example 1. List all files in the current directory


<?php
+$handle=opendir('.');
+echo "Directory handle: $handle\n";
+echo "Files:\n";
+while (($file = readdir($handle))!==false) {
+    echo "$file\n";
+}
+closedir($handle); 
+?>
+      
+

Note that readdir() will return the . and + .. entries. If you don't want these, simply strip them out: +

Example 2. + List all files in the current directory and strip out . and + .. +


<?php 
+$handle=opendir('.'); 
+while (false!==($file = readdir($handle))) { 
+    if ($file != "." && $file != "..") { 
+        echo "$file\n"; 
+    } 
+}
+closedir($handle); 
+?>
+      
+


PrevHomeNext
opendirUprewinddir
\ No newline at end of file diff --git a/function.readfile.html b/function.readfile.html new file mode 100644 index 0000000..d5edc39 --- /dev/null +++ b/function.readfile.html @@ -0,0 +1,263 @@ +readfile
PHP Manual
PrevNext

readfile

(PHP3 , PHP4 )

readfile -- Outputs a file

Description

int readfile (string filename [, int + use_include_path])

Reads a file and writes it to standard output. +

Returns the number of bytes read from the file. If an error + occurs, false is returned and unless the function was called as + @readfile, an error message is printed. +

If filename begins with "http://" + (not case sensitive), an HTTP 1.0 connection is opened to the + specified server and the text of the response is written to + standard output. +

Does not handle HTTP redirects, so you must include trailing + slashes on directories. +

If filename begins with "ftp://" + (not case sensitive), an ftp connection to the specified server is + opened and the requested file is written to standard output. If the server + does not support passive mode ftp, this will fail. +

If filename begins with neither + of these strings, the file will be opened from the filesystem and + its contents written to standard output. +

You can use the optional second parameter and set it to "1", if + you want to search for the file in the include_path, too. +

See also fpassthru(), + file(), fopen(), + include(), require(), and + virtual(). +


PrevHomeNext
popenUpreadlink
\ No newline at end of file diff --git a/function.readgzfile.html b/function.readgzfile.html new file mode 100644 index 0000000..57f6c12 --- /dev/null +++ b/function.readgzfile.html @@ -0,0 +1,236 @@ +readgzfile
PHP Manual
PrevNext

readgzfile

(PHP3 , PHP4 )

readgzfile -- Output a gz-file

Description

int readgzfile (string filename [, int + use_include_path])

+ Reads a file, decompresses it and writes it to standard + output. +

Readgzfile() can be used to read a file which + is not in gzip format; in this case + readgzfile() will directly read from the file + without decompression. +

+ Returns the number of (uncompressed) bytes read from the file. If + an error occurs, false is returned and unless the function was + called as @readgzfile, an error message is + printed. +

+ The file filename will be opened from the + filesystem and its contents written to standard output. +

You can use the optional second parameter and set it to "1", if + you want to search for the file in the include_path, too. +

See also gzpassthru(), + gzfile(), and gzopen(). +


PrevHomeNext
gzwriteUpgzcompress
\ No newline at end of file diff --git a/function.readline-add-history.html b/function.readline-add-history.html new file mode 100644 index 0000000..76ef822 --- /dev/null +++ b/function.readline-add-history.html @@ -0,0 +1,172 @@ +readline_add_history
PHP Manual
PrevNext

readline_add_history

(PHP4 >= 4.0b4)

readline_add_history -- Adds a line to the history

Description

void readline_add_history (string line)

This function adds a line to the command line history. +


PrevHomeNext
readlineUpreadline_clear_history
\ No newline at end of file diff --git a/function.readline-clear-history.html b/function.readline-clear-history.html new file mode 100644 index 0000000..c9be28e --- /dev/null +++ b/function.readline-clear-history.html @@ -0,0 +1,172 @@ +readline_clear_history
PHP Manual
PrevNext

readline_clear_history

(PHP4 >= 4.0b4)

readline_clear_history -- Clears the history

Description

boolean readline_clear_history (void )

This function clears the entire command line history. +


PrevHomeNext
readline_add_historyUpreadline_completion_function
\ No newline at end of file diff --git a/function.readline-completion-function.html b/function.readline-completion-function.html new file mode 100644 index 0000000..465687e --- /dev/null +++ b/function.readline-completion-function.html @@ -0,0 +1,178 @@ +readline_completion_function
PHP Manual
PrevNext

readline_completion_function

(PHP4 >= 4.0b4)

readline_completion_function -- Registers a completion function

Description

boolean + readline_completion_function + (string line)

This function registers a completion function. You must supply + the name of an existing function which accepts a partial command + line and returns an array of possible matches. This is the same + kind of functionality you'd get if you hit your tab key while + using Bash. +


PrevHomeNext
readline_clear_historyUpreadline_info
\ No newline at end of file diff --git a/function.readline-info.html b/function.readline-info.html new file mode 100644 index 0000000..dfb11ed --- /dev/null +++ b/function.readline-info.html @@ -0,0 +1,183 @@ +readline_info
PHP Manual
PrevNext

readline_info

(PHP4 >= 4.0b4)

readline_info -- Gets/sets various internal readline variables

Description

mixed readline_info ([string + varname [, string + newvalue]])

If called with no parameters, this function returns an array of + values for all the setting readline uses. The elements will will + be indexed by the following values: done, end, erase_empty_line, + library_version, line_buffer, mark, pending_input, point, prompt, + readline_name, and terminal_name. +

If called with one parameter, the value of that setting is + returned. If called with two parameters, the setting will be + changed to the given value. +


PrevHomeNext
readline_completion_functionUpreadline_list_history
\ No newline at end of file diff --git a/function.readline-list-history.html b/function.readline-list-history.html new file mode 100644 index 0000000..3c3ea53 --- /dev/null +++ b/function.readline-list-history.html @@ -0,0 +1,173 @@ +readline_list_history
PHP Manual
PrevNext

readline_list_history

(PHP4 >= 4.0b4)

readline_list_history -- Lists the history

Description

array readline_list_history (void )

This function returns an array of the entire command line + history. The elements are indexed by integers starting at zero. +


PrevHomeNext
readline_infoUpreadline_read_history
\ No newline at end of file diff --git a/function.readline-read-history.html b/function.readline-read-history.html new file mode 100644 index 0000000..836e87a --- /dev/null +++ b/function.readline-read-history.html @@ -0,0 +1,174 @@ +readline_read_history
PHP Manual
PrevNext

readline_read_history

(PHP4 >= 4.0b4)

readline_read_history -- Reads the history

Description

boolean + readline_read_history + (string filename)

This function reads a command history from a file. +


PrevHomeNext
readline_list_historyUpreadline_write_history
\ No newline at end of file diff --git a/function.readline-write-history.html b/function.readline-write-history.html new file mode 100644 index 0000000..b9ed586 --- /dev/null +++ b/function.readline-write-history.html @@ -0,0 +1,174 @@ +readline_write_history
PHP Manual
PrevNext

readline_write_history

(PHP4 >= 4.0b4)

readline_write_history -- Writes the history

Description

boolean + readline_write_history + (string filename)

This function writes the command history to a file. +


PrevHomeNext
readline_read_historyUpGNU Recode functions
\ No newline at end of file diff --git a/function.readline.html b/function.readline.html new file mode 100644 index 0000000..a365237 --- /dev/null +++ b/function.readline.html @@ -0,0 +1,230 @@ +readline
PHP Manual
PrevNext

readline

(PHP4 >= 4.0b4)

readline -- Reads a line

Description

string readline ([string + prompt])

This function returns a single string from the user. You may + specify a string with which to prompt the user. The line + returned has the ending newline removed. You must add this line + to the history yourself using + readline_add_history(). +

Example 1. Readline()


//get 3 commands from user
+for ($i=0; $i < 3; $i++) {
+        $line = readline ("Command: ");
+        readline_add_history ($line);
+}
+
+//dump history
+print_r (readline_list_history());
+
+//dump variables
+print_r (readline_info());
+     

PrevHomeNext
GNU ReadlineUpreadline_add_history
\ No newline at end of file diff --git a/function.readlink.html b/function.readlink.html new file mode 100644 index 0000000..eadf8dd --- /dev/null +++ b/function.readlink.html @@ -0,0 +1,209 @@ +readlink
PHP Manual
PrevNext

readlink

(PHP3 , PHP4 )

readlink -- Returns the target of a symbolic link

Description

string readlink (string path)

Readlink() does the same as the readlink C + function and returns the contents of the symbolic link path or 0 + in case of error. +

See also symlink(), + readlink() and + linkinfo(). +

Note: + This function does not work on Windows systems +


PrevHomeNext
readfileUprename
\ No newline at end of file diff --git a/function.realpath.html b/function.realpath.html new file mode 100644 index 0000000..a96207c --- /dev/null +++ b/function.realpath.html @@ -0,0 +1,224 @@ +realpath
PHP Manual
PrevNext

realpath

(PHP4 >= 4.0b4)

realpath -- Returns canonicalized absolute pathname

Description

string realpath (string path)

realpath() expands all symbolic links and + resolves references to '/./', '/../' and extra '/' characters in + the input path and return the canonicalized + absolute pathname. The resulting path will have no symbolic link, + '/./' or '/../' components. +

Example 1. realpath() example


$real_path = realpath ("../../index.php");
+      
+


PrevHomeNext
lstatUpsymlink
\ No newline at end of file diff --git a/function.recode-file.html b/function.recode-file.html new file mode 100644 index 0000000..440df72 --- /dev/null +++ b/function.recode-file.html @@ -0,0 +1,192 @@ +recode_file
PHP Manual
PrevNext

recode_file

(PHP3 >= 3.0.13, PHP4 >= 4.0RC1)

recode_file --  + Recode from file to file according to recode request +

Description

bool recode_file (int input, int output)

Recode the file referenced by file handle + input into the file referenced by file + handle output according to the recode + request. Returns FALSE, if unable to comply, TRUE + otherwise. +

This function does not currently process filehandles referencing + remote files (URLs). Both filehandles must refer to local files. +


PrevHomeNext
recodeUpRegular Expression Functions (Perl-Compatible)
\ No newline at end of file diff --git a/function.recode-string.html b/function.recode-string.html new file mode 100644 index 0000000..480e0cd --- /dev/null +++ b/function.recode-string.html @@ -0,0 +1,189 @@ +recode_string
PHP Manual
PrevNext

recode_string

(PHP3 >= 3.0.13, PHP4 >= 4.0RC1)

recode_string -- Recode a string according to a recode request

Description

string recode_string (string request, string string)

Recode the string string according to + the recode request request. Returns + FALSE, if unable to comply, TRUE otherwise. +

A simple recode request may be "lat1..iso646-de". + See also the GNU Recode documentation of your installation + for detailed instructions about recode requests. +


PrevHomeNext
GNU Recode functionsUprecode
\ No newline at end of file diff --git a/function.recode.html b/function.recode.html new file mode 100644 index 0000000..0544df8 --- /dev/null +++ b/function.recode.html @@ -0,0 +1,188 @@ +recode
PHP Manual
PrevNext

recode

(PHP4 >= 4.0RC1)

recode -- Recode a string according to a recode request

Description

string recode_string (string request, string string)

Note: + This is an alias for recode_string(). It has + been added in PHP 4. +


PrevHomeNext
recode_stringUprecode_file
\ No newline at end of file diff --git a/function.register-shutdown-function.html b/function.register-shutdown-function.html new file mode 100644 index 0000000..fa95491 --- /dev/null +++ b/function.register-shutdown-function.html @@ -0,0 +1,189 @@ +register_shutdown_function
PHP Manual
PrevNext

register_shutdown_function

(PHP3 >= 3.0.4, PHP4 )

register_shutdown_function --  + Register a function for execution on shutdown +

Description

int + register_shutdown_function + (string func)

Registers the function named by func to be + executed when script processing is complete.

Common Pitfalls: +

Since no output is allowed to the browser in this function, you + will be unable to debug it using statements such as print or + echo. +


PrevHomeNext
function_existsUpGNU Gettext
\ No newline at end of file diff --git a/function.rename.html b/function.rename.html new file mode 100644 index 0000000..8bcd87b --- /dev/null +++ b/function.rename.html @@ -0,0 +1,188 @@ +rename
PHP Manual
PrevNext

rename

(PHP3 , PHP4 )

rename -- Renames a file

Description

int rename (string oldname, string newname)

+ Attempts to rename oldname to + newname. +

+ Returns true on success and false on failure. +


PrevHomeNext
readlinkUprewind
\ No newline at end of file diff --git a/function.require-once.html b/function.require-once.html new file mode 100644 index 0000000..3a21d4f --- /dev/null +++ b/function.require-once.html @@ -0,0 +1,593 @@ +require_once
PHP Manual
PrevChapter 11. Control StructuresNext

require_once()

The require_once() statement replaces + itself with the specified file, much like the C preprocessor's + #include works, and in that respect is + similar to the require() statement. The main + difference is that in an inclusion chain, the use of + require_once() will assure that the code is + added to your script only once, and avoid clashes with variable + values or function names that can happen. +

For example, if you create the following 2 include files + utils.inc and foolib.inc +

Example 11-2. utils.inc


<?php
+define(PHPVERSION, floor(phpversion()));
+echo "GLOBALS ARE NICE\n";
+function goodTea() {
+	return "Oolong tea tastes good!";
+}
+?>
+	 
+

Example 11-3. foolib.inc


<?php
+require ("utils.inc");
+function showVar($var) {
+	if (PHPVERSION == 4) {
+		print_r($var);
+	} else {
+		dump_var($var);
+	}
+}
+
+// bunch of other functions ...
+?>
+	 
+ And then you write a script cause_error_require.php +

Example 11-4. cause_error_require.php


<?php
+require("foolib.inc");
+/* the following will generate an error */
+require("utils.inc");
+$foo = array("1",array("complex","quaternion"));
+echo "this is requiring utils.inc again which is also\n";
+echo "required in foolib.inc\n";
+echo "Running goodTea: ".goodTea()."\n";
+echo "Printing foo: \n";
+showVar($foo);
+?>
+	 
+ When you try running the latter one, the resulting ouptut will be (using + PHP 4.01pl2): +


GLOBALS ARE NICE
+GLOBALS ARE NICE
+
+Fatal error:  Cannot redeclare causeerror() in utils.inc on line 5
+	 

+ By modifying foolib.inc and + cause_errror_require.php + to use require_once() + instead of require() and renaming the + last one to avoid_error_require_once.php, we have: +

Example 11-5. foolib.inc (fixed)


...
+require_once("utils.inc");
+function showVar($var) {
+...
+	 
+

Example 11-6. avoid_error_require_once.php


...
+require_once("foolib.inc");
+require_once("utils.inc");
+$foo = array("1",array("complex","quaternion"));
+...
+	 
+ And when running the latter, the output will be (using PHP 4.0.1pl2): +


GLOBALS ARE NICE
+this is requiring globals.inc again which is also
+required in foolib.inc
+Running goodTea: Oolong tea tastes good!
+Printing foo:
+Array
+(
+    [0] => 1
+    [1] => Array
+        (
+            [0] => complex
+            [1] => quaternion
+        )
+
+)
+	 

+

Also note that, analogous to the behavior of the + #include of the C preprocessor, this statement + acts at "compile time", e.g. when the script is parsed and before it + is executed, and should not be used for parts of the script that need + to be inserted dynamically during its execution. You should use + include_once() or include() + for that purpose. +

For more examples on using require_once() and + include_once(), look at the PEAR code included in + the latest PHP source code distributions. +

See also: require(), + include(), include_once(), + get_required_files(), + get_included_files(), readfile(), + and virtual(). +


PrevHomeNext
include()Upinclude_once()
\ No newline at end of file diff --git a/function.require.html b/function.require.html new file mode 100644 index 0000000..b20fa22 --- /dev/null +++ b/function.require.html @@ -0,0 +1,508 @@ +require
PHP Manual
PrevChapter 11. Control StructuresNext

require()

The require() statement replaces itself with + the specified file, much like the C preprocessor's + #include works. +

If "URL fopen wrappers" are enabled in PHP (which they are in the + default configuration), you can specify the file to be + require()ed using an URL instead of a local + pathname. See Remote + files and fopen() for more information. +

An important note about how this works is that when a file is + include()ed or require()ed, + parsing drops out of PHP mode and into HTML mode at the beginning + of the target file, and resumes PHP mode again at the end. For + this reason, any code inside the target file which should be + executed as PHP code must be enclosed within valid PHP start and end + tags. +

require() is not actually a function in PHP; + rather, it is a language construct. It is subject to some + different rules than functions are. For instance, + require() is not subject to any containing + control structures. For another, it does not return any value; + attempting to read a return value from a + require() call results in a parse error. +

Unlike include(), require() + will always read in the target file, + even if the line it's on never executes. If + you want to conditionally include a file, use + include(). The conditional statement won't + affect the require(). However, if the line on + which the require() occurs is not executed, + neither will any of the code in the target file be executed. +

Similarly, looping structures do not affect the behaviour of + require(). Although the code contained in the + target file is still subject to the loop, the + require() itself happens only once. +

This means that you can't put a require() + statement inside of a loop structure and expect it to include the + contents of a different file on each iteration. To do that, use an + include() statement. +


require ('header.inc');
+     

+

When a file is require()ed, the code it + contains inherits the variable scope of the line on which the + require() occurs. Any variables available at + that line in the calling file will be available within the called + file. If the require() occurs inside a + function within the calling file, then all of the code contained + in the called file will behave as though it had been defined + inside that function. +

If the require()ed file is called via HTTP + using the fopen wrappers, and if the target server interprets the + target file as PHP code, variables may be passed to the + require()ed file using an URL request string as + used with HTTP GET. This is not strictly speaking the same thing + as require()ing the file and having it inherit + the parent file's variable scope; the script is actually being run + on the remote server and the result is then being included into + the local script. +


/* This example assumes that someserver is configured to parse .php
+ * files and not .txt files. Also, 'works' here means that the variables 
+ * $varone and $vartwo are available within the require()ed file. */
+
+/* Won't work; file.txt wasn't handled by someserver. */
+require ("http://someserver/file.txt?varone=1&vartwo=2");
+
+/* Won't work; looks for a file named 'file.php?varone=1&vartwo=2'
+ * on the local filesystem. */
+require ("file.php?varone=1&vartwo=2");               
+
+/* Works. */
+require ("http://someserver/file.php?varone=1&vartwo=2"); 
+
+$varone = 1;
+$vartwo = 2;
+require ("file.txt");  /* Works. */
+require ("file.php");  /* Works. */
+     

+

In PHP 3, it is possible to execute a return + statement inside a require()ed file, as long as + that statement occurs in the global scope of the + require()ed file. It may not occur within any + block (meaning inside braces ({}). In PHP 4, however, this ability + has been discontinued. If you need this functionality, see + include(). +

See also include(), require_once(), + include_once(), readfile(), + and virtual(). +


PrevHomeNext
switchUpinclude()
\ No newline at end of file diff --git a/function.reset.html b/function.reset.html new file mode 100644 index 0000000..b2cb1c0 --- /dev/null +++ b/function.reset.html @@ -0,0 +1,219 @@ +reset
PHP Manual
PrevNext

reset

(PHP3 , PHP4 )

reset --  + Set the internal pointer of an array to its first element +

Description

mixed reset (array array)

Reset() rewinds array's + internal pointer to the first element. +

Reset() returns the value of the first array + element. +

See also: current(), + each(), next(), + and prev(). +


PrevHomeNext
rangeUprsort
\ No newline at end of file diff --git a/function.restore-error-handler.html b/function.restore-error-handler.html new file mode 100644 index 0000000..a88b2b3 --- /dev/null +++ b/function.restore-error-handler.html @@ -0,0 +1,211 @@ +restore_error_handler
PHP Manual
PrevNext

restore_error_handler

(PHP4 >= 4.0.1)

restore_error_handler --  + Restores the previous error handler function +

Description

void restore_error_handler (void)

Used after changing the error handler function using + set_error_handler(), to revert to the previous error + handler (which could be the built-in or a user defined function) +

See also error_reporting(), + set_error_handler(), + trigger_error(), user_error() +


PrevHomeNext
error_reportingUpset_error_handler
\ No newline at end of file diff --git a/function.rewind.html b/function.rewind.html new file mode 100644 index 0000000..1d4d914 --- /dev/null +++ b/function.rewind.html @@ -0,0 +1,201 @@ +rewind
PHP Manual
PrevNext

rewind

(PHP3 , PHP4 )

rewind -- Rewind the position of a file pointer

Description

int rewind (int fp)

+ Sets the file position indicator for fp to the beginning of the + file stream.

If an error occurs, returns 0.

The file pointer must be valid, and must point to a file + successfully opened by fopen(). +

See also fseek() and + ftell(). +


PrevHomeNext
renameUprmdir
\ No newline at end of file diff --git a/function.rewinddir.html b/function.rewinddir.html new file mode 100644 index 0000000..f25d5fc --- /dev/null +++ b/function.rewinddir.html @@ -0,0 +1,179 @@ +rewinddir
PHP Manual
PrevNext

rewinddir

(PHP3 , PHP4 )

rewinddir -- rewind directory handle

Description

void rewinddir (int dir_handle)

Resets the directory stream indicated by + dir_handle to the beginning of the + directory. +


PrevHomeNext
readdirUpDOM XML functions
\ No newline at end of file diff --git a/function.rmdir.html b/function.rmdir.html new file mode 100644 index 0000000..9a7f5e3 --- /dev/null +++ b/function.rmdir.html @@ -0,0 +1,188 @@ +rmdir
PHP Manual
PrevNext

rmdir

(PHP3 , PHP4 )

rmdir -- Removes directory

Description

int rmdir (string dirname)

+ Attempts to remove the directory named by pathname. The directory + must be empty, and the relevant permissions must permit. + this. +

+ If an error occurs, returns 0. +

See also mkdir(). +


PrevHomeNext
rewindUpstat
\ No newline at end of file diff --git a/function.round.html b/function.round.html new file mode 100644 index 0000000..0ca029f --- /dev/null +++ b/function.round.html @@ -0,0 +1,223 @@ +round
PHP Manual
PrevNext

round

(PHP3 , PHP4 )

round -- Rounds a float

Description

double round (double val [, int + precision])

Returns the rounded value of val to + specified precision. +


$foo = round (3.4);  // $foo == 3.0
+$foo = round (3.5);  // $foo == 4.0
+$foo = round (3.6);  // $foo == 4.0
+
+$foo = round (1.95583, 2);  // $foo == 1.96
+      

+

See also ceil() and + floor(). +


PrevHomeNext
randUpsin
\ No newline at end of file diff --git a/function.rsort.html b/function.rsort.html new file mode 100644 index 0000000..9c585fb --- /dev/null +++ b/function.rsort.html @@ -0,0 +1,302 @@ +rsort
PHP Manual
PrevNext

rsort

(PHP3 , PHP4 )

rsort -- Sort an array in reverse order

Description

void rsort (array array [, int + sort_flags])

This function sorts an array in reverse order (highest to lowest). +

Example 1. Rsort() example


$fruits = array ("lemon", "orange", "banana", "apple");
+rsort ($fruits);
+reset ($fruits);
+while (list ($key, $val) = each ($fruits)) {
+    echo "$key -> $val\n";
+}
+      
+

This example would display: +


fruits[0] = orange
+fruits[1] = lemon
+fruits[2] = banana
+fruits[3] = apple
+      

+

The fruits have been sorted in reverse alphabetical order. +

You may modify the behavior of the sort using the optional + parameter sort_flags, for details + see sort(). +

See also: arsort(), + asort(), ksort(), + sort(), and usort(). +


PrevHomeNext
resetUpshuffle
\ No newline at end of file diff --git a/function.rtrim.html b/function.rtrim.html new file mode 100644 index 0000000..c50cdce --- /dev/null +++ b/function.rtrim.html @@ -0,0 +1,232 @@ +rtrim
PHP Manual
PrevNext

rtrim

(PHP3 , PHP4 )

rtrim -- Remove trailing whitespace.

Description

string rtrim (string str)

Returns the argument string without trailing whitespace, + including newlines. This is an alias for chop(). +

Example 1. rtrim() example


$trimmed = rtrim ($line);
+      
+

See also trim(), ltrim(), and + rtrim(). +


PrevHomeNext
quotemetaUpsscanf
\ No newline at end of file diff --git a/function.satellite_caught_exception.html b/function.satellite_caught_exception.html new file mode 100644 index 0000000..1085219 --- /dev/null +++ b/function.satellite_caught_exception.html @@ -0,0 +1,268 @@ +satellite_caught_exception
PHP Manual
PrevNext

satellite_caught_exception

(PHP4 CVS only)

satellite_caught_exception --  + See if an exception was caught from the previous function +

Description

bool + satellite_caught_exception + ()

This function returns true if an exception has been caught. +

Example 1. Sample IDL file


/* ++?????++ Out of Cheese Error. Redo From Start. */
+exception OutOfCheeseError {
+    int parameter;
+}
+
+interface AnotherInterface {
+    void AskWhy() raises (OutOfCheeseError);
+}
+      
+

Example 2. PHP code for handling CORBA exceptions


<?php
+$obj = new OrbitObject ($ior);
+
+$obj->AskWhy();
+
+if (satellite_caught_exception()) {
+    if ("IDL:OutOfCheeseError:1.0" == satellite_exception_id()) {
+        $exception = satellite_exception_value();
+        echo $exception->parameter;
+    }
+}
+?>
+      
+


PrevHomeNext
OrbitStructUpsatellite_exception_id
\ No newline at end of file diff --git a/function.satellite_exception_id.html b/function.satellite_exception_id.html new file mode 100644 index 0000000..0cffe3b --- /dev/null +++ b/function.satellite_exception_id.html @@ -0,0 +1,177 @@ +satellite_exception_id
PHP Manual
PrevNext

satellite_exception_id

(PHP4 CVS only)

satellite_exception_id -- Get the repository id for the latest excetpion.

Description

string satellite_exception_id ()

Return a repository id string. (E.g. "IDL:MyException:1.0".) For + example usage see + satellite_caught_exception(). +


PrevHomeNext
satellite_caught_exceptionUpsatellite_exception_value
\ No newline at end of file diff --git a/function.satellite_exception_value.html b/function.satellite_exception_value.html new file mode 100644 index 0000000..0af55bf --- /dev/null +++ b/function.satellite_exception_value.html @@ -0,0 +1,180 @@ +satellite_exception_value
PHP Manual
PrevNext

satellite_exception_value

(PHP4 CVS only)

satellite_exception_value --  + Get the exception struct for the latest exception +

Description

OrbitStruct + satellite_exception_value + ()

Return an exception struct. For example usage see + satellite_caught_exception(). +


PrevHomeNext
satellite_exception_idUpSemaphore and Shared Memory Functions
\ No newline at end of file diff --git a/function.sem-acquire.html b/function.sem-acquire.html new file mode 100644 index 0000000..a448fb0 --- /dev/null +++ b/function.sem-acquire.html @@ -0,0 +1,204 @@ +sem_acquire
PHP Manual
PrevNext

sem_acquire

(PHP3 >= 3.0.6, PHP4 )

sem_acquire -- Acquire a semaphore

Description

int sem_acquire (int sem_identifier)

Returns: true on success, false on error. +

Sem_acquire() blocks (if necessary) until the + semaphore can be acquired. A process attempting to acquire a + semaphore which it has already acquired will block forever + if acquiring the semaphore would cause its max_acquire value to + be exceeded. +

After processing a request, any semaphores acquired by the + process but not explicitly released will be released automatically + and a warning will be generated. +

+ See also: sem_get() and + sem_release(). +


PrevHomeNext
sem_getUpsem_release
\ No newline at end of file diff --git a/function.sem-get.html b/function.sem-get.html new file mode 100644 index 0000000..cc24199 --- /dev/null +++ b/function.sem-get.html @@ -0,0 +1,224 @@ +sem_get
PHP Manual
PrevNext

sem_get

(PHP3 >= 3.0.6, PHP4 )

sem_get -- Get a semaphore id

Description

int sem_get (int key [, int + max_acquire [, int + perm]])

Returns: A positive semaphore identifier on success, or false on + error. +

Sem_get() returns an id that can be used to + access the System V semaphore with the given key. The semaphore + is created if necessary using the permission bits specified in + perm (defaults to 0666). The number of processes that can + acquire the semaphore simultaneously is set to max_acquire + (defaults to 1). Actually this value is set only if the process + finds it is the only process currently attached to the semaphore. +

A second call to sem_get() for the same key + will return a different semaphore identifier, but both + identifiers access the same underlying semaphore. +

+ See also: sem_acquire() and + sem_release(). +

Note: + This function does not work on Windows systems +


PrevHomeNext
Semaphore and Shared Memory FunctionsUpsem_acquire
\ No newline at end of file diff --git a/function.sem-release.html b/function.sem-release.html new file mode 100644 index 0000000..a45c504 --- /dev/null +++ b/function.sem-release.html @@ -0,0 +1,219 @@ +sem_release
PHP Manual
PrevNext

sem_release

(PHP3 >= 3.0.6, PHP4 )

sem_release -- Release a semaphore

Description

int sem_release (int sem_identifier)

Returns: true on success, false on error. +

Sem_release() releases the semaphore if it + is currently acquired by the calling process, otherwise + a warning is generated. +

After releasing the semaphore, sem_acquire() + may be called to re-acquire it. +

+ See also: sem_get() and + sem_acquire(). +

Note: + This function does not work on Windows systems +


PrevHomeNext
sem_acquireUpshm_attach
\ No newline at end of file diff --git a/function.serialize.html b/function.serialize.html new file mode 100644 index 0000000..a02913d --- /dev/null +++ b/function.serialize.html @@ -0,0 +1,274 @@ +serialize
PHP Manual
PrevNext

serialize

(PHP3 >= 3.0.5, PHP4 )

serialize --  + Generates a storable representation of a value +

Description

string serialize (mixed value)

Serialize() returns a string containing a + byte-stream representation of value that + can be stored anywhere. +

This is useful for storing or passing PHP values around without + losing their type and structure. +

To make the serialized string into a PHP value again, use + unserialize(). Serialize() + handles the types integer, double, + string, array (multidimensional) and + object (object properties will be serialized, but + methods are lost). +

Example 1. Serialize() example


// $session_data contains a multi-dimensional array with session
+// information for the current user.  We use serialize() to store
+// it in a database at the end of the request.
+
+$conn = odbc_connect ("webdb", "php", "chicken");
+$stmt = odbc_prepare ($conn,
+      "UPDATE sessions SET data = ? WHERE id = ?");
+$sqldata = array (serialize($session_data), $PHP_AUTH_USER);
+if (!odbc_execute ($stmt, &$sqldata)) {
+    $stmt = odbc_prepare($conn,
+     "INSERT INTO sessions (id, data) VALUES(?, ?)");
+    if (!odbc_execute($stmt, &$sqldata)) {
+    /* Something went wrong.  Bitch, whine and moan. */
+    }
+}
+      
+


PrevHomeNext
print_rUpsettype
\ No newline at end of file diff --git a/function.session-cache-limiter.html b/function.session-cache-limiter.html new file mode 100644 index 0000000..63c82af --- /dev/null +++ b/function.session-cache-limiter.html @@ -0,0 +1,280 @@ +session_cache_limiter
PHP Manual
PrevNext

session_cache_limiter

(PHP4 CVS only)

session_cache_limiter -- Get and/or set the current cache limiter

Description

string session_cache_limiter ([string + cache_limiter])

session_cache_limiter() returns the name of the + current cache limiter. If cache_limiter is + specified, the name of the current cache limiter is changed to the + new value. +

The cache limiter controls the cache control HTTP headers sent to the + client. These headers determine the rules by which the page content + may be cached. Setting the cache limiter to nocache, + for example, would disallow any client-side caching. A value of + public, however, would permit caching. It can also + be set to private, which is slightly more restrictive + than public. +

The cache limiter is reset to the default value stored in + session.cache_limiter at request startup time. Thus, + you need to call session_cache_limiter() for every + request (and before session_start() is called). +

Example 1. session_cache_limiter() examples


<?php
+
+# set the cache limiter to 'private'
+
+session_cache_limiter('private');
+$cache_limiter = session_cache_limiter();
+
+echo "The cache limiter is now set to $cache_limiter<p>";
+?>
+     

Note: + This function was added in PHP 4.0.3. +


PrevHomeNext
session_set_save_handlerUpShared Memory Functions
\ No newline at end of file diff --git a/function.session-decode.html b/function.session-decode.html new file mode 100644 index 0000000..0f2912e --- /dev/null +++ b/function.session-decode.html @@ -0,0 +1,195 @@ +session_decode
PHP Manual
PrevNext

session_decode

(PHP4 )

session_decode -- Decodes session data from a string

Description

bool session_decode (string data)

session_decode() decodes the session data in + data, setting variables stored in the + session. +

Note: + This function was added in PHP 4.0. +

+


PrevHomeNext
session_set_cookie_paramsUpsession_encode
\ No newline at end of file diff --git a/function.session-destroy.html b/function.session-destroy.html new file mode 100644 index 0000000..8dd89fa --- /dev/null +++ b/function.session-destroy.html @@ -0,0 +1,180 @@ +session_destroy
PHP Manual
PrevNext

session_destroy

(PHP4 )

session_destroy -- Destroys all data registered to a session

Description

bool session_destroy(void);

session_destroy() destroys all of the data + associated with the current session. +

This function returns true on success and false on failure to destroy + the session data. +


PrevHomeNext
session_startUpsession_name
\ No newline at end of file diff --git a/function.session-encode.html b/function.session-encode.html new file mode 100644 index 0000000..6a15bed --- /dev/null +++ b/function.session-encode.html @@ -0,0 +1,191 @@ +session_encode
PHP Manual
PrevNext

session_encode

(PHP4 )

session_encode --  + Encodes the current session data as a string +

Description

string session_encode(void);

session_encode() returns a string with the + contents of the current session encoded within. +

Note: + This function was added in PHP 4.0. +

+


PrevHomeNext
session_decodeUpsession_set_save_handler
\ No newline at end of file diff --git a/function.session-get-cookie-params.html b/function.session-get-cookie-params.html new file mode 100644 index 0000000..b02820a --- /dev/null +++ b/function.session-get-cookie-params.html @@ -0,0 +1,200 @@ +session_get_cookie_params
PHP Manual
PrevNext

session_get_cookie_params

(PHP4 >= 4.0RC2)

session_get_cookie_params --  + Get the session cookie parameters +

Description

array session_get_cookie_params + (void);

The session_get_cookie_params() function returns an + array with the current session cookie information, the array contains + the following items: +

  • "lifetime" - The lifetime of the cookie. +

  • "path" - The path where information is stored. +

  • "domain" - The domain of the cookie. +

+


PrevHomeNext
session_is_registeredUpsession_set_cookie_params
\ No newline at end of file diff --git a/function.session-id.html b/function.session-id.html new file mode 100644 index 0000000..e5953e8 --- /dev/null +++ b/function.session-id.html @@ -0,0 +1,190 @@ +session_id
PHP Manual
PrevNext

session_id

(PHP4 )

session_id -- Get and/or set the current session id

Description

string session_id ([string id])

session_id() returns the session id for the + current session. If id is specified, it + will replace the current session id. +

The constant SID can also be used to + retrieve the current name and session id as a string suitable for + adding to URLs. +


PrevHomeNext
session_save_pathUpsession_register
\ No newline at end of file diff --git a/function.session-is-registered.html b/function.session-is-registered.html new file mode 100644 index 0000000..d2bc413 --- /dev/null +++ b/function.session-is-registered.html @@ -0,0 +1,197 @@ +session_is_registered
PHP Manual
PrevNext

session_is_registered

(PHP4 )

session_is_registered --  + Find out if a variable is registered in a session +

Description

bool session_is_registered (string name)

session_is_registered() returns true if there + is a variable with the name name + registered in the current session. +

Note: + This function was added in PHP 4.0. +

+


PrevHomeNext
session_unsetUpsession_get_cookie_params
\ No newline at end of file diff --git a/function.session-module-name.html b/function.session-module-name.html new file mode 100644 index 0000000..2ceb420 --- /dev/null +++ b/function.session-module-name.html @@ -0,0 +1,196 @@ +session_module_name
PHP Manual
PrevNext

session_module_name

(PHP4 )

session_module_name -- Get and/or set the current session module

Description

string session_module_name ([string + module])

session_module_name() returns the name of the + current session module. If module is + specified, that module will be used instead. +

Note: + This function was added in PHP 4.0. +

+


PrevHomeNext
session_nameUpsession_save_path
\ No newline at end of file diff --git a/function.session-name.html b/function.session-name.html new file mode 100644 index 0000000..93d3181 --- /dev/null +++ b/function.session-name.html @@ -0,0 +1,267 @@ +session_name
PHP Manual
PrevNext

session_name

(PHP4 )

session_name -- Get and/or set the current session name

Description

string session_name ([string + name])

session_name() returns the name of the current + session. If name is specified, the name of + the current session is changed to its value. +

The session name references the session id in cookies and + URLs. It should contain only alphanumeric characters; it should + be short and descriptive (i.e. for users with enabled cookie + warnings). The session name is reset to the default value + stored in session.name at request startup + time. Thus, you need to call session_name() + for every request (and before session_start() + or session_register() are called). +

Example 1. session_name() examples


<?php
+
+# set the session name to WebsiteID
+
+$previous_name = session_name ("WebsiteID");
+
+echo "The previous session name was $previous_name<p>";
+?>
+     

Note: + This function was added in PHP 4.0. +


PrevHomeNext
session_destroyUpsession_module_name
\ No newline at end of file diff --git a/function.session-register.html b/function.session-register.html new file mode 100644 index 0000000..cb7c200 --- /dev/null +++ b/function.session-register.html @@ -0,0 +1,203 @@ +session_register
PHP Manual
PrevNext

session_register

(PHP4 )

session_register --  + Register one or more variables with the current session +

Description

bool session_register (mixed name [, mixed + ...])

session_register() variable number of + arguments, any of which can be either a string holding the + variable name or an array consisting of such variable names or + other arrays. For each encountered variable name, + session_register() registers the global + variable named by it with the current session. +

This function returns true when the variable is successfully + registered with the session. +

Note: + This function was added in PHP 4.0. +

+


PrevHomeNext
session_idUpsession_unregister
\ No newline at end of file diff --git a/function.session-save-path.html b/function.session-save-path.html new file mode 100644 index 0000000..b6348a8 --- /dev/null +++ b/function.session-save-path.html @@ -0,0 +1,212 @@ +session_save_path
PHP Manual
PrevNext

session_save_path

(PHP4 )

session_save_path -- Get and/or set the current session save path

Description

string session_save_path ([string + path])

session_save_path() returns the path of the current + directory used to save session data. If path + is specified, the path to which data is saved will be changed. +

Note: + On some operating systems, you may want to specify a path on a + filesystem that handles lots of small files efficiently. For + example, on Linux, reiserfs may provide better performance than + ext2fs. +

+

Note: + This function was added in PHP 4.0. +

+


PrevHomeNext
session_module_nameUpsession_id
\ No newline at end of file diff --git a/function.session-set-cookie-params.html b/function.session-set-cookie-params.html new file mode 100644 index 0000000..01ad4e7 --- /dev/null +++ b/function.session-set-cookie-params.html @@ -0,0 +1,175 @@ +session_set_cookie_params
PHP Manual
PrevNext

session_set_cookie_params

(PHP4 >= 4.0b4)

session_set_cookie_params --  + Set the session cookie parameters +

Description

void session_set_cookie_params (int lifetime [, string path [, string domain]])

Set cookie parameters defined in the php.ini file. The effect of this + function only lasts for the duration of the script. +


PrevHomeNext
session_get_cookie_paramsUpsession_decode
\ No newline at end of file diff --git a/function.session-set-save-handler.html b/function.session-set-save-handler.html new file mode 100644 index 0000000..b34f43a --- /dev/null +++ b/function.session-set-save-handler.html @@ -0,0 +1,331 @@ +session_set_save_handler
PHP Manual
PrevNext

session_set_save_handler

(PHP4 >= 4.0b4)

session_set_save_handler --  + Sets user-level session storage functions +

Description

void + session_set_save_handler + (string + open, string + close, string + read, string + write, string + destroy, string + gc)

session_set_save_handler() sets the user-level + session storage functions which are used for storing and + retrieving data associated with a session. This is most useful + when a storage method other than those supplied by PHP sessions + is preferred. i.e. Storing the session data in a local database. +

Note: + You must set the configuration option + session.save_handler to + user in your php.ini file for + session_set_save_handler() to take effect. +

The following example provides file based session + storage similar to the PHP sessions default save handler + files. This example could easily be + extended to cover database storage using your favorite PHP + supported database engine. +

Example 1. + session_set_save_handler() example +


<?php
+
+function open ($save_path, $session_name) {
+  global $sess_save_path, $sess_session_name;
+       
+  $sess_save_path = $save_path;
+  $sess_session_name = $session_name;
+  return(true);
+}
+
+function close() {
+  return(true);
+}
+
+function read ($id) {
+  global $sess_save_path, $sess_session_name;
+
+  $sess_file = "$sess_save_path/sess_$id";
+  if ($fp = @fopen($sess_file, "r")) {
+    $sess_data = fread($fp, filesize($sess_file));
+    return($sess_data);
+  } else {
+    return("");
+  }
+
+}
+
+function write ($id, $sess_data) {
+  global $sess_save_path, $sess_session_name;
+
+  $sess_file = "$sess_save_path/sess_$id";
+  if ($fp = @fopen($sess_file, "w")) {
+    return(fwrite($fp, $sess_data));
+  } else {
+    return(false);
+  }
+
+}
+
+function destroy ($id) {
+  global $sess_save_path, $sess_session_name;
+       
+  $sess_file = "$sess_save_path/sess_$id";
+  return(@unlink($sess_file));
+}
+
+/*********************************************
+ * WARNING - You will need to implement some *
+ * sort of garbage collection routine here.  *
+ *********************************************/
+function gc ($maxlifetime) {
+  return true;
+}
+
+session_set_save_handler ("open", "close", "read", "write", "destroy", "gc");
+
+session_start();
+
+// proceed to use sessions normally
+
+?>
+      
+


PrevHomeNext
session_encodeUpsession_cache_limiter
\ No newline at end of file diff --git a/function.session-start.html b/function.session-start.html new file mode 100644 index 0000000..b86512c --- /dev/null +++ b/function.session-start.html @@ -0,0 +1,191 @@ +session_start
PHP Manual
PrevNext

session_start

(PHP4 )

session_start -- Initialize session data

Description

bool session_start(void);

session_start() creates a session (or resumes + the current one based on the session id being passed via a GET + variable or a cookie).

This function always returns true. +

Note: + This function was added in PHP 4.0. +


PrevHomeNext
Session handling functionsUpsession_destroy
\ No newline at end of file diff --git a/function.session-unregister.html b/function.session-unregister.html new file mode 100644 index 0000000..e6c938b --- /dev/null +++ b/function.session-unregister.html @@ -0,0 +1,201 @@ +session_unregister
PHP Manual
PrevNext

session_unregister

(PHP4 )

session_unregister --  + Unregister a variable from the current session +

Description

bool session_unregister (string name)

session_unregister() unregisters (forgets) + the global variable named name from the + current session. +

This function returns true when the variable is successfully + unregistered from the session. +

Note: + This function was added in PHP 4.0. +

+


PrevHomeNext
session_registerUpsession_unset
\ No newline at end of file diff --git a/function.session-unset.html b/function.session-unset.html new file mode 100644 index 0000000..803b3b6 --- /dev/null +++ b/function.session-unset.html @@ -0,0 +1,178 @@ +session_unset
PHP Manual
PrevNext

session_unset

(PHP4 >= 4.0b4)

session_unset --  + Free all session variables +

Description

void session_unset(void);

The session_unset() function free's all session variables + currently registered. +


PrevHomeNext
session_unregisterUpsession_is_registered
\ No newline at end of file diff --git a/function.set-error-handler.html b/function.set-error-handler.html new file mode 100644 index 0000000..3f54d48 --- /dev/null +++ b/function.set-error-handler.html @@ -0,0 +1,400 @@ +set_error_handler
PHP Manual
PrevNext

set_error_handler

(PHP4 >= 4.0.1)

set_error_handler --  + Sets a user-defined error handler function. +

Description

string set_error_handler (string error_handler)

Sets a user function (error_handler) to handle + errors in a script. Returns the previously defined error handler (if + any), or false on error. This function can be used for defining your own + way of handling errors during runtime, for example in applications in + which you need to do cleanup of data/files when a critical error happens, + or when you need to trigger an error under certain conditions (using + trigger_error()) +

The user function needs to accept 2 parameters: the error code, and a + string describing the error. The example below shows the handling of + internal execptions by triggering errors and handling them with a user + defined function: +

Example 1. + Error handling with set_error_handler() and + trigger_error() +


<?php
+
+// redefine the user error constants - PHP 4 only
+define (FATAL,E_USER_ERROR);
+define (ERROR,E_USER_WARNING);
+define (WARNING,E_USER_NOTICE);
+
+// set the error reporting level for this script
+error_reporting  (FATAL + ERROR + WARNING);
+
+// error handler function
+function myErrorHandler ($errno, $errstr) {
+    switch ($errno) {
+    case FATAL:
+    echo "<b>FATAL</b> [$errno] $errstr<br>\n";
+    echo "  Fatal error in line ".__LINE__." of file ".__FILE__;
+    echo ", PHP ".PHP_VERSION." (".PHP_OS.")<br>\n";
+    echo "Aborting...<br>\n";
+    exit -1;
+    break;
+    case ERROR:
+    echo "<b>ERROR</b> [$errno] $errstr<br>\n";
+    break;
+    case WARNING:
+    echo "<b>WARNING</b> [$errno] $errstr<br>\n";
+    break;
+    default:
+    echo "Unkown error type: [$errno] $errstr<br>\n";
+    break;
+    }
+}
+
+// function to test the error handling
+function scale_by_log ($vect, $scale) {
+    if ( !is_numeric($scale) || $scale <= 0 )
+    trigger_error("log(x) for x <= 0 is undefined, you used: scale = $scale", 
+      FATAL);
+    if (!is_array($vect)) {
+    trigger_error("Incorrect input vector, array of values expected", ERROR);
+    return null;
+    }
+    for ($i=0; $i<count($vect); $i++) {
+    if (!is_numeric($vect[$i]))
+    trigger_error("Value at position $i is not a number, using 0 (zero)", 
+      WARNING);
+    $temp[$i] = log($scale) * $vect[$i];
+    }
+    return $temp;
+}
+
+// set to the user defined error handler
+$old_error_handler = set_error_handler("myErrorHandler");
+
+// trigger some errors, first define a mixed array with a non-numeric item
+echo "vector a\n";
+$a = array(2,3,"foo",5.5,43.3,21.11);
+print_r($a);
+
+// now generate second array, generating a warning
+echo "----\nvector b - a warning (b = log(PI) * a)\n";
+$b = scale_by_log($a, M_PI);
+print_r($b);
+
+// this is trouble, we pass a string instead of an array
+echo "----\nvector c - an error\n";
+$c = scale_by_log("not array",2.3);
+var_dump($c);
+
+// this is a critical error, log of zero or negative number is undefined
+echo "----\nvector d - fatal error\n";
+$d = scale_by_log($a, -2.5);
+
+?>
+      
+ And when you run this sample script, the output will be +


vector a
+Array
+(
+    [0] => 2
+    [1] => 3
+    [2] => foo
+    [3] => 5.5
+    [4] => 43.3
+    [5] => 21.11
+)
+----
+vector b - a warning (b = log(PI) * a)
+<b>WARNING</b> [1024] Value at position 2 is not a number, using 0 (zero)<br>
+Array
+(
+    [0] => 2.2894597716988
+    [1] => 3.4341896575482
+    [2] => 0
+    [3] => 6.2960143721717
+    [4] => 49.566804057279
+    [5] => 24.165247890281
+)
+----
+vector c - an error
+<b>ERROR</b> [512] Incorrect input vector, array of values expected<br>
+NULL
+----
+vector d - fatal error
+<b>FATAL</b> [256] log(x) for x <= 0 is undefined, you used: scale = -2.5<br>
+  Fatal error in line 16 of file trigger_error.php, PHP 4.0.1pl2 (Linux)<br>
+Aborting...<br>
+      

+

See also error_reporting(), + restore_error_handler(), + trigger_error(), user_error() +


PrevHomeNext
restore_error_handlerUptrigger_error
\ No newline at end of file diff --git a/function.set-file-buffer.html b/function.set-file-buffer.html new file mode 100644 index 0000000..6a1d02a --- /dev/null +++ b/function.set-file-buffer.html @@ -0,0 +1,282 @@ +set_file_buffer
PHP Manual
PrevNext

set_file_buffer

(PHP3 >= 3.0.8, PHP4 >= 4.0.1)

set_file_buffer --  + Sets file buffering on the given file pointer +

Description

int set_file_buffer (int fp, int buffer)

Output using fwrite() is normally buffered at + 8K. This means that if there are two processess wanting to write + to the same output stream (a file), each is paused after 8K of + data to allow the other to write. set_file_buffer() + sets the buffering for write operations on the given filepointer + fp to buffer bytes. + If buffer is 0 then write operations are + unbuffered. This ensures that all writes with + fwrite() are completed before other processes + are allowed to write to that output stream. +

The function returns 0 on success, or EOF if the request cannot + be honored. +

The following example demonstrates how to use + set_file_buffer() to create an unbuffered stream. +

Example 1. set_file_buffer() example


$fp=fopen($file, "w");
+if($fp){
+  set_file_buffer($fp, 0);
+  fputs($fp, $output);
+  fclose($fp);
+}
+      
+

See also fopen(), fwrite(). +


PrevHomeNext
fwriteUpis_dir
\ No newline at end of file diff --git a/function.set-magic-quotes-runtime.html b/function.set-magic-quotes-runtime.html new file mode 100644 index 0000000..3841243 --- /dev/null +++ b/function.set-magic-quotes-runtime.html @@ -0,0 +1,197 @@ +set_magic_quotes_runtime
PHP Manual
PrevNext

set_magic_quotes_runtime

(PHP3 >= 3.0.6, PHP4 )

set_magic_quotes_runtime --  + Set the current active configuration setting of + magic_quotes_runtime. +

Description

long + set_magic_quotes_runtime + (int new_setting)

Set the current active configuration setting of magic_quotes_runtime. + (0 for off, 1 for on) +

See also get_magic_quotes_gpc(), + get_magic_quotes_runtime(). +


PrevHomeNext
putenvUpset_time_limit
\ No newline at end of file diff --git a/function.set-socket-blocking.html b/function.set-socket-blocking.html new file mode 100644 index 0000000..a4885c0 --- /dev/null +++ b/function.set-socket-blocking.html @@ -0,0 +1,205 @@ +socket_set_blocking
PHP Manual
PrevNext

socket_set_blocking

(PHP4 >= 4.0b4)

socket_set_blocking -- Set blocking/non-blocking mode on a socket

Description

int socket_set_blocking (int socket descriptor, int mode)

If mode is false, the given socket + descriptor will be switched to non-blocking mode, and if true, it + will be switched to blocking mode. This affects calls like + fgets() that read from the socket. In + non-blocking mode an fgets() call will always + return right away while in blocking mode it will wait for data to + become available on the socket. +

This function was previously called as + set_socket_blocking() but this usage is deprecated. +


PrevHomeNext
socket_get_statusUpsocket_set_timeout
\ No newline at end of file diff --git a/function.set-time-limit.html b/function.set-time-limit.html new file mode 100644 index 0000000..1748797 --- /dev/null +++ b/function.set-time-limit.html @@ -0,0 +1,201 @@ +set_time_limit
PHP Manual
PrevNext

set_time_limit

(PHP3 , PHP4 )

set_time_limit -- limit the maximum execution time

Description

void set_time_limit (int seconds)

Set the number of seconds a script is allowed to run. If this is + reached, the script returns a fatal error. The default limit is + 30 seconds or, if it exists, the max_execution_time value defined + in the configuration + file. If seconds is set to zero, no time limit is + imposed. +

When called, set_time_limit() restarts the + timeout counter from zero. In other words, if the timeout is the + default 30 seconds, and 25 seconds into script execution a call + such as set_time_limit(20) is made, the script will run for a + total of 45 seconds before timing out. +

Note that set_time_limit() has no effect when + PHP is running in safe mode. There is no workaround other than + turning off safe mode or changing the time limit in the configuration file. +


PrevHomeNext
set_magic_quotes_runtimeUpzend_logo_guid
\ No newline at end of file diff --git a/function.setcookie.html b/function.setcookie.html new file mode 100644 index 0000000..f5e5080 --- /dev/null +++ b/function.setcookie.html @@ -0,0 +1,462 @@ +setcookie
PHP Manual
PrevNext

setcookie

(PHP3 , PHP4 )

setcookie -- Send a cookie

Description

int setcookie (string name [, string + value [, int + expire [, string + path [, string + domain [, int + secure]]]]])

Setcookie() defines a cookie to be sent along + with the rest of the header information. Cookies must be sent + before any other headers are sent (this is a + restriction of cookies, not PHP). This requires you to place + calls to this function before any <html> or + <head> tags. +

All the arguments except the name argument + are optional. If only the name argument is present, the cookie + by that name will be deleted from the remote client. You may + also replace any argument with an empty string + ("") in order to skip that + argument. The expire and + secure arguments are integers and cannot + be skipped with an empty string. Use a zero + (0) instead. The + expire argument is a regular Unix time + integer as returned by the time() or + mktime() functions. The + secure indicates that the cookie should + only be transmitted over a secure HTTPS connection. +

Common Pitfalls: +

  • Cookies will not become visible until the next loading of a page that + the cookie should be visible for. +

  • Cookies must be deleted with the same parameters as they were set with. +

+

In PHP 3, multiple calls to setcookie() in the same + script will be performed in reverse order. If you are trying to + delete one cookie before inserting another you should put the + insert before the delete. In PHP 4, multiple calls to + setcookie() are performed in the order called. +

Some examples follow how to send cookies: +

Example 1. Setcookie() send examples


setcookie ("TestCookie", "Test Value");
+setcookie ("TestCookie", $value,time()+3600);  /* expire in 1 hour */
+setcookie ("TestCookie", $value,time()+3600, "/~rasmus/", ".utoronto.ca", 1);
+      
+

Examples follow how to delete cookies send in previous example: +

Example 2. setcookie() delete examples


setcookie ("TestCookie");
+// set the expiration date to one hour ago
+setcookie ("TestCookie", "", time() - 3600);
+setcookie ("TestCookie", "", time() - 3600, "/~rasmus/", ".utoronto.ca", 1);
+      
+ When deleting a cookie you should assure that the expiration date + is in the past, to trigger the removal mechanism in your browser. +

Note that the value portion of the cookie will automatically be + urlencoded when you send the cookie, and when it is received, it + is automatically decoded and assigned to a variable by the same + name as the cookie name. To see the contents of our test + cookie in a script, simply use one of the following examples: +


echo $TestCookie;
+echo $HTTP_COOKIE_VARS["TestCookie"];
+      

+

You may also set array cookies by using array notation in the + cookie name. This has the effect of setting as many cookies as + you have array elements, but when the cookie is received by your + script, the values are all placed in an array with the cookie's + name: +


setcookie ("cookie[three]", "cookiethree");
+setcookie ("cookie[two]", "cookietwo");
+setcookie ("cookie[one]", "cookieone");
+if (isset ($cookie)) {
+    while (list ($name, $value) = each ($cookie)) {
+        echo "$name == $value<br>\n";
+    }
+}
+      

+

For more information on cookies, see Netscape's cookie + specification at http://www.netscape.com/newsref/std/cookie_spec.html. +

Microsoft Internet Explorer 4 with Service Pack 1 applied does + not correctly deal with cookies that have their path parameter + set. +

Netscape Communicator 4.05 and Microsoft Internet Explorer 3.x + appear to handle cookies incorrectly when the path and time + are not set. +


PrevHomeNext
headers_sentUpHyperwave functions
\ No newline at end of file diff --git a/function.setlocale.html b/function.setlocale.html new file mode 100644 index 0000000..6917efd --- /dev/null +++ b/function.setlocale.html @@ -0,0 +1,256 @@ +setlocale
PHP Manual
PrevNext

setlocale

(PHP3 , PHP4 )

setlocale -- Set locale information

Description

string setlocale (string category, string locale)

Category is a string specifying the + category of the functions affected by the locale setting: +

  • LC_ALL for all of the below +

  • LC_COLLATE for string comparison - not currently implemented in PHP +

  • LC_CTYPE for character classification and conversion, for + example strtoupper() +

  • LC_MONETARY for localeconv() - not currently implemented in + PHP +

  • + LC_NUMERIC for decimal separator +

  • LC_TIME for date and time formatting with + strftime() +

+

If locale is the empty string + "", the locale names will be set from the + values of environment variables with the same names as the above + categories, or from "LANG". +

If locale is zero or "0", the locale setting + is not affected, only the current setting is returned. +

Setlocale returns the new current locale, or false if the locale + functionality is not implemented in the plattform, the specified + locale does not exist or the category name is invalid. + An invalid category name also causes a warning message. +


PrevHomeNext
sscanfUpsimilar_text
\ No newline at end of file diff --git a/function.settype.html b/function.settype.html new file mode 100644 index 0000000..430d024 --- /dev/null +++ b/function.settype.html @@ -0,0 +1,228 @@ +settype
PHP Manual
PrevNext

settype

(PHP3 , PHP4 )

settype -- Set the type of a variable

Description

int settype (string var, string type)

Set the type of variable var to + type. +

Possibles values of type are: +

  • "integer"

  • "double"

  • "string"

  • "array"

  • "object"

+

Returns true if successful; otherwise returns false. +

See also gettype(). +


PrevHomeNext
serializeUpstrval
\ No newline at end of file diff --git a/function.shm-attach.html b/function.shm-attach.html new file mode 100644 index 0000000..e253028 --- /dev/null +++ b/function.shm-attach.html @@ -0,0 +1,221 @@ +shm_attach
PHP Manual
PrevNext

shm_attach

(PHP3 >= 3.0.6, PHP4 )

shm_attach -- Creates or open a shared memory segment

Description

int shm_attach (int key [, int + memsize [, int + perm]])

Shm_attach() returns an id that that can be + used to access the System V shared memory with the given key, the + first call creates the shared memory segment with mem_size + (default: sysvshm.init_mem in the configuration file, otherwise + 10000 bytes) and the optional perm-bits (default: 0666). +

A second call to shm_attach() for the same + key will return a different shared memory + identifier, but both identifiers access the same underlying + shared memory. Memsize and + perm will be ignored. +

Note: + This function does not work on Windows systems +


PrevHomeNext
sem_releaseUpshm_detach
\ No newline at end of file diff --git a/function.shm-detach.html b/function.shm-detach.html new file mode 100644 index 0000000..4811c93 --- /dev/null +++ b/function.shm-detach.html @@ -0,0 +1,189 @@ +shm_detach
PHP Manual
PrevNext

shm_detach

(PHP3 >= 3.0.6, PHP4 )

shm_detach -- Disconnects from shared memory segment

Description

int shm_detach (int shm_identifier)

Shm_detach() disconnects from the shared + memory given by the shm_identifier created + by shm_attach(). Remember, that shared memory + still exist in the Unix system and the data is still present. +


PrevHomeNext
shm_attachUpshm_remove
\ No newline at end of file diff --git a/function.shm-get-var.html b/function.shm-get-var.html new file mode 100644 index 0000000..2b8f909 --- /dev/null +++ b/function.shm-get-var.html @@ -0,0 +1,195 @@ +shm_get_var
PHP Manual
PrevNext

shm_get_var

(PHP3 >= 3.0.6, PHP4 )

shm_get_var -- Returns a variable from shared memory +

Description

mixed shm_get_var (int id, int variable_key)

Shm_get_var() returns the variable with a given + variable_key. The variable is still present + in the shared memory. +

Note: + This function does not work on Windows systems +


PrevHomeNext
shm_put_varUpshm_remove_var
\ No newline at end of file diff --git a/function.shm-put-var.html b/function.shm-put-var.html new file mode 100644 index 0000000..0a38488 --- /dev/null +++ b/function.shm-put-var.html @@ -0,0 +1,197 @@ +shm_put_var
PHP Manual
PrevNext

shm_put_var

(PHP3 >= 3.0.6, PHP4 )

shm_put_var -- Inserts or updates a variable in shared + memory

Description

int shm_put_var (int shm_identifier, int variable_key, mixed variable)

Inserts or updates a variable with a given + variable_key. All variable-types (double, + int, string, array) are supported. +

Note: + This function does not work on Windows systems +


PrevHomeNext
shm_removeUpshm_get_var
\ No newline at end of file diff --git a/function.shm-remove-var.html b/function.shm-remove-var.html new file mode 100644 index 0000000..5d1ef33 --- /dev/null +++ b/function.shm-remove-var.html @@ -0,0 +1,191 @@ +shm_remove_var
PHP Manual
PrevNext

shm_remove_var

(PHP3 >= 3.0.6, PHP4 )

shm_remove_var -- Removes a variable from shared memory +

Description

int shm_remove_var (int id, int variable_key)

Removes a variable with a given variable_key + and frees the occupied memory. +

Note: + This function does not work on Windows systems +


PrevHomeNext
shm_get_varUpSession handling functions
\ No newline at end of file diff --git a/function.shm-remove.html b/function.shm-remove.html new file mode 100644 index 0000000..49d54dd --- /dev/null +++ b/function.shm-remove.html @@ -0,0 +1,185 @@ +shm_remove
PHP Manual
PrevNext

shm_remove

(PHP3 >= 3.0.6, PHP4 )

shm_remove -- Removes shared memory from Unix systems

Description

int shm_remove (int shm_identifier)

Removes shared memory from Unix systems. All data will be + destroyed. +

Note: + This function does not work on Windows systems +


PrevHomeNext
shm_detachUpshm_put_var
\ No newline at end of file diff --git a/function.shm_close.html b/function.shm_close.html new file mode 100644 index 0000000..eed09d4 --- /dev/null +++ b/function.shm_close.html @@ -0,0 +1,230 @@ +shm_close
PHP Manual
PrevNext

shm_close

(unknown)

shm_close -- Close shared memory block

Description

int shm_close (int shmid)

shm_close() is used to close a shared memory block. +

shm_close() takes the shmid, which is the shared memory + block identifier created by shm_open(). +

Example 1. Closing shared memory block


<?php
+shm_close($shm_id);
+?>
+      
+

This example will close shared memory block identified by $shm_id. +


PrevHomeNext
shm_deleteUpShockwave Flash functions
\ No newline at end of file diff --git a/function.shm_delete.html b/function.shm_delete.html new file mode 100644 index 0000000..cdf7b0e --- /dev/null +++ b/function.shm_delete.html @@ -0,0 +1,232 @@ +shm_delete
PHP Manual
PrevNext

shm_delete

(unknown)

shm_delete -- Delete shared memory block

Description

int shm_delete (int shmid)

shm_delete() is used to delete a shared memory block. +

shm_delete() takes the shmid, which is the shared memory + block identifier created by shm_open(). On success 1 is + returned, on failure 0 is returned. +

Example 1. Deleting shared memory block


<?php
+shm_delete($shm_id);
+?>
+      
+

This example will delete shared memory block identified by + $shm_id. +


PrevHomeNext
shm_sizeUpshm_close
\ No newline at end of file diff --git a/function.shm_open.html b/function.shm_open.html new file mode 100644 index 0000000..4b08303 --- /dev/null +++ b/function.shm_open.html @@ -0,0 +1,266 @@ +shm_open
PHP Manual
PrevNext

shm_open

(unknown)

shm_open -- Create or open shared memory block

Description

int shm_open (int key, string flags, int mode, int size)

shm_open() can create or open a shared memory block. +

shm_open() takes 4 parameters: key, which is the + system's id for the shared memory block, this parameter can be passed + as a decimal or hex. The second parameter are the flags that you can use: +

  • "a" for access (sets IPC_EXCL) + use this flag when you need to open an existing shared memory segment +

  • "c" for create (sets IPC_CREATE) + use this flag when you need to create a new shared memory segment. +

+ The third parameter is the mode, which are the permissions that you + wish to assign to your memory segment, those are the same as permission + for a file. Permissions need to be passed in octal form ex. 0644. + The last parameter is size of the shared memory block you wish to create + in bytes. +

Note: + Note: the 3rd and 4th should be entered as 0 if you are opening an + existing memory segment. On success shm_open() will + return an id that you can use to access the shared memory segment + you've created. +

+

Example 1. Create a new shared memory block


<?php
+$shm_id = shm_open(0x0fff, "c", 0644, 100);
+?>
+      
+

This example opened a shared memory block with a system id of 0x0fff. +


PrevHomeNext
Shared Memory FunctionsUpshm_read
\ No newline at end of file diff --git a/function.shm_read.html b/function.shm_read.html new file mode 100644 index 0000000..5deb20c --- /dev/null +++ b/function.shm_read.html @@ -0,0 +1,232 @@ +shm_read
PHP Manual
PrevNext

shm_read

(unknown)

shm_read -- Read data from shared memory block

Description

string shm_read (int shmid, int start, int count)

shm_read() will read a string from shared memory block. +

shm_read() takes 3 parameters: shmid, which is the shared + memory block identifier created by shm_open(), offset from + which to start reading and count on the number of bytes to read. +

Example 1. Reading shared memory block


<?php
+$shm_data = shm_read($shm_id, 0, 50);
+?>
+      
+

This example will read 50 bytes from shared memory block and place the data + inside $shm_data. +


PrevHomeNext
shm_openUpshm_write
\ No newline at end of file diff --git a/function.shm_write.html b/function.shm_write.html new file mode 100644 index 0000000..1b8d030 --- /dev/null +++ b/function.shm_write.html @@ -0,0 +1,237 @@ +shm_write
PHP Manual
PrevNext

shm_write

(unknown)

shm_write -- Write data into shared memory block

Description

int shm_write (int shmid, string data, int offset)

shm_write() will write a string into shared memory block. +

shm_write() takes 3 parameters: shmid, which is the + shared memory block identifier created by shm_open(), + data, a string that you want to write into shared memory block and offset, + which specifies where to start writing data inside the shared memory segment. +

Example 1. Writing to shared memory block


<?php
+$shm_bytes_written = shm_write($shm_id, $my_string, 0);
+?>
+      
+

This example will write data inside $my_string into + shared memory block, $shm_bytes_written will contain + the number of bytes written. +


PrevHomeNext
shm_readUpshm_size
\ No newline at end of file diff --git a/function.show-source.html b/function.show-source.html new file mode 100644 index 0000000..5d5bde5 --- /dev/null +++ b/function.show-source.html @@ -0,0 +1,217 @@ +show_source
PHP Manual
PrevNext

show_source

(PHP4 )

show_source -- Syntax highlighting of a file

Description

void show_source (string filename)

The show_source() function prints out a syntax + higlighted version of the code contained in filename + using the colors defined in the built-in syntax highlighter for PHP. +

Note: + This function is an alias for the function + highlight_file() +

See also highlight_string(), + highlight_file(). +


PrevHomeNext
packUpsleep
\ No newline at end of file diff --git a/function.shuffle.html b/function.shuffle.html new file mode 100644 index 0000000..d46b2af --- /dev/null +++ b/function.shuffle.html @@ -0,0 +1,257 @@ +shuffle
PHP Manual
PrevNext

shuffle

(PHP3 >= 3.0.8, PHP4 >= 4.0b4)

shuffle -- Shuffle an array

Description

void shuffle (array array)

This function shuffles (randomizes the order of the elements in) + an array. +

Example 1. Shuffle() example


$numbers = range (1,20);
+srand (time());
+shuffle ($numbers);
+while (list (, $number) = each ($numbers)) {
+    echo "$number ";
+}
+      
+

See also arsort(), asort(), + ksort(), rsort(), + sort() and usort(). +


PrevHomeNext
rsortUpsizeof
\ No newline at end of file diff --git a/function.similar-text.html b/function.similar-text.html new file mode 100644 index 0000000..5ae524e --- /dev/null +++ b/function.similar-text.html @@ -0,0 +1,189 @@ +similar_text
PHP Manual
PrevNext

similar_text

(PHP3 >= 3.0.7, PHP4 >= 4.0b2)

similar_text --  + Calculate the similarity between two strings +

Description

int similar_text (string first, string second [, double + percent])

This calculates the similarity between two strings as described + in Oliver [1993]. Note that this implementation does not use a + stack as in Oliver's pseudo code, but recursive calls which may + or may not speed up the whole process. Note also that the + complexity of this algorithm is O(N**3) where N is the length of + the longest string. +

By passing a reference as third argument, + similar_text() will calculate the similarity + in percent for you. It returns the number of matching chars in + both strings. +


PrevHomeNext
setlocaleUpsoundex
\ No newline at end of file diff --git a/function.sin.html b/function.sin.html new file mode 100644 index 0000000..90d6125 --- /dev/null +++ b/function.sin.html @@ -0,0 +1,187 @@ +sin
PHP Manual
PrevNext

sin

(PHP3 , PHP4 )

sin -- Sine

Description

float sin (float arg)

Returns the sine of arg in radians. +

See also cos() and tan(). +


PrevHomeNext
roundUpsqrt
\ No newline at end of file diff --git a/function.size.html b/function.size.html new file mode 100644 index 0000000..577b730 --- /dev/null +++ b/function.size.html @@ -0,0 +1,237 @@ +shm_size
PHP Manual
PrevNext

shm_size

(unknown)

shm_size -- Get size of shared memory block

Description

int shm_size (int shmid)

shm_size() is used to get the size, in bytes of the + shared memory block. +

shm_size() takes the shmid, which is the shared memory + block identifier created by shm_open(), the function + will return and int, which represents the number of bytes the shared memory + block occupies. +

Example 1. Getting the size of the shared memory block


<?php
+$shm_size = shm_size($shm_id);
+?>
+      
+

This example will put the size of shared memory block identified by + $shm_id into $shm_size. +


PrevHomeNext
shm_writeUpshm_delete
\ No newline at end of file diff --git a/function.sizeof.html b/function.sizeof.html new file mode 100644 index 0000000..be0921e --- /dev/null +++ b/function.sizeof.html @@ -0,0 +1,181 @@ +sizeof
PHP Manual
PrevNext

sizeof

(PHP3 , PHP4 )

sizeof -- Get the number of elements in an array

Description

int sizeof (array array)

Returns the number of elements in the array. +

See also count(). +


PrevHomeNext
shuffleUpsort
\ No newline at end of file diff --git a/function.sleep.html b/function.sleep.html new file mode 100644 index 0000000..3311399 --- /dev/null +++ b/function.sleep.html @@ -0,0 +1,187 @@ +sleep
PHP Manual
PrevNext

sleep

(PHP3 , PHP4 )

sleep -- Delay execution

Description

void sleep (int seconds)

The sleep function delays program execution for the given number + of seconds. +

See also usleep(). +


PrevHomeNext
show_sourceUpuniqid
\ No newline at end of file diff --git a/function.snmp-get-quick-print.html b/function.snmp-get-quick-print.html new file mode 100644 index 0000000..c963ff2 --- /dev/null +++ b/function.snmp-get-quick-print.html @@ -0,0 +1,225 @@ +snmp_get_quick_print
PHP Manual
PrevNext

snmp_get_quick_print

(PHP3 >= 3.0.8, PHP4 >= 4.0b2)

snmp_get_quick_print -- Fetch the current value of the UCD library's quick_print setting +

Description

boolean snmp_get_quick_print (void )

Returns the current value stored in the UCD Library for quick_print. + quick_print is off by default. + +

 
+$quickprint = snmp_get_quick_print();
+      

Above function call would return false if + quick_print is on, and true if quick_print + is on.

snmp_get_quick_print() is only available when using + the UCD SNMP library. This function is not available when using the + Windows SNMP library.

See: snmp_set_quick_print() for a full description + of what quick_print does.


PrevHomeNext
snmpwalkoidUpsnmp_set_quick_print
\ No newline at end of file diff --git a/function.snmp-set-quick-print.html b/function.snmp-set-quick-print.html new file mode 100644 index 0000000..099cc84 --- /dev/null +++ b/function.snmp-set-quick-print.html @@ -0,0 +1,228 @@ +snmp_set_quick_print
PHP Manual
PrevNext

snmp_set_quick_print

(PHP3 >= 3.0.8, PHP4 >= 4.0b2)

snmp_set_quick_print -- Set the value of quick_print within the UCD SNMP library. +

Description

void snmp_set_quick_print (boolean quick_print)

Sets the value of quick_print within the UCD SNMP library. When this + is set (1), the SNMP library will return 'quick printed' values. This + means that just the value will be printed. When quick_print is not + enabled (default) the UCD SNMP library prints extra information + including the type of the value (i.e. IpAddress or OID). Additionally, + if quick_print is not enabled, the library prints additional hex values + for all strings of three characters or less.

Setting quick_print is often used when using the information returned + rather then displaying it. + +

 
+snmp_set_quick_print(0);
+$a = snmpget("127.0.0.1", "public", ".1.3.6.1.2.1.2.2.1.9.1");
+echo "$a<BR>\n";
+snmp_set_quick_print(1);
+$a = snmpget("127.0.0.1", "public", ".1.3.6.1.2.1.2.2.1.9.1");
+echo "$a<BR>\n";
+      

The first value printed might be: 'Timeticks: (0) 0:00:00.00', whereas + with quick_print enabled, just '0:00:00.00' would be printed.

By default the UCD SNMP library returns verbose values, quick_print is + used to return only the value.

Currently strings are still returned with extra quotes, this will be + corrected in a later release.

snmp_set_quick_print() is only available when using + the UCD SNMP library. This function is not available when using + the Windows SNMP library.


PrevHomeNext
snmp_get_quick_printUpSocket functions
\ No newline at end of file diff --git a/function.snmpget.html b/function.snmpget.html new file mode 100644 index 0000000..4020e93 --- /dev/null +++ b/function.snmpget.html @@ -0,0 +1,221 @@ +snmpget
PHP Manual
PrevNext

snmpget

(PHP3 , PHP4 )

snmpget -- Fetch an SNMP object

Description

string snmpget (string hostname, string community, string object_id [, int timeout [, int retries]])

Returns SNMP object value on success and false on error.

The snmpget() function is used to read the + value of an SNMP object specified by the + object_id. SNMP agent is specified by the + hostname and the read community is + specified by the community parameter.


$syscontact = snmpget("127.0.0.1", "public", "system.SysContact.0");
+      

+


PrevHomeNext
SNMP functionsUpsnmpset
\ No newline at end of file diff --git a/function.snmpset.html b/function.snmpset.html new file mode 100644 index 0000000..e8ee047 --- /dev/null +++ b/function.snmpset.html @@ -0,0 +1,196 @@ +snmpset
PHP Manual
PrevNext

snmpset

(PHP3 >= 3.0.12, PHP4 >= 4.0b2)

snmpset -- Set an SNMP object

Description

bool snmpset (string hostname, string community, string object_id, string type, mixed value [, int timeout [, int retries]])

Sets the specified SNMP object value, returning true on success + and false on error.

The snmpset() function is used + to set the value of an SNMP object specified by the + object_id. SNMP agent is specified by the + hostname and the read community is specified + by the community parameter.


PrevHomeNext
snmpgetUpsnmpwalk
\ No newline at end of file diff --git a/function.snmpwalk.html b/function.snmpwalk.html new file mode 100644 index 0000000..637ed78 --- /dev/null +++ b/function.snmpwalk.html @@ -0,0 +1,271 @@ +snmpwalk
PHP Manual
PrevNext

snmpwalk

(PHP3 , PHP4 )

snmpwalk -- Fetch all the SNMP objects from an agent

Description

array snmpwalk (string hostname, string community, string object_id [, int timeout [, int retries]])

Returns an array of SNMP object values starting from the + object_id() as root and false on error.

+ snmpwalk() function is used to read all the + values from an SNMP agent specified by the + hostname. Community + specifies the read community for that agent. A null + object_id is taken as the root of the SNMP + objects tree and all objects under that tree are returned as an + array. If object_id is specified, all the + SNMP objects below that object_id are + returned. + +

 
+$a = snmpwalk("127.0.0.1", "public", ""); 
+      

Above function call would return all the SNMP objects from the + SNMP agent running on localhost. One can step through the values + with a loop + +


for ($i=0; $i<count($a); $i++) {
+    echo $a[$i];
+}
+      


PrevHomeNext
snmpsetUpsnmpwalkoid
\ No newline at end of file diff --git a/function.snmpwalkoid.html b/function.snmpwalkoid.html new file mode 100644 index 0000000..ab54fb1 --- /dev/null +++ b/function.snmpwalkoid.html @@ -0,0 +1,282 @@ +snmpwalkoid
PHP Manual
PrevNext

snmpwalkoid

(PHP3 >= 3.0.8, PHP4 >= 4.0b2)

snmpwalkoid -- Query for a tree of information about a network entity +

Description

array snmpwalkoid (string hostname, string community, string object_id [, int timeout [, int retries]])

Returns an associative array with object ids and their respective + object value starting from the object_id + as root and false on error.

snmpwalkoid() function is used to read all + object ids and their respective values from an SNMP agent + specified by the hostname. Community specifies the read + community for that agent. A null + object_id is taken as the root of the SNMP + objects tree and all objects under that tree are returned as an + array. If object_id is specified, all the + SNMP objects below that object_id are + returned.

The existence of snmpwalkoid() and + snmpwalk() has historical reasons. Both + functions are provided for backward compatibility. + +

 
+$a = snmpwalkoid("127.0.0.1", "public", ""); 
+      

Above function call would return all the SNMP objects from the + SNMP agent running on localhost. One can step through the values + with a loop + +


for (reset($a); $i = key($a); next($a)) {
+    echo "$i: $a[$i]<br>\n";
+}
+      


PrevHomeNext
snmpwalkUpsnmp_get_quick_print
\ No newline at end of file diff --git a/function.socket-get-status.html b/function.socket-get-status.html new file mode 100644 index 0000000..61b636e --- /dev/null +++ b/function.socket-get-status.html @@ -0,0 +1,260 @@ +socket_get_status
PHP Manual
PrevNext

socket_get_status

(PHP4 >= 4.0b4)

socket_get_status --  + Returns information about existing socket resource +

Description

array socket_get_status (resource + socket_get_status)

Returns information about an existing socket resource. Currently + returns four entries in the result array: +

  • timed_out (bool) - The socket timed out + waiting for data +

  • blocked (bool) - The socket was blocked +

  • eof (bool) - Indicates EOF event +

  • unread_bytes (int) - Number of bytes + left in the socket buffer +

See also + accept_connect(), + bind(), + connect(), + listen(), and + strerror(). +


PrevHomeNext
pfsockopenUpsocket_set_blocking
\ No newline at end of file diff --git a/function.socket-set-timeout.html b/function.socket-set-timeout.html new file mode 100644 index 0000000..45bd9df --- /dev/null +++ b/function.socket-set-timeout.html @@ -0,0 +1,262 @@ +socket_set_timeout
PHP Manual
PrevNext

socket_set_timeout

(PHP4 >= 4.0b4)

socket_set_timeout -- Set timeout period on a socket

Description

bool socket_set_timeout (int socket descriptor, int seconds, int microseconds)

Sets the timeout value on socket descriptor, + expressed in the sum of seconds and + microseconds. +

Example 1. socket_set_timeout() Example


<?php
+$fp = fsockopen("http://www.php.net", 80);
+if(!$fp) {
+    echo "Unable to open\n";
+} else {
+    fputs($fp,"GET / HTTP/1.0\n\n");
+    $start = time();
+    socket_set_timeout($fp, 2);
+    $res = fread($fp, 2000);
+    var_dump(socket_get_status($fp));
+    fclose($fp);
+    print $res;
+}
+?>
+      
+

This function was previously called as + set_socket_timeout() but this usage is deprecated. +

See also: fsockopen() and fopen(). +


PrevHomeNext
socket_set_blockingUpsyslog
\ No newline at end of file diff --git a/function.socket.html b/function.socket.html new file mode 100644 index 0000000..4fd3fbc --- /dev/null +++ b/function.socket.html @@ -0,0 +1,293 @@ +socket
PHP Manual
PrevNext

socket

(PHP4 >= 4.0.2)

socket -- Create a socket (endpoint for communication)

Description

int socket (int domain, int type, int protocol)

Creates a communication endpoint (a socket), and returns a + descriptor to the socket. +

The domain parameter sets the + domain. Currently, AF_INET and + AF_UNIX are understood. +

The type parameter selects the socket + type. This is one of SOCK_STREAM, + SOCK_DGRAM, + SOCK_SEQPACKET, + SOCK_RAW, SOCK_RDM, or + SOCK_PACKET. +

protocol sets the protocol. +

Returns a valid socket descriptor on success, or a negative error + code on failure. This code may be passed to + strerror() to get a textual explanation of the + error. +

For more information on the usage of socket(), + as well as on the meanings of the various parameters, see the + Unix man page socket (2). +

See also + accept_connect(), + bind(), + connect(), + listen(), + strerror(), and + socket_get_status(). +


PrevHomeNext
listenUpstrerror
\ No newline at end of file diff --git a/function.solid-close.html b/function.solid-close.html new file mode 100644 index 0000000..175110f --- /dev/null +++ b/function.solid-close.html @@ -0,0 +1,152 @@ +solid_close
PHP Manual
PrevNext

solid_close

solid_close -- close a Solid connection

Description

See odbc_close().


PrevHomeNext
Solid functionsUpsolid_connect
\ No newline at end of file diff --git a/function.solid-connect.html b/function.solid-connect.html new file mode 100644 index 0000000..f70a6e2 --- /dev/null +++ b/function.solid-connect.html @@ -0,0 +1,152 @@ +solid_connect
PHP Manual
PrevNext

solid_connect

solid_connect -- connect to a Solid data source

Description

See odbc_connect().


PrevHomeNext
solid_closeUpsolid_exec
\ No newline at end of file diff --git a/function.solid-exec.html b/function.solid-exec.html new file mode 100644 index 0000000..1051f03 --- /dev/null +++ b/function.solid-exec.html @@ -0,0 +1,152 @@ +solid_exec
PHP Manual
PrevNext

solid_exec

solid_exec -- execute a Solid query

Description

See odbc_exec().


PrevHomeNext
solid_connectUpsolid_fetchrow
\ No newline at end of file diff --git a/function.solid-fetchrow.html b/function.solid-fetchrow.html new file mode 100644 index 0000000..b6e4732 --- /dev/null +++ b/function.solid-fetchrow.html @@ -0,0 +1,152 @@ +solid_fetchrow
PHP Manual
PrevNext

solid_fetchrow

solid_fetchrow -- fetch row of data from Solid query

Descriptio

See odbc_fetch_row()


PrevHomeNext
solid_execUpsolid_fieldname
\ No newline at end of file diff --git a/function.solid-fieldname.html b/function.solid-fieldname.html new file mode 100644 index 0000000..fef29c4 --- /dev/null +++ b/function.solid-fieldname.html @@ -0,0 +1,152 @@ +solid_fieldname
PHP Manual
PrevNext

solid_fieldname

solid_fieldname -- get name of column from Solid query

Description

See odbc_field_name().


PrevHomeNext
solid_fetchrowUpsolid_fieldnum
\ No newline at end of file diff --git a/function.solid-fieldnum.html b/function.solid-fieldnum.html new file mode 100644 index 0000000..4924f8f --- /dev/null +++ b/function.solid-fieldnum.html @@ -0,0 +1,149 @@ +solid_fieldnum
PHP Manual
PrevNext

solid_fieldnum

solid_fieldnum -- get index of column from Solid query

Description

See odbc_field_num().


PrevHomeNext
solid_fieldnameUpsolid_freeresult
\ No newline at end of file diff --git a/function.solid-freeresult.html b/function.solid-freeresult.html new file mode 100644 index 0000000..179b2fc --- /dev/null +++ b/function.solid-freeresult.html @@ -0,0 +1,152 @@ +solid_freeresult
PHP Manual
PrevNext

solid_freeresult

solid_freeresult -- free result memory from Solid query

Description

See odbc_free_result().


PrevHomeNext
solid_fieldnumUpsolid_numfields
\ No newline at end of file diff --git a/function.solid-numfields.html b/function.solid-numfields.html new file mode 100644 index 0000000..8feba26 --- /dev/null +++ b/function.solid-numfields.html @@ -0,0 +1,152 @@ +solid_numfields
PHP Manual
PrevNext

solid_numfields

solid_numfields -- get number of fields in Solid result

Description

See odbc_num_fields().


PrevHomeNext
solid_freeresultUpsolid_numrows
\ No newline at end of file diff --git a/function.solid-numrows.html b/function.solid-numrows.html new file mode 100644 index 0000000..6c5cdd7 --- /dev/null +++ b/function.solid-numrows.html @@ -0,0 +1,152 @@ +solid_numrows
PHP Manual
PrevNext

solid_numrows

solid_numrows -- get number of rows in Solid result

Description

See odbc_num_rows().


PrevHomeNext
solid_numfieldsUpsolid_result
\ No newline at end of file diff --git a/function.solid-result.html b/function.solid-result.html new file mode 100644 index 0000000..aa3ab17 --- /dev/null +++ b/function.solid-result.html @@ -0,0 +1,152 @@ +solid_result
PHP Manual
PrevNext

solid_result

solid_result -- get data from Solid results

Description

See odbc_result().


PrevHomeNext
solid_numrowsUpString functions
\ No newline at end of file diff --git a/function.sort.html b/function.sort.html new file mode 100644 index 0000000..c8317db --- /dev/null +++ b/function.sort.html @@ -0,0 +1,339 @@ +sort
PHP Manual
PrevNext

sort

(PHP3 , PHP4 )

sort -- Sort an array

Description

void sort (array array [, int sort_flags])

This function sorts an array. Elements will be arranged from + lowest to highest when this function has completed. +

Example 1. Sort() example


<?php
+
+$fruits = array ("lemon", "orange", "banana", "apple");
+sort ($fruits);
+reset ($fruits);
+while (list ($key, $val) = each ($fruits)) {
+    echo "fruits[".$key."] = ".$val; 
+}
+ 
+?>
+      
+

This example would display: +


fruits[0] = apple
+fruits[1] = banana
+fruits[2] = lemon
+fruits[3] = orange
+      

+

The fruits have been sorted in alphabetical order. +

The optional second parameter sort_flags + may be used to modify the sorting behavior using theese valies: +

Sorting type flags: +

  • SORT_REGULAR - compare items normally

  • SORT_NUMERIC - compare items numerically

  • SORT_STRING - compare items as strings

+

See also: arsort(), + asort(), ksort(), + natsort(), natcasesort(), + rsort(), usort() + and uksort(). +


PrevHomeNext
sizeofUpuasort
\ No newline at end of file diff --git a/function.soundex.html b/function.soundex.html new file mode 100644 index 0000000..4bae3f9 --- /dev/null +++ b/function.soundex.html @@ -0,0 +1,230 @@ +soundex
PHP Manual
PrevNext

soundex

(PHP3 , PHP4 )

soundex -- Calculate the soundex key of a string

Description

string soundex (string str)

Calculates the soundex key of str. +

Soundex keys have the property that words pronounced similarly + produce the same soundex key, and can thus be used to simplify + searches in databases where you know the pronunciation but not + the spelling. This soundex function returns a string 4 characters + long, starting with a letter. +

This particular soundex function is one described by Donald Knuth + in "The Art Of Computer Programming, vol. 3: Sorting And + Searching", Addison-Wesley (1973), pp. 391-392. +

Example 1. Soundex Examples


soundex ("Euler") == soundex ("Ellery") == 'E460';
+soundex ("Gauss") == soundex ("Ghosh") == 'G200';
+soundex ("Knuth") == soundex ("Kant") == 'H416';
+soundex ("Lloyd") == soundex ("Ladd") == 'L300';
+soundex ("Lukasiewicz") == soundex ("Lissajous") == 'L222';
+      
+


PrevHomeNext
similar_textUpsprintf
\ No newline at end of file diff --git a/function.split.html b/function.split.html new file mode 100644 index 0000000..f8df786 --- /dev/null +++ b/function.split.html @@ -0,0 +1,381 @@ +split
PHP Manual
PrevNext

split

(PHP3 , PHP4 )

split -- split string into array by regular expression

Description

array split (string pattern, string string [, int + limit])

Returns an array of strings, each of which is a substring of + string formed by splitting it on + boundaries formed by the regular expression + pattern. If limit + is set, the returned array will contain a maximum of + limit elements with the last element + containing the whole rest of string. If + an error occurs, split() returns false. +

To get the first five fields from a line from + /etc/passwd: +

Example 1. Split() Example


$passwd_list = split (":", $passwd_line, 5);
+      
+

To parse a date which may be delimited with slashes, dots, or + hyphens: +

Example 2. Split() Example


$date = "04/30/1973";  // Delimiters may be slash, dot, or hyphen
+list ($month, $day, $year) = split ('[/.-]', $date);
+echo "Month: $month; Day: $day; Year: $year<br>\n";
+      
+

Note that pattern is case-sensitive. +

Note that if you don't require the power of regular expressions, + it is faster to use explode(), which doesn't + incur the overhead of the regular expression engine. +

For users looking for a way to emulate perl's $chars = + split('', $str) behaviour, please see the examples for + preg_split(). +

Please note that pattern is a regular + expression. If you want to split on any of the characters which + are considered special by regular expressions, you'll need to + escape them first. If you think split() (or + any other regex function, for that matter) is doing something + weird, please read the file regex.7, + included in the regex/ subdirectory of the + PHP distribution. It's in manpage format, so you'll want to do + something along the lines of man + /usr/local/src/regex/regex.7 in order to read it. +

See also: spliti(), + explode(), and implode(). +


PrevHomeNext
eregi_replaceUpspliti
\ No newline at end of file diff --git a/function.spliti.html b/function.spliti.html new file mode 100644 index 0000000..0f8f5f6 --- /dev/null +++ b/function.spliti.html @@ -0,0 +1,205 @@ +spliti
PHP Manual
PrevNext

spliti

(PHP4 >= 4.0.1)

spliti --  + Split string into array by regular expression case insensitive +

Description

array split (string pattern, string string [, int + limit])

This function is identical to split() except + that this ignores case distinction when matching alphabetic + characters. +

See also: split(), + explode(), and implode(). +


PrevHomeNext
splitUpsql_regcase
\ No newline at end of file diff --git a/function.sprintf.html b/function.sprintf.html new file mode 100644 index 0000000..eb5f9d9 --- /dev/null +++ b/function.sprintf.html @@ -0,0 +1,500 @@ +sprintf
PHP Manual
PrevNext

sprintf

(PHP3 , PHP4 )

sprintf -- Return a formatted string

Description

string sprintf (string format [, mixed + args...])

Returns a string produced according to the formatting string + format. +

The format string is composed of zero or more directives: + ordinary characters (excluding %) that are + copied directly to the result, and conversion + specifications, each of which results in fetching its + own parameter. This applies to both sprintf() + and printf(). +

Each conversion specification consists of a percent sign + (%), followed by one or more of these + elements, in order: +

  1. An optional padding specifier that says + what character will be used for padding the results to the + right string size. This may be a space character or a + 0 (zero character). The default is to pad + with spaces. An alternate padding character can be specified + by prefixing it with a single quote ('). + See the examples below. +

  2. An optional alignment specifier that says + if the result should be left-justified or right-justified. + The default is right-justified; a - + character here will make it left-justified. +

  3. An optional number, a width specifier + that says how many characters (minimum) this conversion should + result in. +

  4. An optional precision specifier that says + how many decimal digits should be displayed for floating-point + numbers. This option has no effect for other types than + double. (Another function useful for formatting numbers is + number_format().) +

  5. A type specifier that says what type the + argument data should be treated as. Possible types: +

    % - a literal percent character. No + argument is required. +
    b - the argument is treated as an + integer, and presented as a binary number. +
    c - the argument is treated as an + integer, and presented as the character with that ASCII + value. +
    d - the argument is treated as an + integer, and presented as a decimal number. +
    f - the argument is treated as a double, + and presented as a floating-point number. +
    o - the argument is treated as an + integer, and presented as an octal number. +
    s - the argument is treated as and + presented as a string. +
    x - the argument is treated as an integer + and presented as a hexadecimal number (with lowercase + letters). +
    X - the argument is treated as an integer + and presented as a hexadecimal number (with uppercase + letters). +

    +

+

See also: printf(), sscanf(), + fscanf(), and number_format(). +

Examples

Example 1. Sprintf(): zero-padded integers


$isodate = sprintf ("%04d-%02d-%02d", $year, $month, $day);
+      
+

Example 2. Sprintf(): formatting currency


$money1 = 68.75;
+$money2 = 54.35;
+$money = $money1 + $money2;
+// echo $money will output "123.1";
+$formatted = sprintf ("%01.2f", $money);
+// echo $formatted will output "123.10"
+      
+


PrevHomeNext
soundexUpstrcasecmp
\ No newline at end of file diff --git a/function.sql-regcase.html b/function.sql-regcase.html new file mode 100644 index 0000000..60c4dec --- /dev/null +++ b/function.sql-regcase.html @@ -0,0 +1,244 @@ +sql_regcase
PHP Manual
PrevNext

sql_regcase

(PHP3 , PHP4 )

sql_regcase --  + Make regular expression for case insensitive match +

Description

string sql_regcase (string string)

Returns a valid regular expression which will match + string, ignoring case. This expression is + string with each character converted to a + bracket expression; this bracket expression contains that + character's uppercase and lowercase form if applicable, otherwise + it contains the original character twice. +

Example 1. Sql_regcase() Example


echo sql_regcase ("Foo bar");
+      
+ prints
[Ff][Oo][Oo][  ][Bb][Aa][Rr]
. +

This can be used to achieve case insensitive pattern matching in + products which support only case sensitive regular expressions. +


PrevHomeNext
splitiUpSatellite CORBA client extension
\ No newline at end of file diff --git a/function.sqrt.html b/function.sqrt.html new file mode 100644 index 0000000..fac5306 --- /dev/null +++ b/function.sqrt.html @@ -0,0 +1,177 @@ +sqrt
PHP Manual
PrevNext

sqrt

(PHP3 , PHP4 )

sqrt -- Square root

Description

float sqrt (float arg)

Returns the square root of arg. +


PrevHomeNext
sinUpsrand
\ No newline at end of file diff --git a/function.srand.html b/function.srand.html new file mode 100644 index 0000000..41baeae --- /dev/null +++ b/function.srand.html @@ -0,0 +1,240 @@ +srand
PHP Manual
PrevNext

srand

(PHP3 , PHP4 )

srand -- Seed the random number generator

Description

void srand (int seed)

Seeds the random number generator with + seed. +


// seed with microseconds since last "whole" second
+srand ((double) microtime() * 1000000);
+$randval = rand();
+      

+

See also rand(), + getrandmax(), mt_rand(), + mt_srand(), and + mt_getrandmax(). +


PrevHomeNext
sqrtUptan
\ No newline at end of file diff --git a/function.sscanf.html b/function.sscanf.html new file mode 100644 index 0000000..2ffa861 --- /dev/null +++ b/function.sscanf.html @@ -0,0 +1,310 @@ +sscanf
PHP Manual
PrevNext

sscanf

(PHP4 >= 4.0.1)

sscanf -- Parses input from a string according to a format

Description

mixed sscanf (string str, string format [, string + var1...])

The function sscanf() is the input analog of + printf(). Sscanf() reads from + the string str and interprets it according to + the specified format. If only two parameters were + passed to this function, the values parsed will be returned as an array. +

Example 1. Sscanf() Example


// getting the serial number
+$serial = sscanf("SN/2350001","SN/%d");
+// and the date of manufacturing
+$mandate = "January 01 2000";
+list($month, $day, $year) = sscanf($mandate,"%s %d %d");
+echo "Item $serial was manufactured on: $year-".substr($month,0,3)."-$day\n";
+	 
+ If optional parameters are passed, the function will return the number of + assigned values. The optional parameters must be passed by reference. +

Example 2. Sscanf() - using optional parameters


// get author info and generate DocBook entry
+$auth = "24\tLewis Carroll";
+$n = sscanf($auth,"%d\t%s %s", &$id, &$first, &$last);
+echo "<author id='$id'>
+	<firstname>$first</firstname>
+	<surname>$last</surname>
+</author>\n";
+	 
+

See also: fscanf(), printf(), + and sprintf(). +


PrevHomeNext
rtrimUpsetlocale
\ No newline at end of file diff --git a/function.stat.html b/function.stat.html new file mode 100644 index 0000000..643e444 --- /dev/null +++ b/function.stat.html @@ -0,0 +1,244 @@ +stat
PHP Manual
PrevNext

stat

(PHP3 , PHP4 )

stat -- Gives information about a file

Description

array stat (string filename)

Gathers the statistics of the file named by filename.

Returns an array with the statistics of the file with the + following elements: +

  1. device

  2. inode

  3. inode protection mode

  4. number of links

  5. user id of owner

  6. group id owner

  7. device type if inode device *

  8. size in bytes

  9. time of last access

  10. time of last modification

  11. time of last change

  12. blocksize for filesystem I/O *

  13. number of blocks allocated

+ * - only valid on systems supporting the st_blksize type--other + systems (i.e. Windows) return -1

The results of this function are cached. See + clearstatcache() for more details. +


PrevHomeNext
rmdirUplstat
\ No newline at end of file diff --git a/function.str-pad.html b/function.str-pad.html new file mode 100644 index 0000000..945c4a6 --- /dev/null +++ b/function.str-pad.html @@ -0,0 +1,269 @@ +str_pad
PHP Manual
PrevNext

str_pad

(PHP4 >= 4.0.1)

str_pad -- Pad a string to a certain length with another string

Description

string str_pad (string input, int pad_length [, string + pad_string [, int + pad_type]])

This functions pads the input string on + the left, the right, or both sides to the specifed padding + length. If the optional argument + pad_string is not supplied, the + input is padded with spaces, otherwise it + is padded with characters from pad_string + up to the limit. +

Optional argument pad_type can be + STR_PAD_RIGHT, STR_PAD_LEFT, or STR_PAD_BOTH. If + pad_type is not specified it is assumed to + be STR_PAD_RIGHT. +

If the value of pad_length is negative or + less than the length of the input string, no padding takes + place. +

Example 1. str_pad() example


$input = "Alien";
+print str_pad($input, 10);                      // produces "Alien     "
+print str_pad($input, 10, "-=", STR_PAD_LEFT);  // produces "-=-=-Alien"
+print str_pad($input, 10, "_", STR_PAD_BOTH);   // produces "__Alien___"
+      
+


PrevHomeNext
strncmpUpstrpos
\ No newline at end of file diff --git a/function.str-repeat.html b/function.str-repeat.html new file mode 100644 index 0000000..f2182d7 --- /dev/null +++ b/function.str-repeat.html @@ -0,0 +1,241 @@ +str_repeat
PHP Manual
PrevNext

str_repeat

(PHP4 >= 4.0b4)

str_repeat -- Repeat a string

Description

string str_repeat (string input, int multiplier)

Returns input_str repeated + multiplier times. + multiplier has to be greater than 0. +

Example 1. Str_repeat() example


echo str_repeat ("-=", 10);
+     

This will output "-=-=-=-=-=-=-=-=-=-=". +

Note: + This function was added in PHP 4.0. +


PrevHomeNext
strrchrUpstrrev
\ No newline at end of file diff --git a/function.str-replace.html b/function.str-replace.html new file mode 100644 index 0000000..d42d807 --- /dev/null +++ b/function.str-replace.html @@ -0,0 +1,273 @@ +str_replace
PHP Manual
PrevNext

str_replace

(PHP3 >= 3.0.6, PHP4 )

str_replace --  + Replace all occurrences of needle in haystack with str +

Description

string str_replace (string needle, string str, string haystack)

This function replaces all occurences of + needle in haystack + with the given str. If you don't need + fancy replacing rules, you should always use this function + instead of ereg_replace().

Example 1. Str_replace() example


$bodytag = str_replace ("%body%", "black", "<body text=%body%>");
+      
+

This function is binary safe. +

Note: + Str_replace() was added in PHP 3.0.6, but was + buggy up until PHP 3.0.8. +

See also ereg_replace() and + strtr(). +


PrevHomeNext
strtoupperUpstrtr
\ No newline at end of file diff --git a/function.strcasecmp.html b/function.strcasecmp.html new file mode 100644 index 0000000..995bd1f --- /dev/null +++ b/function.strcasecmp.html @@ -0,0 +1,274 @@ +strcasecmp
PHP Manual
PrevNext

strcasecmp

(PHP3 >= 3.0.2, PHP4 )

strcasecmp --  + Binary safe case-insensitive string comparison +

Description

int strcasecmp (string str1, string str2)

Returns < 0 if str1 is less than + str2; > 0 if str1 + is greater than str2, and 0 if they are + equal. +

Example 1. strcasecmp() example


$var1 = "Hello";
+$var2 = "hello";
+if (!strcasecmp ($var1, $var2)) {
+    echo '$var1 is equal to $var2 in a case-insensitive string comparison';
+}
+      
+

See also ereg(), strcmp(), + substr(), stristr(), and + strstr(). +


PrevHomeNext
sprintfUpstrchr
\ No newline at end of file diff --git a/function.strchr.html b/function.strchr.html new file mode 100644 index 0000000..8438cf0 --- /dev/null +++ b/function.strchr.html @@ -0,0 +1,181 @@ +strchr
PHP Manual
PrevNext

strchr

(PHP3 , PHP4 )

strchr --  + Find the first occurrence of a character +

Description

string strchr (string haystack, string needle)

This function is an alias for strstr(), and is + identical in every way. +


PrevHomeNext
strcasecmpUpstrcmp
\ No newline at end of file diff --git a/function.strcmp.html b/function.strcmp.html new file mode 100644 index 0000000..1597621 --- /dev/null +++ b/function.strcmp.html @@ -0,0 +1,240 @@ +strcmp
PHP Manual
PrevNext

strcmp

(PHP3 , PHP4 )

strcmp -- Binary safe string comparison

Description

int strcmp (string str1, string str2)

Returns < 0 if str1 is less than + str2; > 0 if str1 + is greater than str2, and 0 if they are + equal. +

Note that this comparison is case sensitive. +

See also ereg(), + strcasecmp(), substr(), + stristr(), strncmp(), + and strstr(). +


PrevHomeNext
strchrUpstrcspn
\ No newline at end of file diff --git a/function.strcspn.html b/function.strcspn.html new file mode 100644 index 0000000..9c9508a --- /dev/null +++ b/function.strcspn.html @@ -0,0 +1,198 @@ +strcspn
PHP Manual
PrevNext

strcspn

(PHP3 >= 3.0.3, PHP4 )

strcspn --  + Find length of initial segment not matching mask +

Description

int strcspn (string str1, string str2)

Returns the length of the initial segment of + str1 which does not + contain any of the characters in str2. +

See also strspn(). +


PrevHomeNext
strcmpUpstrip_tags
\ No newline at end of file diff --git a/function.strerror.html b/function.strerror.html new file mode 100644 index 0000000..65f7349 --- /dev/null +++ b/function.strerror.html @@ -0,0 +1,301 @@ +strerror
PHP Manual
PrevNext

strerror

(PHP4 >= 4.0.2)

strerror -- Return a string describing a socket error

Description

string strerror (int errno)

strerror() takes as its + errno parameter the return value of one of + the socket functions, and returns the corresponding explanatory + text. This makes it a bit more pleasant to figure out why + something didn't work; for instance, instead of having to track + down a system include file to find out what '-111' means, you + just pass it to strerror(), and it tells you + what happened. +

Example 1. strerror() example


<?php
+if (($socket = socket (AF_INET, SOCK_STREAM, 0)) < 0) {
+   echo "socket() failed: reason: " . strerror ($socket) . "\n";
+} 
+
+if (($ret = bind ($socket, '127.0.0.1', 80)) < 0) {
+   echo "bind() failed: reason: " . strerror ($ret) . "\n";
+}
+?>
+      

The expected output from the above example (assuming the script + is not run with root privileges): +

        bind() failed: reason: Permission denied
+       
+

+

See also + accept_connect(), + bind(), + connect(), + listen(), + socket(), and + socket_get_status(). +


PrevHomeNext
socketUpString functions
\ No newline at end of file diff --git a/function.strftime.html b/function.strftime.html new file mode 100644 index 0000000..4559323 --- /dev/null +++ b/function.strftime.html @@ -0,0 +1,453 @@ +strftime
PHP Manual
PrevNext

strftime

(PHP3 , PHP4 )

strftime --  + Format a local time/date according to locale settings +

Description

string strftime (string format [, int + timestamp])

Returns a string formatted according to the given format string + using the given timestamp or the current + local time if no timestamp is given. Month and weekday names and + other language dependent strings respect the current locale set + with setlocale(). +

The following conversion specifiers are recognized in the format + string: +

  • %a - abbreviated weekday name according to the current locale +

  • %A - full weekday name according to the current locale +

  • %b - abbreviated month name according to the current locale +

  • %B - full month name according to the current locale +

  • %c - preferred date and time representation for the current + locale +

  • %C - century number (the year divided by 100 and truncated to + an integer, range 00 to 99) +

  • %d - day of the month as a decimal number (range 00 to 31) +

  • %D - same as %m/%d/%y +

  • %e - day of the month as a decimal number, a single digit is + preceded by a space (range ' 1' to '31') +

  • %h - same as %b +

  • %H - hour as a decimal number using a 24-hour clock (range 00 + to 23) +

  • %I - hour as a decimal number using a 12-hour clock (range 01 + to 12) +

  • %j - day of the year as a decimal number (range 001 to 366) +

  • %m - month as a decimal number (range 01 to 12) +

  • %M - minute as a decimal number +

  • %n - newline character +

  • %p - either `am' or `pm' according to the given time value, or + the corresponding strings for the current locale +

  • %r - time in a.m. and p.m. notation +

  • %R - time in 24 hour notation +

  • %S - second as a decimal number +

  • %t - tab character +

  • %T - current time, equal to %H:%M:%S +

  • %u - weekday as a decimal number [1,7], with 1 representing + Monday +

  • %U - week number of the current year as a decimal number, + starting with the first Sunday as the first day of the first + week +

  • + %V - The ISO 8601:1988 week number of the current year as a + decimal number, range 01 to 53, where week 1 is the first + week that has at least 4 days in the current year, and with + Monday as the first day of the week. +

  • %W - week number of the current year as a decimal number, + starting with the first Monday as the first day of the first + week +

  • %w - day of the week as a decimal, Sunday being 0 +

  • %x - preferred date representation for the current locale + without the time +

  • %X - preferred time representation for the current locale + without the date +

  • %y - year as a decimal number without a century (range 00 to + 99) +

  • %Y - year as a decimal number including the century +

  • %Z - time zone or name or abbreviation +

  • %% - a literal `%' character +

+

Example 1. Strftime() example


setlocale ("LC_TIME", "C");
+print (strftime ("%A in Finnish is "));
+setlocale ("LC_TIME", "fi_FI");
+print (strftime ("%A, in French "));
+setlocale ("LC_TIME", "fr_CA");
+print (strftime ("%A and in German "));
+setlocale ("LC_TIME", "de_DE");
+print (strftime ("%A.\n"));
+      
+ This example works if you have the respective locales installed + in your system. +

See also setlocale() and + mktime() and the Open Group specification of + strftime(). +


PrevHomeNext
mktimeUptime
\ No newline at end of file diff --git a/function.strip-tags.html b/function.strip-tags.html new file mode 100644 index 0000000..4cbce87 --- /dev/null +++ b/function.strip-tags.html @@ -0,0 +1,205 @@ +strip_tags
PHP Manual
PrevNext

strip_tags

(PHP3 >= 3.0.8, PHP4 >= 4.0b2)

strip_tags -- Strip HTML and PHP tags from a string

Description

string strip_tags (string str [, string + allowable_tags])

This function tries to strip all HTML and PHP tags from the given + string. It errors on the side of caution in case of incomplete + or bogus tags. It uses the same tag stripping state machine as + the fgetss() function. +

You can use the optional second parameter to specify tags which + should not be stripped. +

Note: + Allowable_tags was added in PHP 3.0.13, + PHP4B3. +

+


PrevHomeNext
strcspnUpstripcslashes
\ No newline at end of file diff --git a/function.stripcslashes.html b/function.stripcslashes.html new file mode 100644 index 0000000..f7b76ff --- /dev/null +++ b/function.stripcslashes.html @@ -0,0 +1,210 @@ +stripcslashes
PHP Manual
PrevNext

stripcslashes

(PHP4 >= 4.0b4)

stripcslashes --  + Un-quote string quoted with addcslashes() +

Description

string stripcslashes (string str)

Returns a string with backslashes stripped off. Recognizes + C-like \n, \r ..., octal + and hexadecimal representation. +

Note: + Added in PHP4b3-dev. +

+

See also addcslashes(). +


PrevHomeNext
strip_tagsUpstripslashes
\ No newline at end of file diff --git a/function.stripslashes.html b/function.stripslashes.html new file mode 100644 index 0000000..2a4d17e --- /dev/null +++ b/function.stripslashes.html @@ -0,0 +1,197 @@ +stripslashes
PHP Manual
PrevNext

stripslashes

(PHP3 , PHP4 )

stripslashes --  + Un-quote string quoted with addslashes() +

Description

string stripslashes (string str)

Returns a string with backslashes stripped off. + (\' becomes ' and so on.) + Double backslashes are made into a single backslash. +

See also addslashes(). +


PrevHomeNext
stripcslashesUpstristr
\ No newline at end of file diff --git a/function.stristr.html b/function.stristr.html new file mode 100644 index 0000000..bc69909 --- /dev/null +++ b/function.stristr.html @@ -0,0 +1,249 @@ +stristr
PHP Manual
PrevNext

stristr

(PHP3 >= 3.0.6, PHP4 )

stristr --  + Case-insensitive strstr() +

Description

string stristr (string haystack, string needle)

Returns all of haystack from the first + occurrence of needle to the end. + needle and haystack + are examined in a case-insensitive manner. +

If needle is not found, returns false. +

If needle is not a string, it is converted + to an integer and applied as the ordinal value of a character. +

See also strchr(), + strrchr(), substr(), and + ereg(). +


PrevHomeNext
stripslashesUpstrlen
\ No newline at end of file diff --git a/function.strlen.html b/function.strlen.html new file mode 100644 index 0000000..0221dce --- /dev/null +++ b/function.strlen.html @@ -0,0 +1,177 @@ +strlen
PHP Manual
PrevNext

strlen

(PHP3 , PHP4 )

strlen -- Get string length

Description

int strlen (string str)

Returns the length of string. +


PrevHomeNext
stristrUpstrnatcmp
\ No newline at end of file diff --git a/function.strnatcasecmp.html b/function.strnatcasecmp.html new file mode 100644 index 0000000..ee35307 --- /dev/null +++ b/function.strnatcasecmp.html @@ -0,0 +1,272 @@ +strnatcasecmp
PHP Manual
PrevNext

strnatcasecmp

(PHP4 >= 4.0RC2)

strnatcasecmp --  + Case insensitive string comparisons using a "natural order" algorithm +

Description

int strnatcasecmp (string str1, string str2)

This function implements a comparison algorithm that orders + alphanumeric strings in the way a human being would. The + behavior of this function is similar to + strnatcmp(), except that the comparison is + not case sensitive. For more infomation see: Martin Pool's + Natural Order String + Comparison page. +

Similar to other string comparison functions, this one returns + < 0 if str1 is less than + str2; > 0 if str1 + is greater than str2, and 0 if they are + equal. +

See also ereg(), + strcasecmp(), substr(), + stristr(), strcmp(), + strncmp(), strnatcmp(), + and strstr(). +


PrevHomeNext
strnatcmpUpstrncmp
\ No newline at end of file diff --git a/function.strnatcmp.html b/function.strnatcmp.html new file mode 100644 index 0000000..0d6ce7a --- /dev/null +++ b/function.strnatcmp.html @@ -0,0 +1,360 @@ +strnatcmp
PHP Manual
PrevNext

strnatcmp

(PHP4 >= 4.0RC2)

strnatcmp --  + String comparisons using a "natural order" algorithm +

Description

int strnatcmp (string str1, string str2)

This function implements a comparison algorithm that orders + alphanumeric strings in the way a human being would, this is + described as a "natural ordering". An example of the difference + between this algorithm and the regular computer string sorting + algorithms (used in strcmp()) can be seen + below: +


$arr1 = $arr2 = array ("img12.png","img10.png","img2.png","img1.png");
+echo "Standard string comparison\n";
+usort($arr1,"strcmp");
+print_r($arr1);
+echo "\nNatural order string comparison\n";
+usort($arr2,"strnatcmp");
+print_r($arr2);
+	  

+ The code above will generate the following output: +


Standard string comparison
+Array
+(
+    [0] => img1.png
+    [1] => img10.png
+    [2] => img12.png
+    [3] => img2.png
+)
+
+Natural order string comparison
+Array
+(
+    [0] => img1.png
+    [1] => img2.png
+    [2] => img10.png
+    [3] => img12.png
+)
+	  

+ For more infomation see: Martin Pool's Natural Order String Comparison + page. +

Similar to other string comparison functions, this one returns + < 0 if str1 is less than + str2; > 0 if str1 + is greater than str2, and 0 if they are + equal. +

Note that this comparison is case sensitive. +

See also ereg(), + strcasecmp(), substr(), + stristr(), strcmp(), + strncmp(), strnatcasecmp(), + strstr(), natsort() and + natcasesort(). +


PrevHomeNext
strlenUpstrnatcasecmp
\ No newline at end of file diff --git a/function.strncmp.html b/function.strncmp.html new file mode 100644 index 0000000..ea30887 --- /dev/null +++ b/function.strncmp.html @@ -0,0 +1,266 @@ +strncmp
PHP Manual
PrevNext

strncmp

(PHP4 >= 4.0b4)

strncmp --  + Binary safe string comparison of the first n characters +

Description

int strncmp (string str1, string str2, int len)

This function is similar to strcmp(), with the + difference that you can specify the (upper limit of the) number of + characters (len) from each string to be + used in the comparison. If any of the strings is shorter than + len, then the length of that string will be + used for the comparison. +

Returns < 0 if str1 is less than + str2; > 0 if str1 + is greater than str2, and 0 if they are + equal. +

Note that this comparison is case sensitive. +

See also ereg(), + strcasecmp(), substr(), + stristr(), strcmp(), + and strstr(). +


PrevHomeNext
strnatcasecmpUpstr_pad
\ No newline at end of file diff --git a/function.strpos.html b/function.strpos.html new file mode 100644 index 0000000..448fe01 --- /dev/null +++ b/function.strpos.html @@ -0,0 +1,323 @@ +strpos
PHP Manual
PrevNext

strpos

(PHP3 , PHP4 )

strpos --  + Find position of first occurrence of a string +

Description

int strpos (string haystack, string needle [, int + offset])

Returns the numeric position of the first occurrence of + needle in the + haystack string. Unlike the + strrpos(), this function can take a full + string as the needle parameter and the + entire string will be used. +

If needle is not found, returns false. +

Note: + It is easy to mistake the return values for "character found at + position 0" and "character not found". Here's how to detect + the difference: +


// in PHP 4.0b3 and newer:
+$pos = strpos ($mystring, "b");
+if ($pos === false) { // note: three equal signs
+    // not found...
+}
+
+// in versions older than 4.0b3:
+$pos = strpos ($mystring, "b");
+if (is_string ($pos) && !$pos) {
+    // not found...
+}
+	

+

+

If needle is not a string, it is converted + to an integer and applied as the ordinal value of a character. +

The optional offset parameter allows you + to specify which character in haystack to + start searching. The position returned is still relative to the + the beginning of haystack. +

See also strrpos(), + strrchr(), substr(), + stristr(), and strstr(). +


PrevHomeNext
str_padUpstrrchr
\ No newline at end of file diff --git a/function.strrchr.html b/function.strrchr.html new file mode 100644 index 0000000..9cdcc51 --- /dev/null +++ b/function.strrchr.html @@ -0,0 +1,283 @@ +strrchr
PHP Manual
PrevNext

strrchr

(PHP3 , PHP4 )

strrchr --  + Find the last occurrence of a character in a string +

Description

string strrchr (string haystack, string needle)

This function returns the portion of + haystack which starts at the last + occurrence of needle and goes until the + end of haystack. +

Returns false if needle is not found. +

If needle contains more than one + character, the first is used. +

If needle is not a string, it is converted + to an integer and applied as the ordinal value of a character. +

Example 1. Strrchr() example


// get last directory in $PATH
+$dir = substr (strrchr ($PATH, ":"), 1);
+
+// get everything after last newline
+$text = "Line 1\nLine 2\nLine 3";
+$last = substr (strrchr ($text, 10), 1 );
+      
+

See also substr(), + stristr(), and strstr(). +


PrevHomeNext
strposUpstr_repeat
\ No newline at end of file diff --git a/function.strrev.html b/function.strrev.html new file mode 100644 index 0000000..57c89a8 --- /dev/null +++ b/function.strrev.html @@ -0,0 +1,177 @@ +strrev
PHP Manual
PrevNext

strrev

(PHP3 , PHP4 )

strrev -- Reverse a string

Description

string strrev (string string)

Returns string, reversed. +


PrevHomeNext
str_repeatUpstrrpos
\ No newline at end of file diff --git a/function.strrpos.html b/function.strrpos.html new file mode 100644 index 0000000..737ddba --- /dev/null +++ b/function.strrpos.html @@ -0,0 +1,241 @@ +strrpos
PHP Manual
PrevNext

strrpos

(PHP3 , PHP4 )

strrpos --  + Find position of last occurrence of a char in a string +

Description

int strrpos (string haystack, char needle)

Returns the numeric position of the last occurrence of + needle in the + haystack string. Note that the needle in + this case can only be a single character. If a string is passed + as the needle, then only the first character of that string will + be used. +

If needle is not found, returns false. +

If needle is not a string, it is converted + to an integer and applied as the ordinal value of a character. +

See also strpos(), + strrchr(), substr(), + stristr(), and strstr(). +


PrevHomeNext
strrevUpstrspn
\ No newline at end of file diff --git a/function.strspn.html b/function.strspn.html new file mode 100644 index 0000000..2028628 --- /dev/null +++ b/function.strspn.html @@ -0,0 +1,225 @@ +strspn
PHP Manual
PrevNext

strspn

(PHP3 >= 3.0.3, PHP4 )

strspn --  + Find length of initial segment matching mask +

Description

int strspn (string str1, string str2)

Returns the length of the initial segment of + str1 which consists entirely of characters + in str2. +

+


strspn ("42 is the answer, what is the question ...", "1234567890");
+      

will return 2 as result. +

+

See also strcspn(). +


PrevHomeNext
strrposUpstrstr
\ No newline at end of file diff --git a/function.strstr.html b/function.strstr.html new file mode 100644 index 0000000..0438cb7 --- /dev/null +++ b/function.strstr.html @@ -0,0 +1,293 @@ +strstr
PHP Manual
PrevNext

strstr

(PHP3 , PHP4 )

strstr -- Find first occurrence of a string

Description

string strstr (string haystack, string needle)

Returns all of haystack from the first + occurrence of needle to the end. +

If needle is not found, returns false. +

If needle is not a string, it is converted + to an integer and applied as the ordinal value of a character. +

Note: + Note that this function is case-sensitive. For + case-insensitive searches, use stristr(). +

+

Example 1. Strstr() example


$email = 'sterling@designmultimedia.com';
+$domain = strstr ($email, '@');
+print $domain; // prints @designmultimedia.com
+      
+

See also stristr(), + strrchr(), substr(), and + ereg(). +


PrevHomeNext
strspnUpstrtok
\ No newline at end of file diff --git a/function.strtok.html b/function.strtok.html new file mode 100644 index 0000000..80f1967 --- /dev/null +++ b/function.strtok.html @@ -0,0 +1,251 @@ +strtok
PHP Manual
PrevNext

strtok

(PHP3 , PHP4 )

strtok -- Tokenize string

Description

string strtok (string arg1, string arg2)

strtok() is used to tokenize a string. That + is, if you have a string like "This is an example string" you + could tokenize this string into its individual words by using the + space character as the token. +

Example 1. Strtok() example


$string = "This is an example string";
+$tok = strtok ($string," ");
+while ($tok) {
+    echo "Word=$tok<br>";
+    $tok = strtok (" ");
+}
+      
+

Note that only the first call to strtok uses the string argument. + Every subsequent call to strtok only needs the token to use, as + it keeps track of where it is in the current string. To start + over, or to tokenize a new string you simply call strtok with the + string argument again to initialize it. Note that you may put + multiple tokens in the token parameter. The string will be + tokenized when any one of the characters in the argument are + found. +

Also be careful that your tokens may be equal to "0". This + evaluates to false in conditional expressions. +

See also split() and + explode(). +


PrevHomeNext
strstrUpstrtolower
\ No newline at end of file diff --git a/function.strtolower.html b/function.strtolower.html new file mode 100644 index 0000000..232e515 --- /dev/null +++ b/function.strtolower.html @@ -0,0 +1,238 @@ +strtolower
PHP Manual
PrevNext

strtolower

(PHP3 , PHP4 )

strtolower -- Make a string lowercase

Description

string strtolower (string str)

Returns string with all alphabetic + characters converted to lowercase. +

Note that 'alphabetic' is determined by the current locale. This + means that in i.e. the default "C" locale, characters such as + umlaut-A (Ä) will not be converted. +

Example 1. Strtolower() example


$str = "Mary Had A Little Lamb and She LOVED It So";
+$str = strtolower($str);	
+print $str; # Prints mary had a little lamb and she loved it so
+     

See also strtoupper() + and ucfirst(). +


PrevHomeNext
strtokUpstrtoupper
\ No newline at end of file diff --git a/function.strtotime.html b/function.strtotime.html new file mode 100644 index 0000000..d2d67e8 --- /dev/null +++ b/function.strtotime.html @@ -0,0 +1,220 @@ +strtotime
PHP Manual
PrevNext

strtotime

(PHP3 >= 3.0.12, PHP4 >= 4.0b2)

strtotime --  + Parse about any english textual datetime description into a UNIX + timestamp +

Description

int strtotime (string time [, int + now])

The function expects to be given a string containing an english + date format and will try to parse that format into a UNIX + timestamp. +

Example 1. Strtotime() examples


echo strtotime ("now") . "\n";
+echo strtotime ("10 September 2000") . "\n";
+echo strtotime ("+1 day") . "\n";
+echo strtotime ("+1 week") . "\n";
+echo strtotime ("+1 week 2 days 4 hours 2 seconds") . "\n";
+      
+


PrevHomeNext
timeUpdBase functions
\ No newline at end of file diff --git a/function.strtoupper.html b/function.strtoupper.html new file mode 100644 index 0000000..5bfc6aa --- /dev/null +++ b/function.strtoupper.html @@ -0,0 +1,238 @@ +strtoupper
PHP Manual
PrevNext

strtoupper

(PHP3 , PHP4 )

strtoupper -- Make a string uppercase

Description

string strtoupper (string string)

Returns string with all alphabetic + characters converted to uppercase. +

Note that 'alphabetic' is determined by the current locale. For + instance, in the default "C" locale characters such as umlaut-a + (ä) will not be converted. +

Example 1. Strtoupper() example


$str = "Mary Had A Little Lamb and She LOVED It So";
+$str = strtoupper ($str);	
+print $str; # Prints MARY HAD A LITTLE LAMB AND SHE LOVED IT SO
+     

See also strtolower() + and ucfirst(). +


PrevHomeNext
strtolowerUpstr_replace
\ No newline at end of file diff --git a/function.strtr.html b/function.strtr.html new file mode 100644 index 0000000..746d964 --- /dev/null +++ b/function.strtr.html @@ -0,0 +1,313 @@ +strtr
PHP Manual
PrevNext

strtr

(PHP3 , PHP4 )

strtr -- Translate certain characters

Description

string strtr (string str, string from, string to)

This function operates on str, translating + all occurrences of each character in from + to the corresponding character in to and + returning the result. +

If from and to are + different lengths, the extra characters in the longer of the two + are ignored. +

Example 1. Strtr() example


$addr = strtr($addr, "äåö", "aao");
+      
+

strtr() can be called with only two + arguments. If called with two arguments it behaves in a new way: + from then has to be an array that contains + string -> string pairs that will be replaced in the source + string. strtr() will always look for the + longest possible match first and will *NOT* try to replace stuff + that it has already worked on. +

Examples: +


$trans = array ("hello" => "hi", "hi" => "hello");
+echo strtr("hi all, I said hello", $trans) . "\n";
+      

+ This will show: "hello all, I said hi", +

Note: + This feature (two arguments) was added in PHP 4.0. +

See also ereg_replace(). +


PrevHomeNext
str_replaceUpsubstr
\ No newline at end of file diff --git a/function.strval.html b/function.strval.html new file mode 100644 index 0000000..1a06da9 --- /dev/null +++ b/function.strval.html @@ -0,0 +1,216 @@ +strval
PHP Manual
PrevNext

strval

(PHP3 , PHP4 )

strval -- Get string value of a variable

Description

string strval (mixed var)

Returns the string value of var. +

var may be any scalar type. You cannot use + strval() on arrays or objects. +

See also doubleval(), + intval(), settype() and + Type + juggling. +


PrevHomeNext
settypeUpunserialize
\ No newline at end of file diff --git a/function.substr-count.html b/function.substr-count.html new file mode 100644 index 0000000..af8e353 --- /dev/null +++ b/function.substr-count.html @@ -0,0 +1,227 @@ +substr_count
PHP Manual
PrevNext

substr_count

(PHP4 >= 4.0RC2)

substr_count -- Count the number of substring occurrences

Description

int substr_count (string haystrack, string needle)

substr_count() returns the number of times the + needle substring occurs in the + haystack string. +

Example 1. substr_count() example


print substr_count("This is a test", "is"); // prints out 2
+      
+


PrevHomeNext
substrUpsubstr_replace
\ No newline at end of file diff --git a/function.substr-replace.html b/function.substr-replace.html new file mode 100644 index 0000000..70f6a8d --- /dev/null +++ b/function.substr-replace.html @@ -0,0 +1,363 @@ +substr_replace
PHP Manual
PrevNext

substr_replace

(PHP4 >= 4.0b4)

substr_replace -- Replace text within a portion of a string

Description

string substr_replace (string string, string replacement, int start [, int + length])

substr_replace() replaces the part of + string delimited by the + start and (optionally) + length parameters with the string given in + replacement. The result is returned. +

If start is positive, the replacing will + begin at the start'th offset into + string. +

If start is negative, the replacing will + begin at the start'th character from the + end of string. +

If length is given and is positive, it + represents the length of the portion of + string which is to be replaced. If it is + negative, it represents the number of characters from the end of + string at which to stop replacing. If it + is not given, then it will default to strlen( + string ); i.e. end the replacing at the + end of string. +

Example 1. Substr_replace() example


<?php
+$var = 'ABCDEFGH:/MNRPQR/';
+echo "Original: $var<hr>\n";
+
+/* These two examples replace all of $var with 'bob'. */
+echo substr_replace ($var, 'bob', 0) . "<br>\n";
+echo substr_replace ($var, 'bob', 0, strlen ($var)) . "<br>\n";
+
+/* Insert 'bob' right at the beginning of $var. */
+echo substr_replace ($var, 'bob', 0, 0) . "<br>\n";
+
+/* These next two replace 'MNRPQR' in $var with 'bob'. */
+echo substr_replace ($var, 'bob', 10, -1) . "<br>\n";
+echo substr_replace ($var, 'bob', -7, -1) . "<br>\n";
+
+/* Delete 'MNRPQR' from $var. */
+echo substr_replace ($var, '', 10, -1) . "<br>\n";
+?>
+      
+

See also str_replace() and + substr(). +

Note: + Substr_replace() was added in PHP 4.0. +


PrevHomeNext
substr_countUptrim
\ No newline at end of file diff --git a/function.substr.html b/function.substr.html new file mode 100644 index 0000000..ed6ef8a --- /dev/null +++ b/function.substr.html @@ -0,0 +1,404 @@ +substr
PHP Manual
PrevNext

substr

(PHP3 , PHP4 )

substr -- Return part of a string

Description

string substr (string string, int start [, int + length])

Substr returns the portion of string + specified by the start and + length parameters. +

If start is positive, the returned string + will start at the start'th position in + string, counting from zero. For instance, + in the string 'abcdef', the character at + position 0 is 'a', the + character at position 2 is + 'c', and so forth. +

Examples: +


$rest = substr ("abcdef", 1);    // returns "bcdef"
+$rest = substr ("abcdef", 1, 3); // returns "bcd"
+      

+

If start is negative, the returned string + will start at the start'th character + from the end of string.

Examples: +


$rest = substr ("abcdef", -1);    // returns "f"
+$rest = substr ("abcdef", -2);    // returns "ef"
+$rest = substr ("abcdef", -3, 1); // returns "d"
+      

+

If length is given and is positive, the + string returned will end length characters + from start. If this would result in a + string with negative length (because the start is past the end of + the string), then the returned string will contain the single + character at start. +

If length is given and is negative, the + string returned will end length characters + from the end of string. If this would + result in a string with negative length, then the returned string + will contain the single character at + start. +

Examples: +


$rest = substr ("abcdef", 1, -1); // returns "bcde"
+      

+

See also strrchr() and + ereg(). +


PrevHomeNext
strtrUpsubstr_count
\ No newline at end of file diff --git a/function.swf-actiongeturl.html b/function.swf-actiongeturl.html new file mode 100644 index 0000000..55c324d --- /dev/null +++ b/function.swf-actiongeturl.html @@ -0,0 +1,191 @@ +swf_actiongeturl
PHP Manual
PrevNext

swf_actiongeturl

(PHP4 >= 4.0RC2)

swf_actiongeturl -- Get a URL from a Shockwave Flash movie

Description

void + swf_actiongeturl + (string + url, string + target)

The swf_actionGetUrl() function gets the URL + specified by the parameter url with the + target target. +


PrevHomeNext
swf_actiongotoframeUpswf_actionnextframe
\ No newline at end of file diff --git a/function.swf-actiongotoframe.html b/function.swf-actiongotoframe.html new file mode 100644 index 0000000..743f096 --- /dev/null +++ b/function.swf-actiongotoframe.html @@ -0,0 +1,185 @@ +swf_actiongotoframe
PHP Manual
PrevNext

swf_actiongotoframe

(PHP4 >= 4.0RC2)

swf_actiongotoframe -- Play a frame and then stop

Description

void + swf_actiongotoframe + (int + framenumber)

The swf_actionGotoFrame() function will go to + the frame specified by framenumber, play + it, and then stop. +


PrevHomeNext
swf_startdoactionUpswf_actiongeturl
\ No newline at end of file diff --git a/function.swf-actiongotolabel.html b/function.swf-actiongotolabel.html new file mode 100644 index 0000000..31bc4d0 --- /dev/null +++ b/function.swf-actiongotolabel.html @@ -0,0 +1,187 @@ +swf_actiongotolabel
PHP Manual
PrevNext

swf_actiongotolabel

(PHP4 >= 4.0RC2)

swf_actiongotolabel --  + Display a frame with the specified label +

Description

void + swf_actiongotolabel + (string + label)

The swf_actionGotoLabel() function displays + the frame with the label given by the + label parameter and then stops. +


PrevHomeNext
swf_actionsettargetUpswf_enddoaction
\ No newline at end of file diff --git a/function.swf-actionnextframe.html b/function.swf-actionnextframe.html new file mode 100644 index 0000000..c330e87 --- /dev/null +++ b/function.swf-actionnextframe.html @@ -0,0 +1,174 @@ +swf_actionnextframe
PHP Manual
PrevNext

swf_actionnextframe

(PHP4 >= 4.0RC2)

swf_actionnextframe -- Go foward one frame

Description

void + swf_actionnextframe + (void);

Go foward one frame. +


PrevHomeNext
swf_actiongeturlUpswf_actionprevframe
\ No newline at end of file diff --git a/function.swf-actionplay.html b/function.swf-actionplay.html new file mode 100644 index 0000000..9dd543f --- /dev/null +++ b/function.swf-actionplay.html @@ -0,0 +1,176 @@ +swf_actionplay
PHP Manual
PrevNext

swf_actionplay

(PHP4 >= 4.0RC2)

swf_actionplay --  + Start playing the flash movie from the current frame +

Description

void + swf_actionplay + (void);

Start playing the flash movie from the current frame. +


PrevHomeNext
swf_actionprevframeUpswf_actionstop
\ No newline at end of file diff --git a/function.swf-actionprevframe.html b/function.swf-actionprevframe.html new file mode 100644 index 0000000..4b641e0 --- /dev/null +++ b/function.swf-actionprevframe.html @@ -0,0 +1,171 @@ +swf_actionprevframe
PHP Manual
PrevNext

swf_actionprevframe

(PHP4 >= 4.0RC2)

swf_actionprevframe -- Go backwards one frame

Description

void + swf_actionprevframe + (void);


PrevHomeNext
swf_actionnextframeUpswf_actionplay
\ No newline at end of file diff --git a/function.swf-actionsettarget.html b/function.swf-actionsettarget.html new file mode 100644 index 0000000..e4925c5 --- /dev/null +++ b/function.swf-actionsettarget.html @@ -0,0 +1,180 @@ +swf_actionsettarget
PHP Manual
PrevNext

swf_actionsettarget

(PHP4 >= 4.0RC2)

swf_actionsettarget -- Set the context for actions

Description

void + swf_actionsettarget + (string + target)

The swf_actionSetTarget() function sets the + context for all actions. You can use this to control other flash + movies that are currently playing. +


PrevHomeNext
swf_actionwaitforframeUpswf_actiongotolabel
\ No newline at end of file diff --git a/function.swf-actionstop.html b/function.swf-actionstop.html new file mode 100644 index 0000000..8d7dbbd --- /dev/null +++ b/function.swf-actionstop.html @@ -0,0 +1,176 @@ +swf_actionstop
PHP Manual
PrevNext

swf_actionstop

(PHP4 >= 4.0RC2)

swf_actionstop --  + Stop playing the flash movie at the current frame +

Description

void + swf_actionstop + (void);

Stop playing the flash movie at the current frame. +


PrevHomeNext
swf_actionplayUpswf_actiontogglequality
\ No newline at end of file diff --git a/function.swf-actiontogglequality.html b/function.swf-actiontogglequality.html new file mode 100644 index 0000000..dea343a --- /dev/null +++ b/function.swf-actiontogglequality.html @@ -0,0 +1,176 @@ +swf_actiontogglequality
PHP Manual
PrevNext

swf_actiontogglequality

(PHP4 >= 4.0RC2)

swf_actiontogglequality --  + Toggle between low and high quality +

Description

void + swf_actiontogglequality + (void);

Toggle the flash movie between high and low quality. +


PrevHomeNext
swf_actionstopUpswf_actionwaitforframe
\ No newline at end of file diff --git a/function.swf-actionwaitforframe.html b/function.swf-actionwaitforframe.html new file mode 100644 index 0000000..9ca9119 --- /dev/null +++ b/function.swf-actionwaitforframe.html @@ -0,0 +1,196 @@ +swf_actionwaitforframe
PHP Manual
PrevNext

swf_actionwaitforframe

(PHP4 >= 4.0RC2)

swf_actionwaitforframe --  + Skip actions if a frame has not been loaded +

Description

void + swf_actionwaitforframe + (int + framenumber, int + skipcount)

The swf_actionWaitForFrame() function will + check to see if the frame, specified by the + framenumber parameter has been loaded, if + not it will skip the number of actions specified by the + skipcount parameter. This can be useful + for "Loading..." type animations. +


PrevHomeNext
swf_actiontogglequalityUpswf_actionsettarget
\ No newline at end of file diff --git a/function.swf-addbuttonrecord.html b/function.swf-addbuttonrecord.html new file mode 100644 index 0000000..5a34340 --- /dev/null +++ b/function.swf-addbuttonrecord.html @@ -0,0 +1,251 @@ +swf_addbuttonrecord
PHP Manual
PrevNext

swf_addbuttonrecord

(PHP4 >= 4.0RC2)

swf_addbuttonrecord --  + Controls location, appearance and active area of the current button +

Description

void + swf_addbuttonrecord + (int + states, int + shapeid, int + depth)

The swf_addbuttonrecord() function allows you + to define the specifics of using a button. The first parameter, + states, defines what states the button can + have, these can be any or all of the following constants: + BSHitTest, BSDown, BSOver or BSUp. The second parameter, the + shapeid is the look of the button, this is + usually the object id of the shape of the button. The + depth parameter is the placement of the + button in the current frame. +

Example 1. + Swf_addbuttonrecord() function example +


swf_startButton ($objid, TYPE_MENUBUTTON);
+    swf_addButtonRecord (BSDown|BSOver, $buttonImageId, 340);
+    swf_onCondition (MenuEnter);
+        swf_actionGetUrl ("http://www.designmultimedia.com", "_level1");
+    swf_onCondition (MenuExit);
+        swf_actionGetUrl ("", "_level1");
+swf_endButton ();
+      
+


PrevHomeNext
swf_startbuttonUpswf_oncondition
\ No newline at end of file diff --git a/function.swf-addcolor.html b/function.swf-addcolor.html new file mode 100644 index 0000000..3a7fdeb --- /dev/null +++ b/function.swf-addcolor.html @@ -0,0 +1,236 @@ +swf_addcolor
PHP Manual
PrevNext

swf_addcolor

(PHP4 >= 4.0RC2)

swf_addcolor --  + Set the global add color to the rgba value specified +

Description

void + swf_addcolor + (float + r, float + g, float + b, float + a)

The swf_addcolor() function sets the global + add color to the rgba color specified. + This color is then used (implicitly) by the + swf_placeobject(), + swf_modifyobject() and the + swf_addbuttonrecord() functions. The color of + the object will be add by the rgba values + when the object is written to the screen. +

Note: + The rgba values can be either positive or + negative. +


PrevHomeNext
swf_mulcolorUpswf_placeobject
\ No newline at end of file diff --git a/function.swf-closefile.html b/function.swf-closefile.html new file mode 100644 index 0000000..9833437 --- /dev/null +++ b/function.swf-closefile.html @@ -0,0 +1,293 @@ +swf_closefile
PHP Manual
PrevNext

swf_closefile

(PHP4 >= 4.0RC2)

swf_closefile -- Close the current Shockwave Flash file

Description

void + swf_closefile + ([int + return_file])

Close a file that was opened by the + swf_openfile() function. If the + return_file parameter is set then the contents + of the SWF file are returned from the function. +

Example 1. + Creating a simple flash file based on user input and outputting it + and saving it in a database +


<?php
+
+// The $text variable is submitted by the
+// user
+
+// Global variables for database
+// access (used in the swf_savedata() function)
+$DBHOST = "localhost";
+$DBUSER = "sterling";
+$DBPASS = "secret";
+
+swf_openfile ("php://stdout", 256, 256, 30, 1, 1, 1);
+
+    swf_definefont (10, "Ligon-Bold");
+        swf_fontsize (12);
+        swf_fontslant (10);
+    
+    swf_definetext (11, $text, 1);
+    
+    swf_pushmatrix ();
+        swf_translate (-50, 80, 0);
+        swf_placeobject (11, 60);
+    swf_popmatrix ();
+
+    swf_showframe ();
+  
+    swf_startdoaction ();
+        swf_actionstop ();
+    swf_enddoaction ();
+
+$data = swf_closefile (1);
+
+$data ?
+  swf_savedata ($data) :
+  die ("Error could not save SWF file");
+
+// void swf_savedata (string data)
+// Save the generated file a database
+// for later retrieval
+function swf_savedata ($data)
+{
+    global $DBHOST, 
+           $DBUSER,
+           $DBPASS;
+    
+    $dbh = @mysql_connect ($DBHOST, $DBUSER, $DBPASS);
+
+    if (!$dbh) {
+        die (sprintf ("Error [%d]: %s",
+                      mysql_errno (), mysql_error ()));
+    }
+
+    $stmt = "INSERT INTO swf_files (file) VALUES ('$data')";
+
+    $sth = @mysql_query ($stmt, $dbh);
+
+    if (!$sth) {
+        die (sprintf ("Error [%d]: %s",
+                      mysql_errno (), mysql_error ()));
+    }
+
+    @mysql_free_result ($sth);
+    @mysql_close ($dbh);
+}
+?>
+      
+


PrevHomeNext
swf_openfileUpswf_labelframe
\ No newline at end of file diff --git a/function.swf-definebitmap.html b/function.swf-definebitmap.html new file mode 100644 index 0000000..82ca2c4 --- /dev/null +++ b/function.swf-definebitmap.html @@ -0,0 +1,181 @@ +swf_definebitmap
PHP Manual
PrevNext

swf_definebitmap

(PHP4 >= 4.0RC2)

swf_definebitmap -- Define a bitmap

Description

void + swf_definebitmap + (int + objid, string + image_name)

The swf_definebitmap() function defines a + bitmap given a GIF, JPEG, RGB or FI image. The image will be + converted into a Flash JPEG or Flash color map format. +


PrevHomeNext
swf_textwidthUpswf_getbitmapinfo
\ No newline at end of file diff --git a/function.swf-definefont.html b/function.swf-definefont.html new file mode 100644 index 0000000..8f0301c --- /dev/null +++ b/function.swf-definefont.html @@ -0,0 +1,199 @@ +swf_definefont
PHP Manual
PrevNext

swf_definefont

(PHP4 >= 4.0RC2)

swf_definefont --  + Defines a font +

Description

void + swf_definefont + (int + fontid, string + fontname)

The swf_definefont() function defines a font + given by the fontname parameter and gives + it the id specified by the fontid + parameter. It then sets the font given by fontname to the current font. +


PrevHomeNext
swf_endshapeUpswf_setfont
\ No newline at end of file diff --git a/function.swf-defineline.html b/function.swf-defineline.html new file mode 100644 index 0000000..0b76231 --- /dev/null +++ b/function.swf-defineline.html @@ -0,0 +1,214 @@ +swf_defineline
PHP Manual
PrevNext

swf_defineline

(PHP4 >= 4.0RC2)

swf_defineline -- Define a line

Description

void + swf_defineline + (int + objid, float + x1, float + y1, float + x2, float + y2, float + width)

The swf_defineline() defines a line starting + from the x coordinate given by x1 and the + y coordinate given by y1 parameter. Up + to the x coordinate given by the x2 + parameter and the y coordinate given by the + y2 parameter. It will have a width + defined by the width parameter. +


PrevHomeNext
swf_enddoactionUpswf_definerect
\ No newline at end of file diff --git a/function.swf-definepoly.html b/function.swf-definepoly.html new file mode 100644 index 0000000..266df33 --- /dev/null +++ b/function.swf-definepoly.html @@ -0,0 +1,210 @@ +swf_definepoly
PHP Manual
PrevNext

swf_definepoly

(PHP4 >= 4.0.0)

swf_definepoly --  + Define a polygon +

Description

void + swf_definepoly + (int + objid, array + coords, int + npoints, float + width)

The swf_definepoly() function defines a + polygon given an array of x, y coordinates (the coordinates are + defined in the parameter coords). The + parameter npoints is the number of overall + points that are contained in the array given by + coords. The width + is the width of the polygon's border, if set to 0.0 the polygon + is filled. +


PrevHomeNext
swf_definerectUpswf_startshape
\ No newline at end of file diff --git a/function.swf-definerect.html b/function.swf-definerect.html new file mode 100644 index 0000000..d24979e --- /dev/null +++ b/function.swf-definerect.html @@ -0,0 +1,215 @@ +swf_definerect
PHP Manual
PrevNext

swf_definerect

(PHP4 >= 4.0RC2)

swf_definerect -- Define a rectangle

Description

void + swf_definerect + (int + objid, float + x1, float + y1, float + x2, float + y2, float + width)

The swf_definerect() defines a rectangle with + an upper left hand coordinate given by the x, + x1, and the y, y1. + And a lower right hand coordinate given by the x coordinate, + x2, and the y coordinate, y2 + . Width of the rectangles border is given by the + width parameter, if the width is 0.0 then + the rectangle is filled. +


PrevHomeNext
swf_definelineUpswf_definepoly
\ No newline at end of file diff --git a/function.swf-definetext.html b/function.swf-definetext.html new file mode 100644 index 0000000..5d39fa6 --- /dev/null +++ b/function.swf-definetext.html @@ -0,0 +1,196 @@ +swf_definetext
PHP Manual
PrevNext

swf_definetext

(PHP4 >= 4.0RC2)

swf_definetext -- Define a text string

Description

void + swf_definetext + (int + objid, string + str, int + docenter)

Define a text string (the str parameter) + using the current font and font size. The + docenter is where the word is centered, if + docenter is 1, then the word is centered + in x. +


PrevHomeNext
swf_getfontinfoUpswf_textwidth
\ No newline at end of file diff --git a/function.swf-endbutton.html b/function.swf-endbutton.html new file mode 100644 index 0000000..938f228 --- /dev/null +++ b/function.swf-endbutton.html @@ -0,0 +1,180 @@ +swf_endbutton
PHP Manual
PrevNext

swf_endbutton

(PHP4 >= 4.0RC2)

swf_endbutton --  + End the definition of the current button +

Description

void + swf_endbutton + (void);

The swf_endButton() function ends the + definition of the current button. +


PrevHomeNext
swf_onconditionUpswf_viewport
\ No newline at end of file diff --git a/function.swf-enddoaction.html b/function.swf-enddoaction.html new file mode 100644 index 0000000..0a85e58 --- /dev/null +++ b/function.swf-enddoaction.html @@ -0,0 +1,181 @@ +swf_enddoaction
PHP Manual
PrevNext

swf_enddoaction

(PHP4 >= 4.0RC2)

swf_enddoaction -- End the current action

Description

void + swf_enddoaction + (void);

Ends the current action started by the + swf_startdoaction() function. +


PrevHomeNext
swf_actiongotolabelUpswf_defineline
\ No newline at end of file diff --git a/function.swf-endshape.html b/function.swf-endshape.html new file mode 100644 index 0000000..6f43fd0 --- /dev/null +++ b/function.swf-endshape.html @@ -0,0 +1,180 @@ +swf_endshape
PHP Manual
PrevNext

swf_endshape

(PHP4 >= 4.0RC2)

swf_endshape --  + Completes the definition of the current shape +

Description

void + swf_endshape + (void);

The swf_endshape() completes the definition of + the current shape. +


PrevHomeNext
swf_shapearcUpswf_definefont
\ No newline at end of file diff --git a/function.swf-endsymbol.html b/function.swf-endsymbol.html new file mode 100644 index 0000000..90690e8 --- /dev/null +++ b/function.swf-endsymbol.html @@ -0,0 +1,185 @@ +swf_endsymbol
PHP Manual
PrevNext

swf_endsymbol

(PHP4 >= 4.0RC2)

swf_endsymbol -- End the definition of a symbol

Description

void + swf_endsymbol + (void);

The swf_endsymbol() function ends the + definition of a symbol that was started by the + swf_startsymbol() function. +


PrevHomeNext
swf_startsymbolUpswf_startbutton
\ No newline at end of file diff --git a/function.swf-fontsize.html b/function.swf-fontsize.html new file mode 100644 index 0000000..0ebef44 --- /dev/null +++ b/function.swf-fontsize.html @@ -0,0 +1,185 @@ +swf_fontsize
PHP Manual
PrevNext

swf_fontsize

(PHP4 >= 4.0RC2)

swf_fontsize -- Change the font size

Description

void + swf_fontsize + (float + size)

The swf_fontsize() function changes the font + size to the value given by the size + parameter. +


PrevHomeNext
swf_setfontUpswf_fontslant
\ No newline at end of file diff --git a/function.swf-fontslant.html b/function.swf-fontslant.html new file mode 100644 index 0000000..04004de --- /dev/null +++ b/function.swf-fontslant.html @@ -0,0 +1,182 @@ +swf_fontslant
PHP Manual
PrevNext

swf_fontslant

(PHP4 >= 4.0RC2)

swf_fontslant -- Set the font slant

Description

void + swf_fontslant + (float + slant)

Set the current font slant to the angle indicated by the + slant parameter. Positive values create a + foward slant, negative values create a negative slant. +


PrevHomeNext
swf_fontsizeUpswf_fonttracking
\ No newline at end of file diff --git a/function.swf-fonttracking.html b/function.swf-fonttracking.html new file mode 100644 index 0000000..71d467a --- /dev/null +++ b/function.swf-fonttracking.html @@ -0,0 +1,184 @@ +swf_fonttracking
PHP Manual
PrevNext

swf_fonttracking

(PHP4 >= 4.0RC2)

swf_fonttracking -- Set the current font tracking

Description

void + swf_fonttracking + (float + tracking)

Set the font tracking to the value specified by the + tracking parameter. This function is used + to increase the spacing between letters and text, positive values + increase the space and negative values decrease the space between + letters. +


PrevHomeNext
swf_fontslantUpswf_getfontinfo
\ No newline at end of file diff --git a/function.swf-getbitmapinfo.html b/function.swf-getbitmapinfo.html new file mode 100644 index 0000000..21c4aff --- /dev/null +++ b/function.swf-getbitmapinfo.html @@ -0,0 +1,206 @@ +swf_getbitmapinfo
PHP Manual
PrevNext

swf_getbitmapinfo

(PHP4 >= 4.0RC2)

swf_getbitmapinfo -- Get information about a bitmap

Description

array + swf_getbitmapinfo + (int + bitmapid)

The swf_getbitmapinfo() function returns an + array of information about a bitmap given by the + bitmapid parameter. The returned array + has the following elements: +

  • "size" - The size in bytes of the bitmap. +

  • "width" - The width in pixels of the bitmap. +

  • "height" - The height in pixels of the bitmap. +

+


PrevHomeNext
swf_definebitmapUpswf_startsymbol
\ No newline at end of file diff --git a/function.swf-getfontinfo.html b/function.swf-getfontinfo.html new file mode 100644 index 0000000..c43de7a --- /dev/null +++ b/function.swf-getfontinfo.html @@ -0,0 +1,195 @@ +swf_getfontinfo
PHP Manual
PrevNext

swf_getfontinfo

(PHP4 >= 4.0RC2)

swf_getfontinfo --  + The height in pixels of a capital A and a lowercase x +

Description

array + swf_getfontinfo + (void);

The swf_getfontinfo() function returns an + associative array with the following parameters: +

  • Aheight - The height in pixels of a capital A. +

  • xheight - The height in pixels of a lowercase x. +

+


PrevHomeNext
swf_fonttrackingUpswf_definetext
\ No newline at end of file diff --git a/function.swf-getframe.html b/function.swf-getframe.html new file mode 100644 index 0000000..ac5d348 --- /dev/null +++ b/function.swf-getframe.html @@ -0,0 +1,178 @@ +swf_getframe
PHP Manual
PrevNext

swf_getframe

(PHP4 >= 4.0RC2)

swf_getframe -- Get the frame number of the current frame

Description

int + swf_getframe + (void);

The swf_getframe() function gets the number of + the current frame. +


PrevHomeNext
swf_setframeUpswf_mulcolor
\ No newline at end of file diff --git a/function.swf-labelframe.html b/function.swf-labelframe.html new file mode 100644 index 0000000..cf38a77 --- /dev/null +++ b/function.swf-labelframe.html @@ -0,0 +1,181 @@ +swf_labelframe
PHP Manual
PrevNext

swf_labelframe

(PHP4 >= 4.0RC2)

swf_labelframe -- Label the current frame

Description

void + swf_labelframe + (string + name)

Label the current frame with the name given by the + name parameter. +


PrevHomeNext
swf_closefileUpswf_showframe
\ No newline at end of file diff --git a/function.swf-lookat.html b/function.swf-lookat.html new file mode 100644 index 0000000..efc72bd --- /dev/null +++ b/function.swf-lookat.html @@ -0,0 +1,227 @@ +swf_lookat
PHP Manual
PrevNext

swf_lookat

(PHP4 >= 4.0RC2)

swf_lookat -- Define a viewing transformation

Description

void + swf_lookat + (double + view_x, double + view_y, double + view_z, double + reference_x, double + reference_y, double + reference_z, double + twist)

The swf_lookat() function defines a viewing + transformation by giving the viewing position (the parameters + view_x, view_y, and + view_z) and the coordinates of a reference + point in the scene, the reference point is defined by the + reference_x, reference_y + , and reference_z parameters. + The twist controls the rotation along + with viewer's z axis. +


PrevHomeNext
swf_polarviewUpswf_pushmatrix
\ No newline at end of file diff --git a/function.swf-modifyobject.html b/function.swf-modifyobject.html new file mode 100644 index 0000000..6843806 --- /dev/null +++ b/function.swf-modifyobject.html @@ -0,0 +1,214 @@ +swf_modifyobject
PHP Manual
PrevNext

swf_modifyobject

(PHP4 >= 4.0RC2)

swf_modifyobject -- Modify an object

Description

void + swf_modifyobject + (int + depth, int + how)

Updates the position and/or color of the object at the specified + depth, depth. The parameter + how determines what is updated. + how can either be the constant MOD_MATRIX + or MOD_COLOR or it can be a combination of both + (MOD_MATRIX|MOD_COLOR). +

MOD_COLOR uses the current mulcolor (specified by the function + swf_mulcolor()) and addcolor (specified by the + function swf_addcolor()) to color the object. + MOD_MATRIX uses the current matrix to position the object. +


PrevHomeNext
swf_placeobjectUpswf_removeobject
\ No newline at end of file diff --git a/function.swf-mulcolor.html b/function.swf-mulcolor.html new file mode 100644 index 0000000..73e9e3e --- /dev/null +++ b/function.swf-mulcolor.html @@ -0,0 +1,236 @@ +swf_mulcolor
PHP Manual
PrevNext

swf_mulcolor

(PHP4 >= 4.0RC2)

swf_mulcolor --  + Sets the global multiply color to the rgba value specified +

Description

void + swf_mulcolor + (float + r, float + g, float + b, float + a)

The swf_mulcolor() function sets the global + multiply color to the rgba color + specified. This color is then used (implicitly) by the + swf_placeobject(), + swf_modifyobject() and the + swf_addbuttonrecord() functions. The color of + the object will be multiplied by the rgba + values when the object is written to the screen. +

Note: + The rgba values can be either positive or + negative. +


PrevHomeNext
swf_getframeUpswf_addcolor
\ No newline at end of file diff --git a/function.swf-nextid.html b/function.swf-nextid.html new file mode 100644 index 0000000..c5aeee8 --- /dev/null +++ b/function.swf-nextid.html @@ -0,0 +1,178 @@ +swf_nextid
PHP Manual
PrevNext

swf_nextid

(PHP4 >= 4.0RC2)

swf_nextid -- Returns the next free object id

Description

int + swf_nextid + (void);

The swf_nextid() function returns the next + available object id. +


PrevHomeNext
swf_removeobjectUpswf_startdoaction
\ No newline at end of file diff --git a/function.swf-oncondition.html b/function.swf-oncondition.html new file mode 100644 index 0000000..1c41fa2 --- /dev/null +++ b/function.swf-oncondition.html @@ -0,0 +1,279 @@ +swf_oncondition
PHP Manual
PrevNext

swf_oncondition

(PHP4 >= 4.0RC2)

swf_oncondition --  + Describe a transition used to trigger an action list +

Description

void + swf_oncondition + (int + transition)

The swf_onCondition() function describes a + transition that will trigger an action list. There are several + types of possible transitions, the following are for buttons + defined as TYPE_MENUBUTTON: +

  • IdletoOverUp +

  • OverUptoIdle +

  • OverUptoOverDown +

  • OverDowntoOverUp +

  • IdletoOverDown +

  • OutDowntoIdle +

  • MenuEnter (IdletoOverUp|IdletoOverDown) +

  • MenuExit (OverUptoIdle|OverDowntoIdle) +

+ For TYPE_PUSHBUTTON there are the following options: +

  • IdletoOverUp +

  • OverUptoIdle +

  • OverUptoOverDown +

  • OverDowntoOverUp +

  • OverDowntoOutDown +

  • OutDowntoOverDown +

  • OutDowntoIdle +

  • ButtonEnter (IdletoOverUp|OutDowntoOverDown) +

  • ButtonExit (OverUptoIdle|OverDowntoOutDown) +

+


PrevHomeNext
swf_addbuttonrecordUpswf_endbutton
\ No newline at end of file diff --git a/function.swf-openfile.html b/function.swf-openfile.html new file mode 100644 index 0000000..4f41b65 --- /dev/null +++ b/function.swf-openfile.html @@ -0,0 +1,235 @@ +swf_openfile
PHP Manual
PrevNext

swf_openfile

(PHP4 >= 4.0RC2)

swf_openfile -- Open a new Shockwave Flash file

Description

void + swf_openfile + (string + filename, float + width, float + height, float + framerate, float + r, float + g, float + b)

The swf_openfile() function opens a new file + named filename with a width of + width and a height of + height a frame rate of + framerate and background with a red color + of r a green color of + g and a blue color of + b. +

The swf_openfile() must be the first function + you call, otherwise your script will cause a segfault. If you + want to send your output to the screen make the filename: + "php://stdout" (support for this is in 4.0.1 and up). +


PrevHomeNext
Shockwave Flash functionsUpswf_closefile
\ No newline at end of file diff --git a/function.swf-ortho.html b/function.swf-ortho.html new file mode 100644 index 0000000..d57a81d --- /dev/null +++ b/function.swf-ortho.html @@ -0,0 +1,187 @@ +swf_ortho
PHP Manual
PrevNext

swf_ortho

(PHP4 >= 4.0.1)

swf_ortho --  + Defines an orthographic mapping of user coordinates onto the + current viewport +

Description

void + swf_ortho + (double + xmin, double + xmax, double + ymin, double + ymax, double + zmin, double + zmax)

The swf_ortho() funcion defines a orthographic + mapping of user coordinates onto the current viewport. +


PrevHomeNext
swf_viewportUpswf_ortho2
\ No newline at end of file diff --git a/function.swf-ortho2.html b/function.swf-ortho2.html new file mode 100644 index 0000000..6b857f7 --- /dev/null +++ b/function.swf-ortho2.html @@ -0,0 +1,191 @@ +swf_ortho2
PHP Manual
PrevNext

swf_ortho2

(PHP4 >= 4.0RC2)

swf_ortho2 --  + Defines 2D orthographic mapping of user coordinates onto the + current viewport +

Description

void + swf_ortho2 + (double + xmin, double + xmax, double + ymin, double + ymax)

The swf_ortho2() function defines a two + dimensional orthographic mapping of user coordinates onto the + current viewport, this defaults to one to one mapping of the area + of the Flash movie. If a perspective transformation is desired, + the swf_perspective () function can be used. +


PrevHomeNext
swf_orthoUpswf_perspective
\ No newline at end of file diff --git a/function.swf-perspective.html b/function.swf-perspective.html new file mode 100644 index 0000000..bb02cb6 --- /dev/null +++ b/function.swf-perspective.html @@ -0,0 +1,224 @@ +swf_perspective
PHP Manual
PrevNext

swf_perspective

(PHP4 >= 4.0RC2)

swf_perspective --  + Define a perspective projection transformation +

Description

void + swf_perspective + (double + fovy, double + aspect, double + near, double + far)

The swf_perspective() function defines a + perspective projection transformation. The + fovy parameter is field-of-view angle in + the y direction. The aspect parameter + should be set to the aspect ratio of the viewport that is being + drawn onto. The near parameter is the + near clipping plane and the far parameter + is the far clipping plane. +

Note: + Various distortion artifacts may appear when performing a + perspective projection, this is because Flash players only have + a two dimensional matrix. Some are not to pretty. +


PrevHomeNext
swf_ortho2Upswf_polarview
\ No newline at end of file diff --git a/function.swf-placeobject.html b/function.swf-placeobject.html new file mode 100644 index 0000000..52a00df --- /dev/null +++ b/function.swf-placeobject.html @@ -0,0 +1,229 @@ +swf_placeobject
PHP Manual
PrevNext

swf_placeobject

(PHP4 >= 4.0RC2)

swf_placeobject -- Place an object onto the screen

Description

void + swf_placeobject + (int + objid, int + depth)

Places the object specified by objid in + the current frame at a depth of depth. + The objid parameter and the + depth must be between 1 and 65535. +

This uses the current mulcolor (specified by + swf_mulcolor()) and the current addcolor + (specified by swf_addcolor()) to color the + object and it uses the current matrix to position the object. +

Note: + Full RGBA colors are supported. +


PrevHomeNext
swf_addcolorUpswf_modifyobject
\ No newline at end of file diff --git a/function.swf-polarview.html b/function.swf-polarview.html new file mode 100644 index 0000000..477691c --- /dev/null +++ b/function.swf-polarview.html @@ -0,0 +1,215 @@ +swf_polarview
PHP Manual
PrevNext

swf_polarview

(PHP4 >= 4.0RC2)

swf_polarview --  + Define the viewer's position with polar coordinates +

Description

void + swf_polarview + (double + dist, double + azimuth, double + incidence, double + twist)

The swf_polarview() function defines the + viewer's position in polar coordinates. The + dist parameter gives the distance between + the viewpoint to the world space origin. The + azimuth parameter defines the azimuthal + angle in the x,y coordinate plane, measured in distance from the + y axis. The incidence parameter defines + the angle of incidence in the y,z plane, measured in distance + from the z axis. The incidence angle is defined as the angle of + the viewport relative to the z axis. Finally the + twist specifies the amount that the + viewpoint is to be rotated about the line of sight using the + right hand rule. +


PrevHomeNext
swf_perspectiveUpswf_lookat
\ No newline at end of file diff --git a/function.swf-popmatrix.html b/function.swf-popmatrix.html new file mode 100644 index 0000000..bc673c1 --- /dev/null +++ b/function.swf-popmatrix.html @@ -0,0 +1,180 @@ +swf_popmatrix
PHP Manual
PrevNext

swf_popmatrix

(PHP4 >= 4.0RC2)

swf_popmatrix --  + Restore a previous transformation matrix +

Description

void + swf_popmatrix + (void);

The swf_popmatrix() function pushes the + current transformation matrix back onto the stack. +


PrevHomeNext
swf_pushmatrixUpswf_scale
\ No newline at end of file diff --git a/function.swf-posround.html b/function.swf-posround.html new file mode 100644 index 0000000..eaf5c52 --- /dev/null +++ b/function.swf-posround.html @@ -0,0 +1,191 @@ +swf_posround
PHP Manual
PrevNext

swf_posround

(PHP4 >= 4.0RC2)

swf_posround --  + Enables or Disables the rounding of the translation when objects + are placed or moved +

Description

void + swf_posround + (int + round)

The swf_posround() function enables or + disables the rounding of the translation when objects are placed + or moved, there are times when text becomes more readable because + rounding has been enabled. The round is + whether to enable rounding or not, if set to the value of 1, then + rounding is enabled, if set to 0 then rounding is disabled. +


PrevHomeNext
swf_rotateUpSNMP functions
\ No newline at end of file diff --git a/function.swf-pushmatrix.html b/function.swf-pushmatrix.html new file mode 100644 index 0000000..27786c4 --- /dev/null +++ b/function.swf-pushmatrix.html @@ -0,0 +1,180 @@ +swf_pushmatrix
PHP Manual
PrevNext

swf_pushmatrix

(PHP4 >= 4.0RC2)

swf_pushmatrix --  + Push the current transformation matrix back unto the stack +

Description

void + swf_pushmatrix + (void);

The swf_pushmatrix() function pushes the + current transformation matrix back onto the stack. +


PrevHomeNext
swf_lookatUpswf_popmatrix
\ No newline at end of file diff --git a/function.swf-removeobject.html b/function.swf-removeobject.html new file mode 100644 index 0000000..002509f --- /dev/null +++ b/function.swf-removeobject.html @@ -0,0 +1,181 @@ +swf_removeobject
PHP Manual
PrevNext

swf_removeobject

(PHP4 >= 4.0RC2)

swf_removeobject -- Remove an object

Description

void + swf_removeobject + (int + depth)

Removes the object at the depth specified by + depth. +


PrevHomeNext
swf_modifyobjectUpswf_nextid
\ No newline at end of file diff --git a/function.swf-rotate.html b/function.swf-rotate.html new file mode 100644 index 0000000..4eaba45 --- /dev/null +++ b/function.swf-rotate.html @@ -0,0 +1,193 @@ +swf_rotate
PHP Manual
PrevNext

swf_rotate

(PHP4 >= 4.0RC2)

swf_rotate -- Rotate the current transformation

Description

void + swf_rotate + (double + angle, string + axis)

The swf_rotate() rotates the current + transformation by the angle given by the + angle parameter around the axis given by + the axis parameter. Valid values for the + axis are 'x' (the x axis), 'y' (the y axis) or 'z' (the z axis). +


PrevHomeNext
swf_translateUpswf_posround
\ No newline at end of file diff --git a/function.swf-scale.html b/function.swf-scale.html new file mode 100644 index 0000000..1a33337 --- /dev/null +++ b/function.swf-scale.html @@ -0,0 +1,199 @@ +swf_scale
PHP Manual
PrevNext

swf_scale

(PHP4 >= 4.0RC2)

swf_scale -- Scale the current transformation

Description

void + swf_scale + (double + x, double + y, double + z)

The swf_scale() scales the x coordinate of the + curve by the value of the x parameter, the + y coordinate of the curve by the value of the + y parameter, and the z coordinate of the + curve by the value of the z parameter. +


PrevHomeNext
swf_popmatrixUpswf_translate
\ No newline at end of file diff --git a/function.swf-setfont.html b/function.swf-setfont.html new file mode 100644 index 0000000..353bda0 --- /dev/null +++ b/function.swf-setfont.html @@ -0,0 +1,184 @@ +swf_setfont
PHP Manual
PrevNext

swf_setfont

(PHP4 >= 4.0RC2)

swf_setfont -- Change the current font

Description

void + swf_setfont + (int + fontid)

The swf_setfont() sets the current font to the + value given by the fontid parameter. +


PrevHomeNext
swf_definefontUpswf_fontsize
\ No newline at end of file diff --git a/function.swf-setframe.html b/function.swf-setframe.html new file mode 100644 index 0000000..f6be85d --- /dev/null +++ b/function.swf-setframe.html @@ -0,0 +1,184 @@ +swf_setframe
PHP Manual
PrevNext

swf_setframe

(PHP4 >= 4.0RC2)

swf_setframe -- Switch to a specified frame

Description

void + swf_setframe + (int + framenumber)

The swf_setframe() changes the active frame to + the frame specified by framenumber. +


PrevHomeNext
swf_showframeUpswf_getframe
\ No newline at end of file diff --git a/function.swf-shapearc.html b/function.swf-shapearc.html new file mode 100644 index 0000000..00111b7 --- /dev/null +++ b/function.swf-shapearc.html @@ -0,0 +1,213 @@ +swf_shapearc
PHP Manual
PrevNext

swf_shapearc

(PHP4 >= 4.0RC2)

swf_shapearc -- Draw a circular arc

Description

void + swf_shapearc + (float + x, float + y, float + r, float + ang1, float + ang2)

The swf_shapeArc() function draws a circular + arc from angle A given by the ang1 + parameter to angle B given by the ang2 + parameter. The center of the circle has an x coordinate given by + the x parameter and a y coordinate given + by the y, the radius of the circle is + given by the r parameter. +


PrevHomeNext
swf_shapecurveto3Upswf_endshape
\ No newline at end of file diff --git a/function.swf-shapecurveto.html b/function.swf-shapecurveto.html new file mode 100644 index 0000000..21b0f6f --- /dev/null +++ b/function.swf-shapecurveto.html @@ -0,0 +1,220 @@ +swf_shapecurveto
PHP Manual
PrevNext

swf_shapecurveto

(PHP4 >= 4.0RC2)

swf_shapecurveto --  + Draw a quadratic bezier curve between two points +

Description

void + swf_shapecurveto + (float + x1, float + y1, float + x2, float + y2)

The swf_shapecurveto() function draws a + quadratic bezier curve from the x coordinate given by + x1 and the y coordinate given by + y1 to the x coordinate given by + x2 and the y coordinate given by + y2. The current position is then set to + the x,y coordinates given by the x2 and + y2 parameters +


PrevHomeNext
swf_shapelinetoUpswf_shapecurveto3
\ No newline at end of file diff --git a/function.swf-shapecurveto3.html b/function.swf-shapecurveto3.html new file mode 100644 index 0000000..e1ad0c9 --- /dev/null +++ b/function.swf-shapecurveto3.html @@ -0,0 +1,227 @@ +swf_shapecurveto3
PHP Manual
PrevNext

swf_shapecurveto3

(PHP4 >= 4.0RC2)

swf_shapecurveto3 -- Draw a cubic bezier curve

Description

void + swf_shapecurveto3 + (float + x1, float + y1, float + x2, float + y2, float + x3, float + y3)

Draw a cubic bezier curve using the x,y coordinate pairs + x1, y1 and + x2,y2 as off curve + control points and the x,y coordinate + x3, y3 as an + endpoint. The current position is then set to the x,y coordinate + pair given by + x3,y3. +


PrevHomeNext
swf_shapecurvetoUpswf_shapearc
\ No newline at end of file diff --git a/function.swf-shapefillbitmapclip.html b/function.swf-shapefillbitmapclip.html new file mode 100644 index 0000000..44d2305 --- /dev/null +++ b/function.swf-shapefillbitmapclip.html @@ -0,0 +1,184 @@ +swf_shapefillbitmapclip
PHP Manual
PrevNext

swf_shapefillbitmapclip

(PHP4 >= 4.0RC2)

swf_shapefillbitmapclip --  + Set current fill mode to clipped bitmap +

Description

void + swf_shapefillbitmapclip + (int + bitmapid)

Sets the fill to bitmap clipped, empty spaces will be filled by + the bitmap given by the bitmapid + parameter. +


PrevHomeNext
swf_shapefillsolidUpswf_shapefillbitmaptile
\ No newline at end of file diff --git a/function.swf-shapefillbitmaptile.html b/function.swf-shapefillbitmaptile.html new file mode 100644 index 0000000..89f90c9 --- /dev/null +++ b/function.swf-shapefillbitmaptile.html @@ -0,0 +1,184 @@ +swf_shapefillbitmaptile
PHP Manual
PrevNext

swf_shapefillbitmaptile

(PHP4 >= 4.0RC2)

swf_shapefillbitmaptile --  + Set current fill mode to tiled bitmap +

Description

void + swf_shapefillbitmaptile + (int + bitmapid)

Sets the fill to bitmap tile, empty spaces will be filled by the + bitmap given by the bitmapid parameter + (tiled). +


PrevHomeNext
swf_shapefillbitmapclipUpswf_shapemoveto
\ No newline at end of file diff --git a/function.swf-shapefilloff.html b/function.swf-shapefilloff.html new file mode 100644 index 0000000..a3cc8b4 --- /dev/null +++ b/function.swf-shapefilloff.html @@ -0,0 +1,178 @@ +swf_shapefilloff
PHP Manual
PrevNext

swf_shapefilloff

(PHP4 >= 4.0RC2)

swf_shapefilloff -- Turns off filling

Description

void + swf_shapefilloff + (void);

The swf_shapeFillOff() function turns off + filling for the current shape. +


PrevHomeNext
swf_shapelinesolidUpswf_shapefillsolid
\ No newline at end of file diff --git a/function.swf-shapefillsolid.html b/function.swf-shapefillsolid.html new file mode 100644 index 0000000..3cb2e6f --- /dev/null +++ b/function.swf-shapefillsolid.html @@ -0,0 +1,190 @@ +swf_shapefillsolid
PHP Manual
PrevNext

swf_shapefillsolid

(PHP4 >= 4.0RC2)

swf_shapefillsolid --  + Set the current fill style to the specified color +

Description

void + swf_shapefillsolid + (float + r, float + g, float + b, float + a)

The swf_shapeFillSolid() function sets the + current fill style to solid, and then sets the fill color to the + values of the rgba parameters. +


PrevHomeNext
swf_shapefilloffUpswf_shapefillbitmapclip
\ No newline at end of file diff --git a/function.swf-shapelinesold.html b/function.swf-shapelinesold.html new file mode 100644 index 0000000..480b62c --- /dev/null +++ b/function.swf-shapelinesold.html @@ -0,0 +1,196 @@ +swf_shapelinesolid
PHP Manual
PrevNext

swf_shapelinesolid

(PHP4 >= 4.0RC2)

swf_shapelinesolid -- Set the current line style

Description

void + swf_shapelinesolid + (float + r, float + g, float + b, float + a, float + width)

The swf_shapeLineSolid() function sets the + current line style to the color of the + rgba parameters and width to the + width parameter. If 0.0 is given as a + width then no lines are drawn. +


PrevHomeNext
swf_startshapeUpswf_shapefilloff
\ No newline at end of file diff --git a/function.swf-shapelineto.html b/function.swf-shapelineto.html new file mode 100644 index 0000000..11aedc0 --- /dev/null +++ b/function.swf-shapelineto.html @@ -0,0 +1,192 @@ +swf_shapelineto
PHP Manual
PrevNext

swf_shapelineto

(PHP4 >= 4.0RC2)

swf_shapelineto -- Draw a line

Description

void + swf_shapelineto + (float + x, float + y)

The swf_shapeLineTo() draws a line to the x,y + coordinates given by the x parameter & the + y parameter. The current position is then + set to the x,y parameters. +


PrevHomeNext
swf_shapemovetoUpswf_shapecurveto
\ No newline at end of file diff --git a/function.swf-shapemoveto.html b/function.swf-shapemoveto.html new file mode 100644 index 0000000..f85f715 --- /dev/null +++ b/function.swf-shapemoveto.html @@ -0,0 +1,192 @@ +swf_shapemoveto
PHP Manual
PrevNext

swf_shapemoveto

(PHP4 >= 4.0RC2)

swf_shapemoveto -- Move the current position

Description

void + swf_shapemoveto + (float + x, float + y)

The swf_shapeMoveTo() function moves the + current position to the x coordinate given by the + x parameter and the y position given by + the y parameter. +


PrevHomeNext
swf_shapefillbitmaptileUpswf_shapelineto
\ No newline at end of file diff --git a/function.swf-showframe.html b/function.swf-showframe.html new file mode 100644 index 0000000..a8a853e --- /dev/null +++ b/function.swf-showframe.html @@ -0,0 +1,174 @@ +swf_showframe
PHP Manual
PrevNext

swf_showframe

(PHP4 >= 4.0RC2)

swf_showframe -- Display the current frame

Description

void + swf_showframe + (void);

The swf_showframe function will output the current frame. +


PrevHomeNext
swf_labelframeUpswf_setframe
\ No newline at end of file diff --git a/function.swf-startbutton.html b/function.swf-startbutton.html new file mode 100644 index 0000000..785b9e2 --- /dev/null +++ b/function.swf-startbutton.html @@ -0,0 +1,189 @@ +swf_startbutton
PHP Manual
PrevNext

swf_startbutton

(PHP4 >= 4.0RC2)

swf_startbutton -- Start the definition of a button

Description

void + swf_startbutton + (int + objid, int + type)

The swf_startbutton() function starts off the + definition of a button. The type + parameter can either be TYPE_MENUBUTTON or TYPE_PUSHBUTTON. The + TYPE_MENUBUTTON constant allows the focus to travel from the + button when the mouse is down, TYPE_PUSHBUTTON does not allow the + focus to travel when the mouse is down. +


PrevHomeNext
swf_endsymbolUpswf_addbuttonrecord
\ No newline at end of file diff --git a/function.swf-startdoaction.html b/function.swf-startdoaction.html new file mode 100644 index 0000000..351f433 --- /dev/null +++ b/function.swf-startdoaction.html @@ -0,0 +1,181 @@ +swf_startdoaction
PHP Manual
PrevNext

swf_startdoaction

(PHP4 >= 4.0RC2)

swf_startdoaction --  + Start a description of an action list for the current frame +

Description

void + swf_startdoaction + (void);

The swf_startdoaction() function starts the + description of an action list for the current frame. This must + be called before actions are defined for the current frame. +


PrevHomeNext
swf_nextidUpswf_actiongotoframe
\ No newline at end of file diff --git a/function.swf-startshape.html b/function.swf-startshape.html new file mode 100644 index 0000000..63dfd20 --- /dev/null +++ b/function.swf-startshape.html @@ -0,0 +1,185 @@ +swf_startshape
PHP Manual
PrevNext

swf_startshape

(PHP4 >= 4.0RC2)

swf_startshape -- Start a complex shape

Description

void + swf_startshape + (int + objid)

The swf_startshape() function starts a complex + shape, with an object id given by the + objid parameter. +


PrevHomeNext
swf_definepolyUpswf_shapelinesolid
\ No newline at end of file diff --git a/function.swf-startsymbol.html b/function.swf-startsymbol.html new file mode 100644 index 0000000..75103ca --- /dev/null +++ b/function.swf-startsymbol.html @@ -0,0 +1,183 @@ +swf_startsymbol
PHP Manual
PrevNext

swf_startsymbol

(PHP4 >= 4.0RC2)

swf_startsymbol -- Define a symbol

Description

void + swf_startsymbol + (int + objid)

Define an object id as a symbol. Symbols are tiny flash movies + that can be played simultaneously. The + objid parameter is the object id you want + to define as a symbol. +


PrevHomeNext
swf_getbitmapinfoUpswf_endsymbol
\ No newline at end of file diff --git a/function.swf-textwidth.html b/function.swf-textwidth.html new file mode 100644 index 0000000..06bcad8 --- /dev/null +++ b/function.swf-textwidth.html @@ -0,0 +1,185 @@ +swf_textwidth
PHP Manual
PrevNext

swf_textwidth

(PHP4 >= 4.0RC2)

swf_textwidth -- Get the width of a string

Description

float + swf_textwidth + (string + str)

The swf_textwidth() function gives the width + of the string, str, in pixels, using the + current font and font size. +


PrevHomeNext
swf_definetextUpswf_definebitmap
\ No newline at end of file diff --git a/function.swf-translate.html b/function.swf-translate.html new file mode 100644 index 0000000..eb1e1e8 --- /dev/null +++ b/function.swf-translate.html @@ -0,0 +1,198 @@ +swf_translate
PHP Manual
PrevNext

swf_translate

(PHP4 >= 4.0RC2)

swf_translate -- Translate the current transformations

Description

void + swf_translate + (double + x, double + y, double + z)

The swf_translate() function translates the + current transformation by the x, + y, and z values + given. +


PrevHomeNext
swf_scaleUpswf_rotate
\ No newline at end of file diff --git a/function.swf-viewport.html b/function.swf-viewport.html new file mode 100644 index 0000000..cd8447c --- /dev/null +++ b/function.swf-viewport.html @@ -0,0 +1,205 @@ +swf_viewport
PHP Manual
PrevNext

swf_viewport

(PHP4 >= 4.0RC2)

swf_viewport -- Select an area for future drawing

Description

void + swf_viewport + (double + xmin, double + xmax, double + ymin, double + ymax)

The swf_viewport() function selects an area + for future drawing for xmin to + xmax and ymin to + ymax, if this function is not called the + area defaults to the size of the screen. +


PrevHomeNext
swf_endbuttonUpswf_ortho
\ No newline at end of file diff --git a/function.sybase-affected-rows.html b/function.sybase-affected-rows.html new file mode 100644 index 0000000..5ee362d --- /dev/null +++ b/function.sybase-affected-rows.html @@ -0,0 +1,203 @@ +sybase_affected_rows
PHP Manual
PrevNext

sybase_affected_rows

(PHP3 >= 3.0.6, PHP4 )

sybase_affected_rows -- get number of affected rows in last query

Description

int sybase_affected_rows ([int link_identifier])

Returns: The number of affected rows by the last query.

sybase_affected_rows() returns the number of + rows affected by the last INSERT, UPDATE or DELETE query on the + server associated with the specified link identifier. If the + link identifier isn't specified, the last opened link is assumed.

This command is not effective for SELECT statements, only on + statements which modify records. To retrieve the number of rows + returned from a SELECT, use sybase_num_rows(). +

Note: + This function is only available using the CT library interface + to Sybase, and not the DB library. +


PrevHomeNext
Sybase functionsUpsybase_close
\ No newline at end of file diff --git a/function.sybase-close.html b/function.sybase-close.html new file mode 100644 index 0000000..6adf357 --- /dev/null +++ b/function.sybase-close.html @@ -0,0 +1,202 @@ +sybase_close
PHP Manual
PrevNext

sybase_close

(PHP3 , PHP4 )

sybase_close -- close Sybase connection

Description

int sybase_close (int link_identifier)

Returns: true on success, false on error +

sybase_close() closes the link to a Sybase database that's + associated with the specified link identifier. If the link + identifier isn't specified, the last opened link is assumed. +

Note that this isn't usually necessary, as non-persistent + open links are automatically closed at the end of the script's + execution. +

sybase_close() will not close persistent links generated by + sybase_pconnect(). +

See also: sybase_connect(), + sybase_pconnect(). +


PrevHomeNext
sybase_affected_rowsUpsybase_connect
\ No newline at end of file diff --git a/function.sybase-connect.html b/function.sybase-connect.html new file mode 100644 index 0000000..d2efc34 --- /dev/null +++ b/function.sybase-connect.html @@ -0,0 +1,210 @@ +sybase_connect
PHP Manual
PrevNext

sybase_connect

(PHP3 , PHP4 )

sybase_connect -- open Sybase server connection

Description

int sybase_connect (string servername, string username, string password)

Returns: A positive Sybase link identifier on success, or + false on error. +

sybase_connect() establishes a connection to a Sybase server. + The servername argument has to be a valid servername that is defined + in the 'interfaces' file. +

In case a second call is made to sybase_connect() with the + same arguments, no new link will be established, but instead, the + link identifier of the already opened link will be returned. +

The link to the server will be closed as soon as the + execution of the script ends, unless it's closed earlier by + explicitly calling sybase_close(). +

See also sybase_pconnect(), + sybase_close(). +


PrevHomeNext
sybase_closeUpsybase_data_seek
\ No newline at end of file diff --git a/function.sybase-data-seek.html b/function.sybase-data-seek.html new file mode 100644 index 0000000..4d6dd0b --- /dev/null +++ b/function.sybase-data-seek.html @@ -0,0 +1,190 @@ +sybase_data_seek
PHP Manual
PrevNext

sybase_data_seek

(PHP3 , PHP4 )

sybase_data_seek -- move internal row pointer

Description

int sybase_data_seek (int result_identifier, int row_number)

Returns: true on success, false on failure +

sybase_data_seek() moves the internal row pointer of the + Sybase result associated with the specified result identifier to + pointer to the specifyed row number. The next call to + sybase_fetch_row() would return that row. +

See also: sybase_data_seek(). +


PrevHomeNext
sybase_connectUpsybase_fetch_array
\ No newline at end of file diff --git a/function.sybase-fetch-array.html b/function.sybase-fetch-array.html new file mode 100644 index 0000000..f17c49d --- /dev/null +++ b/function.sybase-fetch-array.html @@ -0,0 +1,199 @@ +sybase_fetch_array
PHP Manual
PrevNext

sybase_fetch_array

(PHP3 , PHP4 )

sybase_fetch_array -- fetch row as array

Description

int sybase_fetch_array (int result)

Returns: An array that corresponds to the fetched row, or + false if there are no more rows. +

sybase_fetch_array() is an extended version of + sybase_fetch_row(). In addition to storing the + data in the numeric indices of the result array, it also stores + the data in associative indices, using the field names as keys. +

An important thing to note is that using sybase_fetch_array() is + NOT significantly slower than using sybase_fetch_row(), while it + provides a significant added value.

For further details, also see + sybase_fetch_row() +


PrevHomeNext
sybase_data_seekUpsybase_fetch_field
\ No newline at end of file diff --git a/function.sybase-fetch-field.html b/function.sybase-fetch-field.html new file mode 100644 index 0000000..2e1818d --- /dev/null +++ b/function.sybase-fetch-field.html @@ -0,0 +1,215 @@ +sybase_fetch_field
PHP Manual
PrevNext

sybase_fetch_field

(PHP3 , PHP4 )

sybase_fetch_field -- get field information

Description

object sybase_fetch_field (int result, int field_offset)

Returns an object containing field information. +

sybase_fetch_field() can be used in order to obtain information about + fields in a certain query result. If the field offset isn't + specified, the next field that wasn't yet retreived by + sybase_fetch_field() is retreived. +

The properties of the object are: +

  • name - column name. if the column is a result of a function, this property is set to computed#N, + where #N is a serial number. +

  • column_source - the table from which the column was taken +

  • max_length - maximum length of the column +

  • numeric - 1 if the column is numeric +

See also sybase_field_seek() +


PrevHomeNext
sybase_fetch_arrayUpsybase_fetch_object
\ No newline at end of file diff --git a/function.sybase-fetch-object.html b/function.sybase-fetch-object.html new file mode 100644 index 0000000..fd4043a --- /dev/null +++ b/function.sybase-fetch-object.html @@ -0,0 +1,219 @@ +sybase_fetch_object
PHP Manual
PrevNext

sybase_fetch_object

(PHP3 , PHP4 )

sybase_fetch_object -- fetch row as object

Description

int sybase_fetch_object (int result)

Returns: An object with properties that correspond to the + fetched row, or false if there are no more rows. +

sybase_fetch_object() is similar to + sybase_fetch_array(), with one difference - an + object is returned, instead of an array. Indirectly, that means + that you can only access the data by the field names, and not by + their offsets (numbers are illegal property names).

Speed-wise, the function is identical to + sybase_fetch_array(), and almost as quick as + sybase_fetch_row() (the difference is + insignificant). +

See also: sybase_fetch-array() and + sybase_fetch-row(). +


PrevHomeNext
sybase_fetch_fieldUpsybase_fetch_row
\ No newline at end of file diff --git a/function.sybase-fetch-row.html b/function.sybase-fetch-row.html new file mode 100644 index 0000000..8f220d6 --- /dev/null +++ b/function.sybase-fetch-row.html @@ -0,0 +1,217 @@ +sybase_fetch_row
PHP Manual
PrevNext

sybase_fetch_row

(PHP3 , PHP4 )

sybase_fetch_row -- get row as enumerated array

Description

array sybase_fetch_row (int result)

Returns: An array that corresponds to the fetched row, or + false if there are no more rows. +

sybase_fetch_row() fetches one row of data from the result + associated with the specified result identifier. The row is + returned as an array. Each result column is stored in an array + offset, starting at offset 0. +

Subsequent call to sybase_fetch_rows() would return the next row + in the result set, or false if there are no more rows. +

See also: sybase_fetch_array(), + sybase_fetch_object(), + sybase_data_seek(), + sybase_fetch_lengths(), and + sybase_result(). +


PrevHomeNext
sybase_fetch_objectUpsybase_field_seek
\ No newline at end of file diff --git a/function.sybase-field-seek.html b/function.sybase-field-seek.html new file mode 100644 index 0000000..d8a6c93 --- /dev/null +++ b/function.sybase-field-seek.html @@ -0,0 +1,189 @@ +sybase_field_seek
PHP Manual
PrevNext

sybase_field_seek

(PHP3 , PHP4 )

sybase_field_seek -- set field offset

Description

int sybase_field_seek (int result, int field_offset)

Seeks to the specified field offset. If the next call to + sybase_fetch_field() won't include a field + offset, this field would be returned.

See also: sybase_fetch_field().


PrevHomeNext
sybase_fetch_rowUpsybase_free_result
\ No newline at end of file diff --git a/function.sybase-free-result.html b/function.sybase-free-result.html new file mode 100644 index 0000000..10c027a --- /dev/null +++ b/function.sybase-free-result.html @@ -0,0 +1,183 @@ +sybase_free_result
PHP Manual
PrevNext

sybase_free_result

(PHP3 , PHP4 )

sybase_free_result -- free result memory

Description

int sybase_free_result (int result)

sybase_free_result() only needs to be called + if you are worried about using too much memory while your script + is running. All result memory will automatically be freed when + the script ends. You may call sybase_free_result() + with the result identifier as an argument and the associated + result memory will be freed. +


PrevHomeNext
sybase_field_seekUpsybase_num_fields
\ No newline at end of file diff --git a/function.sybase-num-fields.html b/function.sybase-num-fields.html new file mode 100644 index 0000000..c3d4afb --- /dev/null +++ b/function.sybase-num-fields.html @@ -0,0 +1,202 @@ +sybase_num_fields
PHP Manual
PrevNext

sybase_num_fields

(PHP3 , PHP4 )

sybase_num_fields -- get number of fields in result

Description

int sybase_num_fields (int result)

sybase_num_fields() returns the number of fields in a result + set. +

+ See also: + sybase_db_query(), + sybase_query(), + sybase_fetch_field(), + sybase_num_rows(). +


PrevHomeNext
sybase_free_resultUpsybase_num_rows
\ No newline at end of file diff --git a/function.sybase-num-rows.html b/function.sybase-num-rows.html new file mode 100644 index 0000000..ee0a90b --- /dev/null +++ b/function.sybase-num-rows.html @@ -0,0 +1,193 @@ +sybase_num_rows
PHP Manual
PrevNext

sybase_num_rows

(PHP3 , PHP4 )

sybase_num_rows -- get number of rows in result

Description

int sybase_num_rows (string result)

sybase_num_rows() returns the number of rows in a result set. +

See also: + sybase_db_query(), + sybase_query() and, + sybase_fetch_row(). +


PrevHomeNext
sybase_num_fieldsUpsybase_pconnect
\ No newline at end of file diff --git a/function.sybase-pconnect.html b/function.sybase-pconnect.html new file mode 100644 index 0000000..6e3e5eb --- /dev/null +++ b/function.sybase-pconnect.html @@ -0,0 +1,206 @@ +sybase_pconnect
PHP Manual
PrevNext

sybase_pconnect

(PHP3 , PHP4 )

sybase_pconnect -- open persistent Sybase connection

Description

int sybase_pconnect (string servername, string username, string password)

+ Returns: A positive Sybase persistent link identifier on success, + or false on error

sybase_pconnect() acts very much like + sybase_connect() with two major differences.

+ First, when connecting, the function would first try to find a + (persistent) link that's already open with the same host, + username and password. If one is found, an identifier for it + will be returned instead of opening a new connection.

+ Second, the connection to the SQL server will not be closed when + the execution of the script ends. Instead, the link will remain + open for future use (sybase_close() will not + close links established by sybase_pconnect()).

+ This type of links is therefore called 'persistent'.


PrevHomeNext
sybase_num_rowsUpsybase_query
\ No newline at end of file diff --git a/function.sybase-query.html b/function.sybase-query.html new file mode 100644 index 0000000..514acca --- /dev/null +++ b/function.sybase-query.html @@ -0,0 +1,208 @@ +sybase_query
PHP Manual
PrevNext

sybase_query

(PHP3 , PHP4 )

sybase_query -- send Sybase query

Description

int sybase_query (string query, int link_identifier)

Returns: A positive Sybase result identifier on success, or + false on error. +

sybase_query() sends a query to the currently active + database on the server that's associated with the specified link + identifier. If the link identifier isn't specified, the last + opened link is assumed. If no link is open, the function tries to + establish a link as if sybase_connect() was + called, and use it. +

See also: + sybase_db_query(), + sybase_select_db(), and + sybase_connect(). +


PrevHomeNext
sybase_pconnectUpsybase_result
\ No newline at end of file diff --git a/function.sybase-result.html b/function.sybase-result.html new file mode 100644 index 0000000..ceaa8cb --- /dev/null +++ b/function.sybase-result.html @@ -0,0 +1,214 @@ +sybase_result
PHP Manual
PrevNext

sybase_result

(PHP3 , PHP4 )

sybase_result -- get result data

Description

int sybase_result (int result, int row, mixed field)

Returns: The contents of the cell at the row and offset in + the specified Sybase result set. +

sybase_result() returns the contents of one cell from a Sybase + result set. The field argument can be the field's offset, or the + field's name, or the field's table dot field's name + (tablename.fieldname). If the column name has been aliased + ('select foo as bar from...'), use the alias instead of the + column name. +

When working on large result sets, you should consider using one + of the functions that fetch an entire row (specified below). As + these functions return the contents of multiple cells in one + function call, they're MUCH quicker than sybase_result(). Also, + note that specifying a numeric offset for the field argument is + much quicker than specifying a fieldname or tablename.fieldname + argument. +

Recommended high-performance alternatives: + sybase_fetch_row(), + sybase_fetch_array(), and + sybase_fetch_object(). +


PrevHomeNext
sybase_queryUpsybase_select_db
\ No newline at end of file diff --git a/function.sybase-select-db.html b/function.sybase-select-db.html new file mode 100644 index 0000000..ad28376 --- /dev/null +++ b/function.sybase-select-db.html @@ -0,0 +1,219 @@ +sybase_select_db
PHP Manual
PrevNext

sybase_select_db

(PHP3 , PHP4 )

sybase_select_db -- select Sybase database

Description

int sybase_select_db (string database_name, int link_identifier)

Returns: true on success, false on error +

sybase_select_db() sets the current active database on the + server that's associated with the specified link identifier. If + no link identifier is specified, the last opened link is assumed. + If no link is open, the function will try to establish a link as + if sybase_connect() was called, and use it. +

Every subsequent call to sybase_query() will be + made on the active database. +

See also: + sybase_connect(), + sybase_pconnect(), and + sybase_query() +


PrevHomeNext
sybase_resultUpURL Functions
\ No newline at end of file diff --git a/function.symlink.html b/function.symlink.html new file mode 100644 index 0000000..a3334af --- /dev/null +++ b/function.symlink.html @@ -0,0 +1,222 @@ +symlink
PHP Manual
PrevNext

symlink

(PHP3 , PHP4 )

symlink -- Creates a symbolic link

Description

int symlink (string target, string link)

symlink() creates a symbolic link + from the existing target with + the specified name link. +

See also link() to create hard links, + and readlink() along with + linkinfo(). +

Note: + This function does not work on Windows systems. +


PrevHomeNext
realpathUptempnam
\ No newline at end of file diff --git a/function.syslog.html b/function.syslog.html new file mode 100644 index 0000000..8cf69ef --- /dev/null +++ b/function.syslog.html @@ -0,0 +1,409 @@ +syslog
PHP Manual
PrevNext

syslog

(PHP3 , PHP4 )

syslog -- Generate a system log message

Description

int syslog (int priority, string message)

Syslog() generates a log message that will be + distributed by the system logger. + priority is a combination of the facility + and the level, values for which are given in the next section. + The remaining argument is the message to send, except that the + two characters %m will be replaced by the + error message string (strerror) corresponding to the present + value of errno. +

Table 1. Syslog() Priorities (in descending order)

ConstantDescription
LOG_EMERGsystem is unusable
LOG_ALERTaction must be taken immediately
LOG_CRITcritical conditions
LOG_ERRerror conditions
LOG_WARNINGwarning conditions
LOG_NOTICEnormal, but significant, condition
LOG_INFOinformational message
LOG_DEBUGdebug-level message
+

Example 1. Using syslog()


<?php
+define_syslog_variables();
+// open syslog, include the process ID and also send
+// the log to standard error, and use a user defined
+// logging mechanism
+openlog("myScripLog", LOG_PID | LOG_PERROR, LOG_LOCAL0);
+
+// some code
+
+if (authorized_client()) {
+    // do something
+} else {
+    // unauthorized client!
+    // log the attempt
+    $access = date("Y/m/d H:i:s");
+    syslog(LOG_WARNING,"Unauthorized client: $access $REMOTE_ADDR ($HTTP_USER_AGENT)");
+}
+
+closelog();
+?>
+      
+ For information on setting up a user defined log handler, see the + syslog.conf(5) Unix manual page. More + information on the syslog facilities and option can be found in the man + pages for syslog(3) on Unix machines. +

On Windows NT, the syslog service is emulated using the Event + Log. +

See also define_syslog_variables(), + openlog() and + closelog(). +


PrevHomeNext
socket_set_timeoutUpUnified ODBC functions
\ No newline at end of file diff --git a/function.system.html b/function.system.html new file mode 100644 index 0000000..cbdb59d --- /dev/null +++ b/function.system.html @@ -0,0 +1,249 @@ +system
PHP Manual
PrevNext

system

(PHP3 , PHP4 )

system -- Execute an external program and display output

Description

string system (string command [, int + return_var])

System() is just like the C version of the + function in that it executes the given + command and outputs the result. If a + variable is provided as the second argument, then the return + status code of the executed command will be written to this + variable. +

Note, that if you are going to allow data coming from user input + to be passed to this function, then you should be using the + EscapeShellCmd() function to make sure that + users cannot trick the system into executing arbitrary + commands. +

Note also that if you start a program using this function and want + to leave it running in the background, you have to make sure that + the output of that program is redirected to a file or some other + output stream or else PHP will hang until the execution of the + program ends. +

The System() call also tries to automatically + flush the web server's output buffer after each line of output if + PHP is running as a server module. +

Returns the last line of the command output on success, and false + on failure. +

If you need to execute a command and have all the data from the + command passed directly back without any interference, use the + PassThru() function. +

See also exec(), + PassThru(), popen(), + EscapeShellCmd(), and the backtick operator. +


PrevHomeNext
passthruUpPspell Functions
\ No newline at end of file diff --git a/function.tan.html b/function.tan.html new file mode 100644 index 0000000..a6f72f2 --- /dev/null +++ b/function.tan.html @@ -0,0 +1,187 @@ +tan
PHP Manual
PrevNext

tan

(PHP3 , PHP4 )

tan -- Tangent

Description

float tan (float arg)

Returns the tangent of arg in radians. +

See also sin() and cos(). +


PrevHomeNext
srandUpMCAL functions
\ No newline at end of file diff --git a/function.tempnam.html b/function.tempnam.html new file mode 100644 index 0000000..a586082 --- /dev/null +++ b/function.tempnam.html @@ -0,0 +1,250 @@ +tempnam
PHP Manual
PrevNext

tempnam

(PHP3 , PHP4 )

tempnam -- Creates unique file name

Description

string tempnam (string dir, string prefix)

Creates a unique temporary filename in the specified directory. + If the directory does not exist, tempnam() may + generate a filename in the system's temporary directory. +

The behaviour of the tempnam() function is + system dependent. On Windows the TMP environment variable will + override the dir parameter, on Linux the + TMPDIR environment variable has precedence, while SVR4 will always + use your dir parameter if the directory it + points to exists. Consult your system documentation on the + tempnam(3) function if in doubt. +

Returns the new temporary filename, or the null string on + failure. +

Example 1. Tempnam() example


$tmpfname = tempnam ("/tmp", "FOO");
+      
+

See also tmpfile(). +


PrevHomeNext
symlinkUptmpfile
\ No newline at end of file diff --git a/function.textdomain.html b/function.textdomain.html new file mode 100644 index 0000000..4734456 --- /dev/null +++ b/function.textdomain.html @@ -0,0 +1,183 @@ +textdomain
PHP Manual
PrevNext

textdomain

(PHP3 >= 3.0.7, PHP4 )

textdomain -- Sets the default domain

Description

int textdomain ([string + library])

This function sets the domain to search within when calls are + made to gettext(), usually the named after an + application. The previous default domain is returned. Call it + with no parameters to get the current setting without changing + it. +


PrevHomeNext
gettextUpHTTP functions
\ No newline at end of file diff --git a/function.time.html b/function.time.html new file mode 100644 index 0000000..bd215d3 --- /dev/null +++ b/function.time.html @@ -0,0 +1,182 @@ +time
PHP Manual
PrevNext

time

(PHP3 , PHP4 )

time -- Return current UNIX timestamp

Description

int time(void);

Returns the current time measured in the number of seconds since + the Unix Epoch (January 1 1970 00:00:00 GMT). +

See also date(). +


PrevHomeNext
strftimeUpstrtotime
\ No newline at end of file diff --git a/function.tmpfile.html b/function.tmpfile.html new file mode 100644 index 0000000..f29b706 --- /dev/null +++ b/function.tmpfile.html @@ -0,0 +1,208 @@ +tmpfile
PHP Manual
PrevNext

tmpfile

(PHP3 >= 3.0.13, PHP4 >= 4.0b4)

tmpfile -- Creates a temporary file

Description

int tmpfile (void)

Creates a temporary file with an unique name in write mode, + returning a file handle similar to the one returned by + fopen(). + The file is automatically removed when closed (using + fclose()), or when the script ends. +

For details, consult your system documentation on the + tmpfile(3) function, as well as the + stdio.h header file. +

See also tempnam(). +


PrevHomeNext
tempnamUptouch
\ No newline at end of file diff --git a/function.touch.html b/function.touch.html new file mode 100644 index 0000000..a130abc --- /dev/null +++ b/function.touch.html @@ -0,0 +1,224 @@ +touch
PHP Manual
PrevNext

touch

(PHP3 , PHP4 )

touch -- Sets modification time of file

Description

int touch (string filename [, int + time])

Attempts to set the modification time of the file named by + filename to the value given by time. If the option time is not + given, uses the present time. +

If the file does not exist, it is created. +

Returns true on success and false otherwise. +

Example 1. Touch() example


if (touch ($FileName)) {
+    print "$FileName modification time has been 
+           changed to todays date and time";
+} else {
+    print "Sorry Could Not change modification time of $FileName";
+}
+      
+


PrevHomeNext
tmpfileUpumask
\ No newline at end of file diff --git a/function.trigger-error.html b/function.trigger-error.html new file mode 100644 index 0000000..d61a381 --- /dev/null +++ b/function.trigger-error.html @@ -0,0 +1,260 @@ +trigger_error
PHP Manual
PrevNext

trigger_error

(PHP4 >= 4.0.1)

trigger_error --  + Generates a user-level error/warning/notice message +

Description

void trigger_error (string error_msg [, int + error_type])

Used to trigger a user error condition, it can be used by in conjunction + with the built-in error handler, or with a user defined function that has + been set as the new error handler + (set_error_handler()). This function is useful when + you need to generate a particular response to an exception at runtime. + For example: +


if (assert ($divisor == 0))
+   trigger_error ("Cannot divide by zero", E_USER_ERROR);
+      

+

Note: + See set_error_handler() for a more extensive example. +

+

See also error_reporting(), + set_error_handler(), + restore_error_handler(), + user_error() +


PrevHomeNext
set_error_handlerUpuser_error
\ No newline at end of file diff --git a/function.trim.html b/function.trim.html new file mode 100644 index 0000000..b0cbdb3 --- /dev/null +++ b/function.trim.html @@ -0,0 +1,199 @@ +trim
PHP Manual
PrevNext

trim

(PHP3 , PHP4 )

trim --  + Strip whitespace from the beginning and end of a string +

Description

string trim (string str)

This function strips whitespace from the start and the end of a + string and returns the stripped string. The whitespace + characters it currently strips are: "\n", "\r", "\t", "\v", "\0", + and a plain space. +

See also chop(), rtrim() and + ltrim(). +


PrevHomeNext
substr_replaceUpucfirst
\ No newline at end of file diff --git a/function.uasort.html b/function.uasort.html new file mode 100644 index 0000000..3183460 --- /dev/null +++ b/function.uasort.html @@ -0,0 +1,253 @@ +uasort
PHP Manual
PrevNext

uasort

(PHP3 >= 3.0.4, PHP4 )

uasort --  + Sort an array with a user-defined comparison function and + maintain index association +

Description

void uasort (array array, function cmp_function)

This function sorts an array such that array indices maintain + their correlation with the array elements they are associated + with. This is used mainly when sorting associative arrays where + the actual element order is significant. The comparison function + is user-defined. +

Note: + Please see usort() and + uksort() for examples of user-defined + comparison functions. +

See also: usort(), uksort(), + sort(), asort(), + arsort(), ksort() + and rsort(). +


PrevHomeNext
sortUpuksort
\ No newline at end of file diff --git a/function.ucfirst.html b/function.ucfirst.html new file mode 100644 index 0000000..a113441 --- /dev/null +++ b/function.ucfirst.html @@ -0,0 +1,240 @@ +ucfirst
PHP Manual
PrevNext

ucfirst

(PHP3 , PHP4 )

ucfirst -- Make a string's first character uppercase

Description

string ucfirst (string str)

Capitalizes the first character of str if + that character is alphabetic. +

Note that 'alphabetic' is determined by the current locale. For + instance, in the default "C" locale characters such as umlaut-a + (ä) will not be converted. +

Example 1. Ucfirst() example

    
+$text = 'mary had a little lamb and she loved it so.';
+$text = ucfirst ($text); // $text is now Mary had a little lamb 
+                         // and she loved it so.
+      
+

See also strtoupper() and + strtolower(). +


PrevHomeNext
trimUpucwords
\ No newline at end of file diff --git a/function.ucwords.html b/function.ucwords.html new file mode 100644 index 0000000..36361eb --- /dev/null +++ b/function.ucwords.html @@ -0,0 +1,242 @@ +ucwords
PHP Manual
PrevNext

ucwords

(PHP3 >= 3.0.3, PHP4 )

ucwords --  + Uppercase the first character of each word in a string +

Description

string ucwords (string str)

Capitalizes the first character of each word in + str if that character is alphabetic. +

Example 1. ucwords() example


$text = "mary had a little lamb and she loved it so.";
+$text = ucwords($text); // $text is now: Mary Had A Little 
+                        // Lamb And She Loved It So.
+      
+

See also strtoupper(), + strtolower() and ucfirst(). +


PrevHomeNext
ucfirstUpwordwrap
\ No newline at end of file diff --git a/function.uksort.html b/function.uksort.html new file mode 100644 index 0000000..ae48545 --- /dev/null +++ b/function.uksort.html @@ -0,0 +1,314 @@ +uksort
PHP Manual
PrevNext

uksort

(PHP3 >= 3.0.4, PHP4 )

uksort --  + Sort an array by keys using a user-defined comparison function +

Description

void uksort (array array, function cmp_function)

This function will sort the keys of an array using a + user-supplied comparison function. If the array you wish to sort + needs to be sorted by some non-trivial criteria, you should use + this function. +

Example 1. Uksort() example


function cmp ($a, $b) {   
+    if ($a == $b) return 0;
+    return ($a > $b) ? -1 : 1;
+}
+
+$a = array (4 => "four", 3 => "three", 20 => "twenty", 10 => "ten");
+
+uksort ($a, "cmp");
+
+while (list ($key, $value) = each ($a)) {
+    echo "$key: $value\n";
+}
+      
+

This example would display: +


20: twenty
+10: ten
+4: four
+3: three
+      

+

See also: usort(), uasort(), + sort(), asort(), + arsort(), ksort(), + natsort() and rsort(). +


PrevHomeNext
uasortUpusort
\ No newline at end of file diff --git a/function.umask.html b/function.umask.html new file mode 100644 index 0000000..fe7bf18 --- /dev/null +++ b/function.umask.html @@ -0,0 +1,184 @@ +umask
PHP Manual
PrevNext

umask

(PHP3 , PHP4 )

umask -- Changes the current umask

Description

int umask (int mask)

Umask() sets PHP's umask to mask & 0777 and + returns the old umask. When PHP is being used as a server module, + the umask is restored when each request is finished. +

Umask() without arguments simply returns the + current umask. +


PrevHomeNext
touchUpunlink
\ No newline at end of file diff --git a/function.uniqid.html b/function.uniqid.html new file mode 100644 index 0000000..ff25fe8 --- /dev/null +++ b/function.uniqid.html @@ -0,0 +1,267 @@ +uniqid
PHP Manual
PrevNext

uniqid

(PHP3 , PHP4 )

uniqid -- Generate a unique id

Description

int uniqid (string prefix [, boolean + lcg])

Uniqid() returns a prefixed unique identifier + based on the current time in microseconds. The prefix can be + useful for instance if you generate identifiers simultaneously on + several hosts that might happen to generate the identifier at the + same microsecond. Prefix can be up to 114 + characters long. +

If the optional lcg parameter is true, + uniqid() will add additional "combined LCG" + entropy at the end of the return value, which should make the + results more unique. +

With an empty prefix, the returned string + will be 13 characters long. If lcg is + true, it will be 23 characters. +

Note: + The lcg parameter is only available in + PHP 4 and PHP 3.0.13 and later. +

If you need a unique identifier or token and you intend to give + out that token to the user via the network (i.e. session cookies), + it is recommended that you use something along the lines of +


$token = md5 (uniqid ("")); // no random portion
+$better_token = md5 (uniqid (rand())); // better, difficult to guess
+      

+

This will create a 32 character identifier (a 128 bit hex number) + that is extremely difficult to predict. +


PrevHomeNext
sleepUpunpack
\ No newline at end of file diff --git a/function.unixtojd.html b/function.unixtojd.html new file mode 100644 index 0000000..fa48eb6 --- /dev/null +++ b/function.unixtojd.html @@ -0,0 +1,206 @@ +unixtojd
PHP Manual
PrevNext

unixtojd

(PHP4 >= 4.0RC2)

unixtojd -- Convert UNIX timestamp to Julian Day

Description

int unixtojd ([int + timestamp])

Return the Julian Day for a UNIX timestamp + (seconds since 1.1.1970), or for the current day if no + timestamp is given. +

See also jdtounix(). +

Note: + This function is only available in PHP versions after PHP4RC1. +


PrevHomeNext
easter_daysUpjdtounix
\ No newline at end of file diff --git a/function.unlink.html b/function.unlink.html new file mode 100644 index 0000000..40481b1 --- /dev/null +++ b/function.unlink.html @@ -0,0 +1,202 @@ +unlink
PHP Manual
PrevNext

unlink

(PHP3 , PHP4 )

unlink -- Deletes a file

Description

int unlink (string filename)

Deletes filename. Similar to the Unix C + unlink() function. +

Returns 0 or FALSE on an error. +

See also rmdir() for removing directories. +

Note: + This function may not work on Windows systems. +


PrevHomeNext
umaskUpForms Data Format functions
\ No newline at end of file diff --git a/function.unpack.html b/function.unpack.html new file mode 100644 index 0000000..82087f6 --- /dev/null +++ b/function.unpack.html @@ -0,0 +1,249 @@ +unpack
PHP Manual
PrevNext

unpack

(PHP3 , PHP4 )

unpack -- Unpack data from binary string

Description

array unpack (string format, string data)

Unpack() from binary string into array + according to format. Returns array + containing unpacked elements of binary string. +

Unpack() works slightly different from Perl as + the unpacked data is stored in an associative array. To + accomplish this you have to name the different format codes and + separate them by a slash /. +

Example 1. Unpack() format string


$array = unpack ("c2chars/nint", $binarydata);
+      

The resulting array will contain the entries "chars1", + "chars2" and "int". +

+

For an explanation of the format codes see also: + pack() +

Note that PHP internally stores integral values as signed. If you + unpack a large unsigned long and it is of the same size as PHP + internally stored values the result will be a negative number + even though unsigned unpacking was specified. +


PrevHomeNext
uniqidUpusleep
\ No newline at end of file diff --git a/function.unserialize.html b/function.unserialize.html new file mode 100644 index 0000000..c53f5cd --- /dev/null +++ b/function.unserialize.html @@ -0,0 +1,267 @@ +unserialize
PHP Manual
PrevNext

unserialize

(PHP3 >= 3.0.5, PHP4 )

unserialize --  + Creates a PHP value from a stored representation +

Description

mixed unserialize (string str)

unserialize() takes a single serialized + variable (see serialize()) and converts it + back into a PHP value. The converted value is returned, and can + be an integer, double, + string, array or object. + If an object was serialized, its methods are not preserved in the + returned value. +

Example 1. Unserialize() example


// Here, we use unserialize() to load session data from a database
+// into $session_data.    This example complements the one described
+// with serialize().
+
+$conn = odbc_connect ("webdb", "php", "chicken");
+$stmt = odbc_prepare ($conn, "SELECT data FROM sessions WHERE id = ?");
+$sqldata = array ($PHP_AUTH_USER);
+if (!odbc_execute ($stmt, &$sqldata) || !odbc_fetch_into ($stmt, &$tmp)) {
+    // if the execute or fetch fails, initialize to empty array
+    $session_data = array();
+} else {
+    // we should now have the serialized data in $tmp[0].
+    $session_data = unserialize ($tmp[0]);
+    if (!is_array ($session_data)) {
+    // something went wrong, initialize to empty array
+    $session_data = array();
+    }
+}
+      
+


PrevHomeNext
strvalUpunset
\ No newline at end of file diff --git a/function.unset.html b/function.unset.html new file mode 100644 index 0000000..078b148 --- /dev/null +++ b/function.unset.html @@ -0,0 +1,499 @@ +unset
PHP Manual
PrevNext

unset

(unknown)

unset -- Unset a given variable

Description

int unset (mixed var [, mixed var [, ...]])

unset() destroys the specified variables and + returns true. +

Example 1. Unset() example


// destroy a single variable
+unset ($foo);
+
+// destroy a single element of an array
+unset ($bar['quux']);
+
+// destroy more than one variable
+unset ($foo1, $foo2, $foo3);
+      
+

The behavior of unset() inside of a function + can vary depending on what type of variable you are attempting to + destroy. +

If a globalized variable is unset() inside of + a function, only the local variable is destroyed. The variable + in the calling environment will retain the same value as before + unset() was called. +


function destroy_foo() {
+    global $foo;
+    unset($foo);
+}
+
+$foo = 'bar';
+destroy_foo();
+echo $foo;
+      

+ The above example would output: +


bar
+      

+

If a variable that is PASSED BY REFERENCE is + unset() inside of a function, only the local + variable is destroyed. The variable in the calling environment + will retain the same value as before unset() + was called. +


function foo(&$bar) { 
+    unset($bar); 
+    $bar = "blah"; 
+}
+
+$bar = 'something';
+echo "$bar\n";
+
+foo($bar);
+echo "$bar\n";
+      

+ The above example would output: +


something
+something
+      

+

If a static variable is unset() inside of a + function, unset() unsets the reference to the + static variable, rather than the static variable itself. +


function foo() { 
+    static $a;
+    $a++;
+       echo "$a\n";
+
+    unset($a);
+}
+
+foo();
+foo();
+foo();
+      

+ The above example would output: +


1
+2
+3
+      

+

If you would like to unset() a global variable inside of a function, you can use the $GLOBALS array to do so: +


function foo() {
+    unset($GLOBALS['bar']);       
+}
+
+$bar = "something";
+foo();
+      

+

See also isset() and + empty(). +


PrevHomeNext
unserializeUpvar_dump
\ No newline at end of file diff --git a/function.urldecode.html b/function.urldecode.html new file mode 100644 index 0000000..82ba774 --- /dev/null +++ b/function.urldecode.html @@ -0,0 +1,249 @@ +urldecode
PHP Manual
PrevNext

urldecode

(PHP3 , PHP4 )

urldecode -- Decodes URL-encoded string

Description

string urldecode (string str)

Decodes any %## + encoding in the given string. The decoded string is returned. +

Example 1. Urldecode() example


$a = split ('&', $querystring);
+$i = 0;
+while ($i < count ($a)) {
+    $b = split ('=', $a [$i]);
+    echo 'Value for parameter ', htmlspecialchars (urldecode ($b [0])),
+         ' is ', htmlspecialchars (urldecode ($b [1])), "<BR>";
+    $i++;
+}
+      
+

See also urlencode(), + rawurlencode(), + rawurldecode(). +


PrevHomeNext
rawurlencodeUpurlencode
\ No newline at end of file diff --git a/function.urlencode.html b/function.urlencode.html new file mode 100644 index 0000000..422e215 --- /dev/null +++ b/function.urlencode.html @@ -0,0 +1,330 @@ +urlencode
PHP Manual
PrevNext

urlencode

(PHP3 , PHP4 )

urlencode -- URL-encodes string

Description

string urlencode (string str)

Returns a string in which all non-alphanumeric characters except + -_. have been replaced with a percent + (%) sign followed by two hex digits and spaces + encoded as plus (+) signs. It is encoded the + same way that the posted data from a WWW form is encoded, that is + the same way as in + application/x-www-form-urlencoded media type. + This differs from the RFC1738 encoding (see + rawurlencode()) in that for historical + reasons, spaces are encoded as plus (+) signs. This function is + convenient when encoding a string to be used in a query part of + an URL, as a convenient way to pass variables to the next page: +

Example 1. Urlencode() example


echo '<A HREF="mycgi?foo=', urlencode ($userinput), '">';
+      
+

Note: Be careful about variables that may match HTML entities. + Things like &amp, &copy and &pound are parsed by the browser + and the actual entity is used instead of the desired variable name. This + is an obvious hassle that the W3C has been telling people about for years. + The reference is here: http://www.w3.org/TR/html4/appendix/notes.html#h-B.2.2 + PHP supports changing the argument separator to the W3C-suggested + semi-colon through the arg_separator .ini directive. Unfortunately most + user agents do not send form data in this semi-colon separated format. + A more portable way around this is to use &amp; instead of & as the + separator. You don't need to change PHP's arg_separator for this. Leave + it as &, but simply encode your URLs using htmlentities()(urlencode($data)). +

Example 2. Urlencode/htmlentities() example


echo '<A HREF="mycgi?foo=', htmlentities (urlencode ($userinput) ), '">';
+      
+

See also urldecode(), + htmlentities(), + rawurldecode(), + rawurlencode(). +


PrevHomeNext
urldecodeUpVariable Functions
\ No newline at end of file diff --git a/function.user-error.html b/function.user-error.html new file mode 100644 index 0000000..d11d209 --- /dev/null +++ b/function.user-error.html @@ -0,0 +1,211 @@ +user_error
PHP Manual
PrevNext

user_error

(PHP4 >= 4.0RC2)

user_error --  + Generates a user-level error/warning/notice message +

Description

void user_error (string error_msg [, int + error_type])

This is an alias for the function trigger_error(). +

See also error_reporting(), + set_error_handler(), + restore_error_handler(), and + trigger_error() +


PrevHomeNext
trigger_errorUpfilePro functions
\ No newline at end of file diff --git a/function.usleep.html b/function.usleep.html new file mode 100644 index 0000000..ddbd292 --- /dev/null +++ b/function.usleep.html @@ -0,0 +1,202 @@ +usleep
PHP Manual
PrevNext

usleep

(PHP3 , PHP4 )

usleep -- Delay execution in microseconds

Description

void usleep (int micro_seconds)

The usleep() function delays program execution + for the given number of micro_seconds. +

See also sleep(). +

Note: + This function does not work on Windows systems. +


PrevHomeNext
unpackUpmSQL functions
\ No newline at end of file diff --git a/function.usort.html b/function.usort.html new file mode 100644 index 0000000..476aa36 --- /dev/null +++ b/function.usort.html @@ -0,0 +1,460 @@ +usort
PHP Manual
PrevNext

usort

(PHP3 >= 3.0.3, PHP4 )

usort --  + Sort an array by values using a user-defined comparison function +

Description

void usort (array array, string cmp_function)

This function will sort an array by its values using a + user-supplied comparison function. If the array you wish to sort + needs to be sorted by some non-trivial criteria, you should use + this function. +

The comparison function must return an integer less than, equal + to, or greater than zero if the first argument is considered to + be respectively less than, equal to, or greater than the + second. If two members compare as equal, their order in the + sorted array is undefined. +

Example 1. Usort() example


function cmp ($a, $b) {   
+    if ($a == $b) return 0;
+    return ($a > $b) ? -1 : 1;
+}
+
+$a = array (3, 2, 5, 6, 1);
+
+usort ($a, "cmp");
+
+while (list ($key, $value) = each ($a)) {
+    echo "$key: $value\n";
+}
+      
+

This example would display: +


0: 6
+1: 5
+2: 3
+3: 2
+4: 1
+      

+

Note: + Obviously in this trivial case the rsort() + function would be more appropriate. +

Example 2. + Usort() example using multi-dimensional array +


function cmp ($a, $b) {
+    return strcmp($a["fruit"],$b["fruit"]);
+} 
+
+$fruits[0]["fruit"] = "lemons";
+$fruits[1]["fruit"] = "apples";
+$fruits[2]["fruit"] = "grapes";
+
+usort($fruits, "cmp"); 
+
+while (list ($key, $value) = each ($fruits)) {
+    echo "\$fruits[$key]: " . $value["fruit"] . "\n";
+}
+      
+

When sorting a multi-dimensional array, $a and $b contain + references to the first index of the array. +

This example would display: +


$fruits[0]: apples
+$fruits[1]: grapes
+$fruits[2]: lemons
+      

+

Warning

The underlying quicksort function in some C libraries (such as + on Solaris systems) may cause PHP to crash if the comparison + function does not return consistent values. +

+

See also: uasort(), uksort(), + sort(), asort(), + arsort(),ksort(), + natsort(), and rsort(). +


PrevHomeNext
uksortUpAspell functions
\ No newline at end of file diff --git a/function.utf8-decode.html b/function.utf8-decode.html new file mode 100644 index 0000000..467659c --- /dev/null +++ b/function.utf8-decode.html @@ -0,0 +1,197 @@ +utf8_decode
PHP Manual
PrevNext

utf8_decode

(PHP3 >= 3.0.6, PHP4 )

utf8_decode --  + Converts a string with ISO-8859-1 characters encoded with UTF-8 + to single-byte ISO-8859-1. +

Description

string utf8_decode (string data)

This function decodes data, assumed to be + UTF-8 encoded, to ISO-8859-1. +

See utf8_encode() for an explaination of UTF-8 + encoding. +


PrevHomeNext
xml_parser_get_optionUputf8_encode
\ No newline at end of file diff --git a/function.utf8-encode.html b/function.utf8-encode.html new file mode 100644 index 0000000..9e54af4 --- /dev/null +++ b/function.utf8-encode.html @@ -0,0 +1,305 @@ +utf8_encode
PHP Manual
PrevNext

utf8_encode

(PHP3 >= 3.0.6, PHP4 )

utf8_encode -- encodes an ISO-8859-1 string to UTF-8

Description

string utf8_encode (string data)

This function encodes the string data to + UTF-8, and returns the encoded version. + UTF-8 is a standard mechanism used by + Unicodefor encoding wide + character values into a byte stream. + UTF-8 is transparent to plain + ASCII characters, is self-synchronized (meaning + it is possible for a program to figure out where in the + bytestream characters start) and can be used with normal string + comparison functions for sorting and such. PHP encodes + UTF-8 characters in up to four bytes, like + this: +

Table 1. UTF-8 encoding

bytesbitsrepresentation
170bbbbbbb
211110bbbbb 10bbbbbb
3161110bbbb 10bbbbbb 10bbbbbb
42111110bbb 10bbbbbb 10bbbbbb 10bbbbbb
+ Each b represents a bit that can be + used to store character data. +


PrevHomeNext
utf8_decodeUpYAZ functions
\ No newline at end of file diff --git a/function.var-dump.html b/function.var-dump.html new file mode 100644 index 0000000..309fb17 --- /dev/null +++ b/function.var-dump.html @@ -0,0 +1,218 @@ +var_dump
PHP Manual
PrevNext

var_dump

(PHP3 >= 3.0.5, PHP4 )

var_dump -- Dumps information about a variable

Description

void var_dump (mixed expression)

This function returns structured information about an expression + that includes its type and value. Arrays are explored + recursively with values indented to show structure. +

Compare var_dump() to + print_r(). +


<pre>
+<?php
+    $a = array (1, 2, array ("a", "b", "c"));
+    var_dump ($a);
+?>
+</pre>
+      

+


PrevHomeNext
unsetUpVmailmgr functions
\ No newline at end of file diff --git a/function.virtual.html b/function.virtual.html new file mode 100644 index 0000000..c35ea04 --- /dev/null +++ b/function.virtual.html @@ -0,0 +1,199 @@ +virtual
PHP Manual
PrevNext

virtual

(PHP3 , PHP4 )

virtual -- Perform an Apache sub-request

Description

int virtual (string filename)

Virtual() is an Apache-specific function which + is equivalent to <!--#include virtual...--> in mod_include. + It performs an Apache sub-request. It is useful for including + CGI scripts or .shtml files, or anything else that you would + parse through Apache. Note that for a CGI script, the script + must generate valid CGI headers. At the minimum that means it + must generate a Content-type header. For PHP files, you need to + use include() or require(); + virtual() cannot be used to include a document + which is itself a PHP file. +


PrevHomeNext
getallheadersUpArray Functions
\ No newline at end of file diff --git a/function.vm-addalias.html b/function.vm-addalias.html new file mode 100644 index 0000000..5cc9bc2 --- /dev/null +++ b/function.vm-addalias.html @@ -0,0 +1,183 @@ +vm_addalias
PHP Manual
PrevNext

vm_addalias

(PHP3 , PHP4 <= 4.0.0)

vm_addalias -- Add an alias to a virtual user

Description

int vm_addalias (string vdomain, string basepwd, string username, string alias)

Add an alias to a virtual user. username + is the email login name and alias + is an alias for this vuser.


PrevHomeNext
vm_adduserUpvm_passwd
\ No newline at end of file diff --git a/function.vm-adduser.html b/function.vm-adduser.html new file mode 100644 index 0000000..43fdc0b --- /dev/null +++ b/function.vm-adduser.html @@ -0,0 +1,184 @@ +vm_adduser
PHP Manual
PrevNext

vm_adduser

(PHP3 , PHP4 <= 4.0.0)

vm_adduser -- Add a new virtual user with a password

Description

int vm_adduser (string vdomain, string basepwd, string newusername, string newuserpassword)

Add a new virtual user with a + password. newusername is the email login + name and newuserpassword the password for + this user.


PrevHomeNext
Vmailmgr functionsUpvm_addalias
\ No newline at end of file diff --git a/function.vm-delalias.html b/function.vm-delalias.html new file mode 100644 index 0000000..bc8b318 --- /dev/null +++ b/function.vm-delalias.html @@ -0,0 +1,171 @@ +vm_delalias
PHP Manual
PrevNext

vm_delalias

(PHP3 , PHP4 <= 4.0.0)

vm_delalias -- Removes an alias

Description

int vm_delalias (string vdomain, string basepwd, string alias)

Removes an alias.


PrevHomeNext
vm_passwdUpvm_deluser
\ No newline at end of file diff --git a/function.vm-deluser.html b/function.vm-deluser.html new file mode 100644 index 0000000..4123156 --- /dev/null +++ b/function.vm-deluser.html @@ -0,0 +1,171 @@ +vm_deluser
PHP Manual
PrevNext

vm_deluser

(PHP3 , PHP4 <= 4.0.0)

vm_deluser -- Removes a virtual user

Description

int vm_deluser (string vdomain, string username)

Removes a virtual user..


PrevHomeNext
vm_delaliasUpWDDX functions
\ No newline at end of file diff --git a/function.vm-passwd.html b/function.vm-passwd.html new file mode 100644 index 0000000..7bce685 --- /dev/null +++ b/function.vm-passwd.html @@ -0,0 +1,189 @@ +vm_passwd
PHP Manual
PrevNext

vm_passwd

(PHP3 , PHP4 <= 4.0.0)

vm_passwd -- Changes a virtual users password

Description

int vm_passwd (string vdomain, string username, string password, string newpassword)

Changes a virtual users password. username + is the email login name, password the old + password for the vuser, and newpassword + the new password.


PrevHomeNext
vm_addaliasUpvm_delalias
\ No newline at end of file diff --git a/function.wddx-add-vars.html b/function.wddx-add-vars.html new file mode 100644 index 0000000..c30794f --- /dev/null +++ b/function.wddx-add-vars.html @@ -0,0 +1,190 @@ +wddx_add_vars
PHP Manual
PrevNext

wddx_add_vars

(PHP3 >= 3.0.7, PHP4 >= 4.0b2)

wddx_add_vars -- Ends a WDDX packet with the specified ID

Description

wddx_add_vars (int packet_id, mixed name_var [, mixed + ...])

wddx_add_vars() is used to serialize passed + variables and add the result to the packet specified by the + packet_id. The variables to be serialized + are specified in exactly the same way as + wddx_serialize_vars().


PrevHomeNext
wddx_packet_endUpwddx_deserialize
\ No newline at end of file diff --git a/function.wddx-deserialize.html b/function.wddx-deserialize.html new file mode 100644 index 0000000..651d264 --- /dev/null +++ b/function.wddx-deserialize.html @@ -0,0 +1,182 @@ +wddx_deserialize
PHP Manual
PrevNext

wddx_deserialize

(PHP3 >= 3.0.7, PHP4 >= 4.0b2)

wddx_deserialize -- Deserializes a WDDX packet

Description

mixed wddx_deserialize (string packet)

wddx_deserialized() takes a + packet string and deserializes it. It + returns the result which can be string, number, or array. Note + that structures are deserialized into associative arrays.


PrevHomeNext
wddx_add_varsUpXML parser functions
\ No newline at end of file diff --git a/function.wddx-packet-end.html b/function.wddx-packet-end.html new file mode 100644 index 0000000..1d0132a --- /dev/null +++ b/function.wddx-packet-end.html @@ -0,0 +1,181 @@ +wddx_packet_end
PHP Manual
PrevNext

wddx_packet_end

(PHP3 >= 3.0.7, PHP4 >= 4.0b2)

wddx_packet_end -- Ends a WDDX packet with the specified ID

Description

string wddx_packet_end (int packet_id)

wddx_packet_end() ends the WDDX packet + specified by the packet_id and returns the + string with the packet.


PrevHomeNext
wddx_packet_startUpwddx_add_vars
\ No newline at end of file diff --git a/function.wddx-packet-start.html b/function.wddx-packet-start.html new file mode 100644 index 0000000..1cf91d6 --- /dev/null +++ b/function.wddx-packet-start.html @@ -0,0 +1,184 @@ +wddx_packet_start
PHP Manual
PrevNext

wddx_packet_start

(PHP3 >= 3.0.7, PHP4 >= 4.0b2)

wddx_packet_start -- Starts a new WDDX packet with structure inside it

Description

int wddx_packet_start ([string + comment])

Use wddx_packet_start() to start a new WDDX + packet for incremental addition of variables. It takes an + optional comment string and returns a + packet ID for use in later functions. It automatically creates a + structure definition inside the packet to contain the variables.


PrevHomeNext
wddx_serialize_varsUpwddx_packet_end
\ No newline at end of file diff --git a/function.wddx-serialize-value.html b/function.wddx-serialize-value.html new file mode 100644 index 0000000..d8b2ba5 --- /dev/null +++ b/function.wddx-serialize-value.html @@ -0,0 +1,190 @@ +wddx_serialize_value
PHP Manual
PrevNext

wddx_serialize_value

(PHP3 >= 3.0.7, PHP4 >= 4.0b2)

wddx_serialize_value -- Serialize a single value into a WDDX packet

Description

string + wddx_serialize_value (mixed var [, string + comment])

wddx_serialize_value() is used to create a + WDDX packet from a single given value. It takes the value + contained in var, and an optional + comment string that appears in the packet + header, and returns the WDDX packet.


PrevHomeNext
WDDX functionsUpwddx_serialize_vars
\ No newline at end of file diff --git a/function.wddx-serialize-vars.html b/function.wddx-serialize-vars.html new file mode 100644 index 0000000..0c0e270 --- /dev/null +++ b/function.wddx-serialize-vars.html @@ -0,0 +1,248 @@ +wddx_serialize_vars
PHP Manual
PrevNext

wddx_serialize_vars

(PHP3 >= 3.0.7, PHP4 >= 4.0b2)

wddx_serialize_vars -- Serialize variables into a WDDX packet

Description

string wddx_serialize_vars (mixed var_name [, mixed + ...])

wddx_serialize_vars() is used to create a WDDX + packet with a structure that contains the serialized + representation of the passed variables.

wddx_serialize_vars() takes a variable number + of arguments, each of which can be either a string naming a + variable or an array containing strings naming the variables or + another array, etc.

Example 1. wddx_serialize_vars example


<?php
+$a = 1;
+$b = 5.5;
+$c = array("blue", "orange", "violet");
+$d = "colors";
+
+$clvars = array("c", "d");
+print wddx_serialize_vars("a", "b", $clvars);
+?>
+      

The above example will produce: +

<wddxPacket version='1.0'><header/><data><struct><var name='a'><number>1</number></var>
+<var name='b'><number>5.5</number></var><var name='c'><array length='3'>
+<string>blue</string><string>orange</string><string>violet</string></array></var>
+<var name='d'><string>colors</string></var></struct></data></wddxPacket>
+     


PrevHomeNext
wddx_serialize_valueUpwddx_packet_start
\ No newline at end of file diff --git a/function.wordwrap.html b/function.wordwrap.html new file mode 100644 index 0000000..2898789 --- /dev/null +++ b/function.wordwrap.html @@ -0,0 +1,382 @@ +wordwrap
PHP Manual
PrevNext

wordwrap

(PHP4 >= 4.0.2)

wordwrap --  + Wraps a string to a given number of characters using a string + break character. +

Description

string wordwrap (string str [, int + width [, string + break [, int + cut]]])

Wraps the string str at the column number + specified by the (optional) width + parameter. The line is broken using the (optional) + break parameter. +

wordwrap() will automatically wrap at column + 75 and break using '\n' (newline) if width + or break are not given. +

If the cut is set to 1, the string is + always wrapped at the specified width. So if you have a word + that is larger than the given width, it is broken appart. + (See second example). +

Example 1. wordwrap() example


$text = "The quick brown fox jumped over the lazy dog.";
+$newtext = wordwrap( $text, 20 );
+
+echo "$newtext\n";
+      
+

This example would display: +


The quick brown fox
+jumped over the lazy dog.
+      

+

Example 2. wordwrap() example


$text = "A very long woooooooooooord.";
+$newtext = wordwrap( $text, 8, "\n", 1);
+
+echo "$newtext\n";
+      
+

This example would display: +


A very
+long
+wooooooo
+ooooord.
+      

+

See also nl2br(). +


PrevHomeNext
ucwordsUpSybase functions
\ No newline at end of file diff --git a/function.xml-error-string.html b/function.xml-error-string.html new file mode 100644 index 0000000..1cf2b51 --- /dev/null +++ b/function.xml-error-string.html @@ -0,0 +1,206 @@ +xml_error_string
PHP Manual
PrevNext

xml_error_string

(PHP3 >= 3.0.6, PHP4 )

xml_error_string -- get XML parser error string

Description

string xml_error_string (int code)

code

An error code from xml_get_error_code(). +

+

Returns a string with a textual description of the error code + code, or false if no description was found. +


PrevHomeNext
xml_get_error_codeUpxml_get_current_line_number
\ No newline at end of file diff --git a/function.xml-get-current-byte-index.html b/function.xml-get-current-byte-index.html new file mode 100644 index 0000000..1d21f4d --- /dev/null +++ b/function.xml-get-current-byte-index.html @@ -0,0 +1,203 @@ +xml_get_current_byte_index
PHP Manual
PrevNext

xml_get_current_byte_index

(PHP3 >= 3.0.6, PHP4 )

xml_get_current_byte_index -- get current byte index for an XML parser

Description

int + xml_get_current_byte_index + (int parser)

parser

A reference to the XML parser to get byte index from. +

+

This function returns false if parser does + not refer to a valid parser, or else it returns which byte index + the parser is currently at in its data buffer (starting at 0). +


PrevHomeNext
xml_get_current_column_numberUpxml_parse_into_struct
\ No newline at end of file diff --git a/function.xml-get-current-column-number.html b/function.xml-get-current-column-number.html new file mode 100644 index 0000000..5b666fa --- /dev/null +++ b/function.xml-get-current-column-number.html @@ -0,0 +1,213 @@ +xml_get_current_column_number
PHP Manual
PrevNext

xml_get_current_column_number

(PHP3 >= 3.0.6, PHP4 )

xml_get_current_column_number --  + Get current column number for an XML parser +

Description

int + xml_get_current_column_number + (int parser)

parser

A reference to the XML parser to get column number from. +

+

This function returns false if parser does + not refer to a valid parser, or else it returns which column on + the current line (as given by + xml_get_current_line_number()) the parser is + currently at. +


PrevHomeNext
xml_get_current_line_numberUpxml_get_current_byte_index
\ No newline at end of file diff --git a/function.xml-get-current-line-number.html b/function.xml-get-current-line-number.html new file mode 100644 index 0000000..7ac3231 --- /dev/null +++ b/function.xml-get-current-line-number.html @@ -0,0 +1,203 @@ +xml_get_current_line_number
PHP Manual
PrevNext

xml_get_current_line_number

(PHP3 >= 3.0.6, PHP4 )

xml_get_current_line_number -- get current line number for an XML parser

Description

int + xml_get_current_line_number + (int parser)

parser

A reference to the XML parser to get line number from. +

+

This function returns false if parser does + not refer to a valid parser, or else it returns which line the + parser is currently at in its data buffer. +


PrevHomeNext
xml_error_stringUpxml_get_current_column_number
\ No newline at end of file diff --git a/function.xml-get-error-code.html b/function.xml-get-error-code.html new file mode 100644 index 0000000..01b3509 --- /dev/null +++ b/function.xml-get-error-code.html @@ -0,0 +1,205 @@ +xml_get_error_code
PHP Manual
PrevNext

xml_get_error_code

(PHP3 >= 3.0.6, PHP4 )

xml_get_error_code -- get XML parser error code

Description

int xml_get_error_code (int parser)

parser

A reference to the XML parser to get error code from. +

+

This function returns false if parser does + not refer to a valid parser, or else it returns one of the error + codes listed in the error codes + section. +


PrevHomeNext
xml_parseUpxml_error_string
\ No newline at end of file diff --git a/function.xml-parse-into-struct.html b/function.xml-parse-into-struct.html new file mode 100644 index 0000000..6e8c79e --- /dev/null +++ b/function.xml-parse-into-struct.html @@ -0,0 +1,504 @@ +xml_parse_into_struct
PHP Manual
PrevNext

xml_parse_into_struct

(PHP3 >= 3.0.8, PHP4 )

xml_parse_into_struct -- Parse XML data into an array structure

Description

int xml_parse_into_struct (int parser, string data, array &values, array &index)

This function parses an XML file into 2 parallel array + structures, one (index) containing pointers + to the location of the appropriate values in the + values array. These last two parameters + must be passed by reference. +

Below is an example that illustrates the internal structure of + the arrays being generated by the function. We use a simple + note tag embeded inside a + para tag, and then we parse this an print out + the structures generated: +


$simple = "<para><note>simple note</note></para>";
+$p = xml_parser_create();
+xml_parse_into_struct($p,$simple,&$vals,&$index);
+xml_parser_free($p);
+echo "Index array\n";
+print_r($index);
+echo "\nVals array\n";
+print_r($vals);
+	  

+ When we run that code, the output will be: +


Index array
+Array
+(
+    [PARA] => Array
+        (
+            [0] => 0
+            [1] => 2
+        )
+
+    [NOTE] => Array
+        (
+            [0] => 1
+        )
+
+)
+
+Vals array
+Array
+(
+    [0] => Array
+        (
+            [tag] => PARA
+            [type] => open
+            [level] => 1
+        )
+
+    [1] => Array
+        (
+            [tag] => NOTE
+            [type] => complete
+            [level] => 2
+            [value] => simple note
+        )
+
+    [2] => Array
+        (
+            [tag] => PARA
+            [type] => close
+            [level] => 1
+        )
+
+)
+	  

+

Event-driven parsing (based on the expat library) can get + complicated when you have an XML document that is complex. + This function does not produce a DOM style object, but it + generates structures amenable of being transversed in a tree + fashion. Thus, we can create objects representing the data + in the XML file easily. Let's consider the following XML file + representing a small database of aminoacids information: +

Example 1. moldb.xml - small database of molecular information


<?xml version="1.0"?>
+<moldb>
+
+	<molecule>
+		<name>Alanine</name>
+		<symbol>ala</symbol>
+		<code>A</code>
+		<type>hydrophobic</type>
+	</molecule>
+
+	<molecule>
+		<name>Lysine</name>
+		<symbol>lys</symbol>
+		<code>K</code>
+		<type>charged</type>
+	</molecule>
+
+</moldb>
+	  
+ And some code to parse the document and generate the appropriate + objects: +

Example 2. + parsemoldb.php - parses moldb.xml into and array of + molecular objects +


<?php
+
+class AminoAcid {
+	var $name;	// aa name
+	var $symbol;	// three letter symbol
+	var $code;	// one letter code
+	var $type;	// hydrophobic, charged or neutral
+	
+	function AminoAcid ($aa) {
+		foreach ($aa as $k=>$v)
+			$this->$k = $aa[$k];
+	}
+}
+
+function readDatabase($filename) {
+	// read the xml database of aminoacids
+	$data = implode("",file($filename));
+	$parser = xml_parser_create();
+	xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
+	xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,1);
+	xml_parse_into_struct($parser,$data,&$values,&$tags);
+	xml_parser_free($parser);
+
+	// loop through the structures
+	foreach ($tags as $key=>$val) {
+		if ($key == "molecule") {
+			$molranges = $val;
+			// each contiguous pair of array entries are the 
+			// lower and upper range for each molecule definition
+			for ($i=0; $i < count($molranges); $i+=2) {
+			    	$offset = $molranges[$i] + 1;
+				$len = $molranges[$i + 1] - $offset;
+				$tdb[] = parseMol(array_slice($values, $offset, $len));
+			}
+		} else {
+			continue;
+		}
+	}
+	return $tdb;
+}
+
+function parseMol($mvalues) {
+	for ($i=0; $i < count($mvalues); $i++)
+		$mol[$mvalues[$i]["tag"]] = $mvalues[$i]["value"];
+	return new AminoAcid($mol);
+}
+
+$db = readDatabase("moldb.xml");
+echo "** Database of AminoAcid objects:\n";
+print_r($db);
+
+?>
+	  
+ After executing parsemoldb.php, the variable + $db contains an array of + AminoAcid objects, and the output of the + script confirms that: +


** Database of AminoAcid objects:
+Array
+(
+    [0] => aminoacid Object
+        (
+            [name] => Alanine
+            [symbol] => ala
+            [code] => A
+            [type] => hydrophobic
+        )
+
+    [1] => aminoacid Object
+        (
+            [name] => Lysine
+            [symbol] => lys
+            [code] => K
+            [type] => charged
+        )
+
+)
+	   

+


PrevHomeNext
xml_get_current_byte_indexUpxml_parser_free
\ No newline at end of file diff --git a/function.xml-parse.html b/function.xml-parse.html new file mode 100644 index 0000000..7cffc93 --- /dev/null +++ b/function.xml-parse.html @@ -0,0 +1,283 @@ +xml_parse
PHP Manual
PrevNext

xml_parse

(PHP3 >= 3.0.6, PHP4 )

xml_parse -- start parsing an XML document

Description

int xml_parse (int parser, string data [, int + isFinal])

parser

A reference to the XML parser to use. +

data

Chunk of data to parse. A document may be parsed piece-wise + by calling xml_parse() several times with + new data, as long as the isFinal + parameter is set and true when the last data is parsed. +

isFinal (optional)

If set and true, data is the last + piece of data sent in this parse. +

+

When the XML document is parsed, the handlers for the configured + events are called as many times as necessary, after which this + function returns true or false. +

True is returned if the parse was successful, false if it was not + successful, or if parser does not refer to + a valid parser. For unsuccessful parses, error information can + be retrieved with xml_get_error_code(), + xml_error_string(), + xml_get_current_line_number(), + xml_get_current_column_number() and + xml_get_current_byte_index(). +


PrevHomeNext
xml_set_external_entity_ref_handlerUpxml_get_error_code
\ No newline at end of file diff --git a/function.xml-parser-create.html b/function.xml-parser-create.html new file mode 100644 index 0000000..180097c --- /dev/null +++ b/function.xml-parser-create.html @@ -0,0 +1,230 @@ +xml_parser_create
PHP Manual
PrevNext

xml_parser_create

(PHP3 >= 3.0.6, PHP4 )

xml_parser_create -- create an XML parser

Description

int xml_parser_create ([string + encoding])

encoding (optional)

Which character encoding the parser should use. The + following character encodings are supported: +

ISO-8859-1 (default)
US-ASCII
UTF-8

+

+ This function creates an XML parser and returns a handle for use + by other XML functions. Returns false on + failure. +


PrevHomeNext
XML parser functionsUpxml_set_object
\ No newline at end of file diff --git a/function.xml-parser-free.html b/function.xml-parser-free.html new file mode 100644 index 0000000..9801d88 --- /dev/null +++ b/function.xml-parser-free.html @@ -0,0 +1,200 @@ +xml_parser_free
PHP Manual
PrevNext

xml_parser_free

(PHP3 >= 3.0.6, PHP4 )

xml_parser_free -- Free an XML parser

Description

string xml_parser_free (int parser)

parser

A reference to the XML parser to free. +

This function returns false if parser does + not refer to a valid parser, or else it frees the parser and + returns true. +


PrevHomeNext
xml_parse_into_structUpxml_parser_set_option
\ No newline at end of file diff --git a/function.xml-parser-get-option.html b/function.xml-parser-get-option.html new file mode 100644 index 0000000..f622eb9 --- /dev/null +++ b/function.xml-parser-get-option.html @@ -0,0 +1,234 @@ +xml_parser_get_option
PHP Manual
PrevNext

xml_parser_get_option

(PHP3 >= 3.0.6, PHP4 )

xml_parser_get_option -- get options from an XML parser

Description

mixed + xml_parser_get_option + (int parser, int option)

parser

A reference to the XML parser to get an option + from. +

option

Which option to fetch. See + xml_parser_set_option() for a list of + options. +

+

This function returns false if parser does + not refer to a valid parser, or if the option could not be set. + Else the option's value is returned. +

See xml_parser_set_option() for the list of + options. +


PrevHomeNext
xml_parser_set_optionUputf8_decode
\ No newline at end of file diff --git a/function.xml-parser-set-option.html b/function.xml-parser-set-option.html new file mode 100644 index 0000000..361c15d --- /dev/null +++ b/function.xml-parser-set-option.html @@ -0,0 +1,318 @@ +xml_parser_set_option
PHP Manual
PrevNext

xml_parser_set_option

(PHP3 >= 3.0.6, PHP4 )

xml_parser_set_option -- set options in an XML parser

Description

int xml_parser_set_option (int parser, int option, mixed value)

parser

A reference to the XML parser to set an option in. +

option

Which option to set. See below. +

value

The option's new value. +

+

This function returns false if parser does + not refer to a valid parser, or if the option could not be set. + Else the option is set and true is returned. +

The following options are available: +

Table 1. XML parser options

Option constantData typeDescription
XML_OPTION_CASE_FOLDINGinteger Controls whether case-folding is enabled + for this XML parser. Enabled by default. +
XML_OPTION_TARGET_ENCODINGstring Sets which target + encoding to use in this XML parser. By default, it + is set to the same as the source encoding used by + xml_parser_create(). Supported target + encodings are ISO-8859-1, + US-ASCII and UTF-8. +
+


PrevHomeNext
xml_parser_freeUpxml_parser_get_option
\ No newline at end of file diff --git a/function.xml-set-character-data-handler.html b/function.xml-set-character-data-handler.html new file mode 100644 index 0000000..e73ac9e --- /dev/null +++ b/function.xml-set-character-data-handler.html @@ -0,0 +1,301 @@ +xml_set_character_data_handler
PHP Manual
PrevNext

xml_set_character_data_handler

(PHP3 >= 3.0.6, PHP4 )

xml_set_character_data_handler -- set up character data handler

Description

int + xml_set_character_data_handler + (int parser, string handler)

Sets the character data handler function for the XML parser + parser. handler is + a string containing the name of a function that must exist when + xml_parse() is called for + parser.

The function named by handler must accept + two parameters: +

handler (int parser, string data)

+

parser

The first parameter, parser, is a + reference to the XML parser calling the handler. +

data

The second parameter, data, contains + the character data as a string. +

If a handler function is set to an empty string, or + false, the handler in question is + disabled. +

True is returned if the handler is set up, false if + parser is not a parser. +

There is currently no support for object/method handlers. See + xml_set_object() for using the XML parser + within an object. +


PrevHomeNext
xml_set_element_handlerUpxml_set_processing_instruction_handler
\ No newline at end of file diff --git a/function.xml-set-default-handler.html b/function.xml-set-default-handler.html new file mode 100644 index 0000000..576d052 --- /dev/null +++ b/function.xml-set-default-handler.html @@ -0,0 +1,304 @@ +xml_set_default_handler
PHP Manual
PrevNext

xml_set_default_handler

(PHP3 >= 3.0.6, PHP4 )

xml_set_default_handler -- set up default handler

Description

int + xml_set_default_handler + (int parser, string handler)

Sets the default handler function for the XML parser + parser. handler is + a string containing the name of a function that must exist when + xml_parse() is called for + parser.

The function named by handler must accept + two parameters: +

handler (int parser, string data)

+

parser

The first parameter, parser, is a + reference to the XML parser calling the + handler. +

data

The second parameter, data, contains + the character data. This may be the XML declaration, + document type declaration, entities or other data for which + no other handler exists. +

+

If a handler function is set to an empty string, or + false, the handler in question is disabled. +

True is returned if the handler is set up, false if + parser is not a parser. +

There is currently no support for object/method handlers. See + xml_set_object() for using the XML parser + within an object. +


PrevHomeNext
xml_set_processing_instruction_handlerUpxml_set_unparsed_entity_decl_handler
\ No newline at end of file diff --git a/function.xml-set-element-handler.html b/function.xml-set-element-handler.html new file mode 100644 index 0000000..5c16126 --- /dev/null +++ b/function.xml-set-element-handler.html @@ -0,0 +1,446 @@ +xml_set_element_handler
PHP Manual
PrevNext

xml_set_element_handler

(PHP3 >= 3.0.6, PHP4 )

xml_set_element_handler -- set up start and end element handlers

Description

int + xml_set_element_handler + (int parser, string + startElementHandler, string + endElementHandler)

Sets the element handler functions for the XML parser + parser. + startElementHandler and + endElementHandler are strings containing + the names of functions that must exist when + xml_parse() is called for + parser. +

The function named by startElementHandler + must accept three parameters: +

startElementHandler (int parser, string name, array attribs)

+

parser

The first parameter, parser, is a + reference to the XML parser calling the + handler. +

name

The second parameter, name, contains + the name of the element for which this handler is called. If + case-folding is in + effect for this parser, the element name will be in uppercase + letters. +

attribs

The third parameter, attribs, contains + an associative array with the element's attributes (if any). + The keys of this array are the attribute names, the values + are the attribute values. Attribute names are case-folded on the same + criteria as element names. Attribute values are + not case-folded. +

The original order of the attributes can be retrieved by + walking through attribs the normal + way, using each(). The first key in the + array was the first attribute, and so on. +

+

The function named by endElementHandler + must accept two parameters: +

endElementHandler (int parser, string name)

+

parser

The first parameter, parser, is a + reference to the XML parser calling the + handler. +

name

The second parameter, name, contains + the name of the element for which this handler is called. If + case-folding is in + effect for this parser, the element name will be in uppercase + letters. +

+

If a handler function is set to an empty string, or + false, the handler in question is disabled. +

True is returned if the handlers are set up, false if + parser is not a parser. +

There is currently no support for object/method handlers. See + xml_set_object() for using the XML parser + within an object. +


PrevHomeNext
xml_set_objectUpxml_set_character_data_handler
\ No newline at end of file diff --git a/function.xml-set-external-entity-ref-handler.html b/function.xml-set-external-entity-ref-handler.html new file mode 100644 index 0000000..a93fa9c --- /dev/null +++ b/function.xml-set-external-entity-ref-handler.html @@ -0,0 +1,377 @@ +xml_set_external_entity_ref_handler
PHP Manual
PrevNext

xml_set_external_entity_ref_handler

(PHP3 >= 3.0.6, PHP4 )

xml_set_external_entity_ref_handler -- set up external entity reference handler

Description

int + xml_set_external_entity_ref_handler + (int parser, string handler)

Sets the notation declaration handler function for the XML parser + parser. handler is + a string containing the name of a function that must exist when + xml_parse() is called for + parser. +

The function named by handler must accept + five parameters, and should return an integer value. If the + value returned from the handler is false (which it will be if no + value is returned), the XML parser will stop parsing and + xml_get_error_code() will return XML_ERROR_EXTERNAL_ENTITY_HANDLING. +

int handler (int parser, string + openEntityNames, string base, string systemId, string publicId)

+

parser

The first parameter, parser, is a + reference to the XML parser calling the handler. +

openEntityNames

The second parameter, openEntityNames, + is a space-separated list of the names of the entities that + are open for the parse of this entity (including the name of + the referenced entity). +

base

This is the base for resolving the system identifier + (systemid) of the external entity. + Currently this parameter will always be set to an empty + string. +

systemId

The fourth parameter, systemId, is the + system identifier as specified in the entity declaration. +

publicId

The fifth parameter, publicId, is the + public identifier as specified in the entity declaration, or + an empty string if none was specified; the whitespace in the + public identifier will have been normalized as required by + the XML spec. +

+

If a handler function is set to an empty string, or + false, the handler in question is + disabled. +

True is returned if the handler is set up, false if + parser is not a parser. +

There is currently no support for object/method handlers. See + xml_set_object() for using the XML parser + within an object. +


PrevHomeNext
xml_set_notation_decl_handlerUpxml_parse
\ No newline at end of file diff --git a/function.xml-set-notation-decl-handler.html b/function.xml-set-notation-decl-handler.html new file mode 100644 index 0000000..bf7ad7a --- /dev/null +++ b/function.xml-set-notation-decl-handler.html @@ -0,0 +1,388 @@ +xml_set_notation_decl_handler
PHP Manual
PrevNext

xml_set_notation_decl_handler

(PHP3 >= 3.0.6, PHP4 )

xml_set_notation_decl_handler -- set up notation declaration handler

Description

int + xml_set_notation_decl_handler + (int parser, string handler)

Sets the notation declaration handler function for the XML parser + parser. handler is + a string containing the name of a function that must exist when + xml_parse() is called for + parser. +

A notation declaration is part of the document's DTD and has the + following format:
<!NOTATION
+     name {systemId |
+     publicId}>
See section 4.7 of the XML 1.0 + spec for the definition of notation declarations. +

The function named by handler must accept + five parameters: +

handler (int parser, string notationName, string base, string systemId, string publicId)

+

parser

The first parameter, parser, is a + reference to the XML parser calling the + handler. +

notationName

This is the notation's name, as per + the notation format described above. +

base

This is the base for resolving the system identifier + (systemId) of the notation + declaration. Currently this parameter will always be set to + an empty string. +

systemId

System identifier of the external notation + declaration. +

publicId

Public identifier of the external notation + declaration. +

+

If a handler function is set to an empty string, or + false, the handler in question is + disabled. +

True is returned if the handler is set up, false if + parser is not a parser. +

There is currently no support for object/method handlers. See + xml_set_object() for using the XML parser + within an object. +


PrevHomeNext
xml_set_unparsed_entity_decl_handlerUpxml_set_external_entity_ref_handler
\ No newline at end of file diff --git a/function.xml-set-object.html b/function.xml-set-object.html new file mode 100644 index 0000000..6ce20cc --- /dev/null +++ b/function.xml-set-object.html @@ -0,0 +1,240 @@ +xml_set_object
PHP Manual
PrevNext

xml_set_object

(PHP4 >= 4.0b4)

xml_set_object -- Use XML Parser within an object

Description

void xml_set_object (int parser, object &object)

This function allows to use parser inside + object. All callback functions could be + set with xml_set_element_handler() etc and + assumed to be methods of object. +


<?php
+class xml  {
+var $parser;
+
+function xml() {
+    $this->parser = xml_parser_create();
+    xml_set_object($this->parser,&$this);
+    xml_set_element_handler($this->parser,"tag_open","tag_close");
+    xml_set_character_data_handler($this->parser,"cdata");
+}
+
+function parse($data) { 
+    xml_parse($this->parser,$data);
+}
+
+function tag_open($parser,$tag,$attributes) { 
+    var_dump($parser,$tag,$attributes); 
+}
+
+function cdata($parser,$cdata) { 
+    var_dump($parser,$cdata);
+}
+
+function tag_close($parser,$tag) { 
+    var_dump($parser,$tag); 
+}
+
+} // end of class xml
+
+$xml_parser = new xml();
+$xml_parser->parse("<A ID=\"hallo\">PHP</A>");
+?>
+    

PrevHomeNext
xml_parser_createUpxml_set_element_handler
\ No newline at end of file diff --git a/function.xml-set-processing-instruction-handler.html b/function.xml-set-processing-instruction-handler.html new file mode 100644 index 0000000..377ce51 --- /dev/null +++ b/function.xml-set-processing-instruction-handler.html @@ -0,0 +1,367 @@ +xml_set_processing_instruction_handler
PHP Manual
PrevNext

xml_set_processing_instruction_handler

(PHP3 >= 3.0.6, PHP4 )

xml_set_processing_instruction_handler --  + Set up processing instruction (PI) handler +

Description

int + xml_set_processing_instruction_handler + (int parser, string handler)

Sets the processing instruction (PI) handler function for the XML + parser parser. + handler is a string containing the name of + a function that must exist when xml_parse() is + called for parser. +

A processing instruction has the following format: +

<?
+       target 
+       data?>
+      

+ You can put PHP code into such a tag, but be aware of one + limitation: in an XML PI, the PI end tag + (?>) can not be quoted, so this character + sequence should not appear in the PHP code you embed with PIs in + XML documents. If it does, the rest of the PHP code, as well as + the "real" PI end tag, will be treated as character data. +

The function named by handler must accept + three parameters: +

handler (int parser, string target, string data)

+

parser

The first parameter, parser, is a + reference to the XML parser calling the + handler.

target

The second parameter, target, contains + the PI target.

data

The third parameter, data, contains + the PI data.

If a handler function is set to an empty string, or + false, the handler in question is disabled. +

True is returned if the handler is set up, false if + parser is not a parser. +

There is currently no support for object/method handlers. See + xml_set_object() for using the XML parser + within an object. +


PrevHomeNext
xml_set_character_data_handlerUpxml_set_default_handler
\ No newline at end of file diff --git a/function.xml-set-unparsed-entity-decl-handler.html b/function.xml-set-unparsed-entity-decl-handler.html new file mode 100644 index 0000000..e812359 --- /dev/null +++ b/function.xml-set-unparsed-entity-decl-handler.html @@ -0,0 +1,411 @@ +xml_set_unparsed_entity_decl_handler
PHP Manual
PrevNext

xml_set_unparsed_entity_decl_handler

(PHP3 >= 3.0.6, PHP4 )

xml_set_unparsed_entity_decl_handler --  + Set up unparsed entity declaration handler +

Description

int + xml_set_unparsed_entity_decl_handler + (int parser, string handler)

Sets the unparsed entity declaration handler function for the XML + parser parser. + handler is a string containing the name of + a function that must exist when xml_parse() is + called for parser.

This handler will be called if the XML parser encounters an + external entity declaration with an NDATA declaration, like the + following: +

<!ENTITY name {publicId | systemId} 
+        NDATA notationName>
+     
+

See section 4.2.2 of + the XML 1.0 spec for the definition of notation declared + external entities. +

The function named by + handler must accept six parameters: +

handler (int parser, string entityName, string base, string systemId, string publicId, string notationName)

+

parser

The first parameter, parser, is a + reference to the XML parser calling the + handler. +

entityName

The name of the entity that is about to be defined. +

base

This is the base for resolving the system identifier + (systemId) of the external + entity. Currently this parameter will always be set to + an empty string. +

systemId

System identifier for the external entity. +

publicId

+ Public identifier for the external entity. +

notationName

+ Name of the notation of this entity (see + xml_set_notation_decl_handler()). +

If a handler function is set to an empty string, or + false, the handler in question is disabled. +

True is returned if the handler is set up, false if + parser is not a parser. +

There is currently no support for object/method handlers. See + xml_set_object() for using the XML parser + within an object. +


PrevHomeNext
xml_set_default_handlerUpxml_set_notation_decl_handler
\ No newline at end of file diff --git a/function.xmldoc.html b/function.xmldoc.html new file mode 100644 index 0000000..640e702 --- /dev/null +++ b/function.xmldoc.html @@ -0,0 +1,180 @@ +xmldoc
PHP Manual
PrevNext

xmldoc

(PHP4 >= 4.0b4)

xmldoc -- Creates a DOM object of an XML document

Description

object xmldoc (string str)

The function parses the XML document in + str and returns an object of class "Dom + document", having the properties "doc" (resource), "version" + (string) and "type" (long). +


PrevHomeNext
DOM XML functionsUpxmldocfile
\ No newline at end of file diff --git a/function.xmldocfile.html b/function.xmldocfile.html new file mode 100644 index 0000000..49d091d --- /dev/null +++ b/function.xmldocfile.html @@ -0,0 +1,183 @@ +xmldocfile
PHP Manual
PrevNext

xmldocfile

(PHP4 >= 4.0b4)

xmldocfile -- Creates a DOM object from XML file

Description

object xmldocfile (string filename)

The function parses the XML document in the file named + filename and returns an object of class + "Dom document", having the properties "doc" (resource), "version" + (string). + + + +


PrevHomeNext
xmldocUpxmltree
\ No newline at end of file diff --git a/function.xmltree.html b/function.xmltree.html new file mode 100644 index 0000000..ff75ef8 --- /dev/null +++ b/function.xmltree.html @@ -0,0 +1,181 @@ +xmltree
PHP Manual
PrevNext

xmltree

(PHP4 >= 4.0b4)

xmltree --  + Creates a tree of php objects from XML document +

Description

object xmltree (string str)

The function parses the XML document in + str and returns a tree PHP objects as the + parsed document. +


PrevHomeNext
xmldocfileUpError Handling and Logging Functions
\ No newline at end of file diff --git a/function.yaz-addinfo.html b/function.yaz-addinfo.html new file mode 100644 index 0000000..a2361fa --- /dev/null +++ b/function.yaz-addinfo.html @@ -0,0 +1,174 @@ +yaz_addinfo
PHP Manual
PrevNext

yaz_addinfo

(PHP4 >= 4.0.1)

yaz_addinfo -- Returns additional error information

Description

int yaz_addinfo (int id)

Returns additional error message for target (last request). An + empty string is returned if last operation was a success or if no + additional information was provided by the target. +


PrevHomeNext
YAZ functionsUpyaz_close
\ No newline at end of file diff --git a/function.yaz-close.html b/function.yaz-close.html new file mode 100644 index 0000000..49bc7c0 --- /dev/null +++ b/function.yaz-close.html @@ -0,0 +1,173 @@ +yaz_close
PHP Manual
PrevNext

yaz_close

(PHP4 >= 4.0.1)

yaz_close -- Closes a YAZ connection

Description

int yaz_close (int id)

Closes a connection to a target. The application can no longer + refer to the target with the given ID. +


PrevHomeNext
yaz_addinfoUpyaz_connect
\ No newline at end of file diff --git a/function.yaz-connect.html b/function.yaz-connect.html new file mode 100644 index 0000000..85e7641 --- /dev/null +++ b/function.yaz-connect.html @@ -0,0 +1,189 @@ +yaz_connect
PHP Manual
PrevNext

yaz_connect

(PHP4 >= 4.0.1)

yaz_connect --  + Returns a positive association ID on success; zero on failure +

Description

int yaz_connect (string zurl)

Yaz_connect() prepares for a connection to a + Z39.50 target. The zurl argument takes the form + host[:port][/database]. If port is omitted 210 is used. If + database is omitted Default is used. This function is + non-blocking and doesn't attempt to establish a socket - it + merely prepares a connect to be performed later when + yaz_wait() is called. +


PrevHomeNext
yaz_closeUpyaz_errno
\ No newline at end of file diff --git a/function.yaz-errno.html b/function.yaz-errno.html new file mode 100644 index 0000000..4fb1947 --- /dev/null +++ b/function.yaz-errno.html @@ -0,0 +1,191 @@ +yaz_errno
PHP Manual
PrevNext

yaz_errno

(PHP4 >= 4.0.1)

yaz_errno -- Returns error number

Description

int yaz_errno (int id)

Returns error for target (last request). A positive value is + returned if the target returned a diagnostic code; a value of + zero is returned if no errors occurred (success); negative value + is returned for other errors targets didn't indicate the error in + question. +

Yaz_errno() should be called after network + activity for each target - (after yaz_wait() + returns) to determine the success or failure of the last + operation (e.g. search). +


PrevHomeNext
yaz_connectUpyaz_error
\ No newline at end of file diff --git a/function.yaz-error.html b/function.yaz-error.html new file mode 100644 index 0000000..403e14b --- /dev/null +++ b/function.yaz-error.html @@ -0,0 +1,187 @@ +yaz_error
PHP Manual
PrevNext

yaz_error

(PHP4 >= 4.0.1)

yaz_error -- Returns error description

Description

int yaz_error (int id)

Returns error message for target (last request). An empty string + is returned if last operation was a success. +

Yaz_error() returns a english message + corresponding to the last error number as returned by + yaz_errno(). +


PrevHomeNext
yaz_errnoUpyaz_hits
\ No newline at end of file diff --git a/function.yaz-hits.html b/function.yaz-hits.html new file mode 100644 index 0000000..f027150 --- /dev/null +++ b/function.yaz-hits.html @@ -0,0 +1,176 @@ +yaz_hits
PHP Manual
PrevNext

yaz_hits

(PHP4 >= 4.0.1)

yaz_hits -- Returns number of hits for last search

Description

int yaz_hits (int id)

Yaz_hits() returns number of hits for last + search. +


PrevHomeNext
yaz_errorUpyaz_range
\ No newline at end of file diff --git a/function.yaz-range.html b/function.yaz-range.html new file mode 100644 index 0000000..d33eca2 --- /dev/null +++ b/function.yaz-range.html @@ -0,0 +1,194 @@ +yaz_range
PHP Manual
PrevNext

yaz_range

(PHP4 >= 4.0.1)

yaz_range --  + Specifies the maximum number of records to retrieve +

Description

int yaz_range (int id, int start, int number)

This function is used in conjunction with + yaz_search() to specify the maximum number of + records to retrieve (number) and the first record position + (start). If this function is not invoked (only + yaz_search()) start is set to 1 and number is + set to 10. +

Returns true on success; false on error. +


PrevHomeNext
yaz_hitsUpyaz_record
\ No newline at end of file diff --git a/function.yaz-record.html b/function.yaz-record.html new file mode 100644 index 0000000..61eb410 --- /dev/null +++ b/function.yaz-record.html @@ -0,0 +1,186 @@ +yaz_record
PHP Manual
PrevNext

yaz_record

(PHP4 >= 4.0.1)

yaz_record -- Returns a record

Description

int yaz_record (int id, int pos, string type)

Returns record at position or empty string if no record exists at + given position. +

The yaz_record() function inspects a record in + the current result set at the position specified. If no database + record exists at the given position an empty string is + returned. The argument, type, specifies the form of the returned + record. If type is "string" the record is returned in a string + representation suitable for printing (for XML and SUTRS). If type + is "array" the record is returned as an array representation (for + structured records). +


PrevHomeNext
yaz_rangeUpyaz_search
\ No newline at end of file diff --git a/function.yaz-search.html b/function.yaz-search.html new file mode 100644 index 0000000..7e59947 --- /dev/null +++ b/function.yaz-search.html @@ -0,0 +1,431 @@ +yaz_search
PHP Manual
PrevNext

yaz_search

(PHP4 >= 4.0.1)

yaz_search -- Prepares for a search

Description

int yaz_search (int id, string type, string query)

yaz_search() prepares for a search on the + target with given id. The type represents the query type - only + "rpn" is supported now in which case the third argument specifies + a Type-1 query (RPN). Like yaz_connect() this + function is non-blocking and only prepares for a search to be + executed later when yaz_wait() is called. +

The RPN query

The RPN query is a textual represenation of the Type-1 query as + defined by the Z39.50 standard. However, in the text representation + as used by YAZ a prefix notation is used, that is the operater + precedes the operands. The query string is a sequence of tokens where + white space is ignored is ignored unless surrounded by double + quotes. Tokens beginning with an at-character (@) + are considered operators, otherwise they are treated as search terms. +

Table 1. RPN Operators

SyntaxDescription
@and query1 query2intersection of query1 and query2
@or query1 query2union of query1 and query2
@not query1 query2query1 and not query2
@set nameresult set reference
@attrset set queryspecifies attribute-set for query. This construction is only + allowed once - in the beginning of the whole query
@attr set type=value queryapplies attribute to query. The type and value are + integers specifying the attribute-type and attribute-value + respectively. The set, if given, specifies the + attribute-set.

The following illustrates valid query constructions: +

computer

+ Matches documents where "computer" occur. No attributes are specified. +

"donald knuth"

+ Matches documents where "donald knuth" occur. +

@attr 1=4 art

+ Attribute type is 1 (Bib-1 use), attribute value is 4 + Title), so this should match documents where "art" occur + in the title. +

@attrset gils @and @attr 1=4 art @attr 1=1003 "donald knuth"

+ The query as a whole uses the GILS attributeset. The query matches + documents where "art" occur in the title and in which "donald knuth" + occur in the author. +


PrevHomeNext
yaz_recordUpyaz_syntax
\ No newline at end of file diff --git a/function.yaz-syntax.html b/function.yaz-syntax.html new file mode 100644 index 0000000..28ae35d --- /dev/null +++ b/function.yaz-syntax.html @@ -0,0 +1,189 @@ +yaz_syntax
PHP Manual
PrevNext

yaz_syntax

(PHP4 >= 4.0.1)

yaz_syntax --  + Specifies the object identifier (OID) for the preferred record syntax + for retrieval. +

Description

int yaz_syntax (int id, string syntax)

The syntax may be specified in a raw dot-notation (like + 1.2.840.10003.5.10) or as one of the known + record syntaxes (sutrs, usmarc, grs1, xml, etc.). + This function is used in conjunction with + yaz_search() to specify the preferred record + syntax for retrieval. +


PrevHomeNext
yaz_searchUpyaz_wait
\ No newline at end of file diff --git a/function.yaz-wait.html b/function.yaz-wait.html new file mode 100644 index 0000000..f859121 --- /dev/null +++ b/function.yaz-wait.html @@ -0,0 +1,192 @@ +yaz_wait
PHP Manual
PrevNext

yaz_wait

(PHP4 >= 4.0.1)

yaz_wait -- Executes queries

Description

int yaz_wait (int id, string syntax)

This function carries out networked (blocked) activity for + outstanding requests which have been prepared by the functions + yaz_connect(), + yaz_search(). yaz_wait() + returns when all targets have either completed all requests or + otherwise completed (in case of errors). +


PrevHomeNext
yaz_syntaxUpYP/NIS Functions
\ No newline at end of file diff --git a/function.yp-err-string.html b/function.yp-err-string.html new file mode 100644 index 0000000..8df5593 --- /dev/null +++ b/function.yp-err-string.html @@ -0,0 +1,193 @@ +yp_err_string
PHP Manual
PrevNext

yp_err_string

yp_err_string -- Returns the error string associated with the previous + operation.

Description

string yp_err_string(void );

yp_err_string() returns the error message + associated with the previous operation. Useful to indicate what + exactly went wrong.

Example 1. Example for NIS errors

<?php
+    echo "Error: " . yp_err_string();
+?>
+      

See also: yp_errno


PrevHomeNext
yp_errnoUpODBC functions
\ No newline at end of file diff --git a/function.yp-errno.html b/function.yp-errno.html new file mode 100644 index 0000000..fafea91 --- /dev/null +++ b/function.yp-errno.html @@ -0,0 +1,242 @@ +yp_errno
PHP Manual
PrevNext

yp_errno

yp_errno -- Returns the error code of + the previous operation.

Description

int yp_errno();

+ yp_errno() returns the error code of the + previous operation.

Possible errors are:

1 args to function are bad
2 RPC failure - domain has been unbound
3 can't bind to server on this domain
4 no such map in server's domain
5 no such key in map
6 internal yp server or client error
7 resource allocation failure
8 no more records in map database
9 can't communicate with portmapper
10 can't communicate with ypbind
11 can't communicate with ypserv
12 local domain name not set
13 yp database is bad
14 yp version mismatch
15 access violation
16 database busy

See also: yp_err_string


PrevHomeNext
yp_nextUpyp_err_string
\ No newline at end of file diff --git a/function.yp-first.html b/function.yp-first.html new file mode 100644 index 0000000..ad13e1d --- /dev/null +++ b/function.yp-first.html @@ -0,0 +1,230 @@ +yp_first
PHP Manual
PrevNext

yp_first

(PHP3 >= 3.0.7, PHP4 )

yp_first --  + Returns the first key-value pair from the named map +

Description

array yp_first (string domain, string map)

Yp_first() returns the first key-value + pair from the named map in the named domain, otherwise FALSE. +

Example 1. Example for the NIS first


<?php
+    $entry = yp_first($domain, "passwd.byname");
+    $key = key($entry);
+    echo "First entry in this map has key " . $key 
+          . " and value " . $entry[$key];
+?>
+      
+

See also yp-get-default-domain() + +


PrevHomeNext
yp_matchUpyp_next
\ No newline at end of file diff --git a/function.yp-get-default-domain.html b/function.yp-get-default-domain.html new file mode 100644 index 0000000..60082b5 --- /dev/null +++ b/function.yp-get-default-domain.html @@ -0,0 +1,224 @@ +yp_get_default_domain
PHP Manual
PrevNext

yp_get_default_domain

(PHP3 >= 3.0.7, PHP4 )

yp_get_default_domain -- Fetches the machine's default NIS domain

Description

int yp_get_default_domain (void )

Yp_get_default_domain() returns the default + domain of the node or FALSE. Can be used as the domain parameter + for successive NIS calls. +

+ A NIS domain can be described a group of NIS maps. Every host + that needs to look up information binds itself to a certain + domain. Refer to the documents mentioned at the beginning for + more detailed information. +

Example 1. Example for the default domain


<?php
+$domain = yp_get_default_domain();
+echo "Default NIS domain is: " . $domain;
+?>
+      
+


PrevHomeNext
YP/NIS FunctionsUpyp_order
\ No newline at end of file diff --git a/function.yp-master.html b/function.yp-master.html new file mode 100644 index 0000000..ea22f1b --- /dev/null +++ b/function.yp-master.html @@ -0,0 +1,228 @@ +yp_master
PHP Manual
PrevNext

yp_master

(PHP3 >= 3.0.7, PHP4 )

yp_master --  + Returns the machine name of the master NIS server for a map +

Description

string yp_master (string domain, string map)

Yp_master() returns the machine name of + the master NIS server for a map. +

Example 1. Example for the NIS master


<?php
+$number = yp_master ($domain, $mapname);
+echo "Master for this map is: " . $master;
+?>
+      
+

See also yp-get-default-domain(). + +


PrevHomeNext
yp_orderUpyp_match
\ No newline at end of file diff --git a/function.yp-match.html b/function.yp-match.html new file mode 100644 index 0000000..d2bfbfc --- /dev/null +++ b/function.yp-match.html @@ -0,0 +1,230 @@ +yp_match
PHP Manual
PrevNext

yp_match

(PHP3 >= 3.0.7, PHP4 )

yp_match -- Returns the matched line

Description

string yp_match (string domain, string map, string key)

Yp_match() returns the value associated with + the passed key out of the specified map or FALSE. This key must + be exact.

Example 1. Example for NIS match


<?php
+$entry = yp_match ($domain, "passwd.byname", "joe");
+echo "Matched entry is: " . $entry;
+?>
+      
+

In this case this could be: joe:##joe:11111:100:Joe + User:/home/j/joe:/usr/local/bin/bash +

See also yp-get-default-domain() + +


PrevHomeNext
yp_masterUpyp_first
\ No newline at end of file diff --git a/function.yp-next.html b/function.yp-next.html new file mode 100644 index 0000000..2c8a28b --- /dev/null +++ b/function.yp-next.html @@ -0,0 +1,236 @@ +yp_next
PHP Manual
PrevNext

yp_next

(PHP3 >= 3.0.7, PHP4 )

yp_next -- Returns the next key-value pair in the named + map.

Description

array yp_next (string domain, string map, string key)

Yp_next() returns the next key-value pair in + the named map after the specified key or FALSE. +

Example 1. Example for NIS next


<?php
+$entry = yp_next ($domain, "passwd.byname", "joe");
+
+if (!$entry) {
+    echo yp_errno() . ": " . yp_err_string();
+}
+
+$key = key ($entry);
+
+echo "The next entry after joe has key " . $key 
+      . " and value " . $entry[$key];
+?>
+      
+

+ See also yp-get-default-domain(). + +


PrevHomeNext
yp_firstUpZlib Compression Functions
\ No newline at end of file diff --git a/function.yp-order.html b/function.yp-order.html new file mode 100644 index 0000000..6f2173f --- /dev/null +++ b/function.yp-order.html @@ -0,0 +1,226 @@ +yp_order
PHP Manual
PrevNext

yp_order

(PHP3 >= 3.0.7, PHP4 )

yp_order -- Returns the order number for a map

Description

int yp_order (string domain, string map)

Yp_order() returns the order number for a map + or FALSE. +

Example 1. Example for the NIS order


<?php
+    $number = yp_order($domain,$mapname);
+    echo "Order number for this map is: " . $order;
+?>
+      
+

See also yp-get-default-domain(). + +


PrevHomeNext
yp_get_default_domainUpyp_master
\ No newline at end of file diff --git a/function.zend-logo-guid.html b/function.zend-logo-guid.html new file mode 100644 index 0000000..4dd2095 --- /dev/null +++ b/function.zend-logo-guid.html @@ -0,0 +1,184 @@ +zend_logo_guid
PHP Manual
PrevNext

zend_logo_guid

(PHP4 >= 4.0b4)

zend_logo_guid -- Get the zend guid

Description

string zend_logo_guid (void)

Note: + This funcionality was added in PHP 4 Beta 4. +

+


PrevHomeNext
set_time_limitUpget_loaded_extensions
\ No newline at end of file diff --git a/functions.arguments.html b/functions.arguments.html new file mode 100644 index 0000000..f1e860f --- /dev/null +++ b/functions.arguments.html @@ -0,0 +1,503 @@ +Function arguments
PHP Manual
PrevChapter 12. FunctionsNext

Function arguments

Information may be passed to functions via the argument list, + which is a comma-delimited list of variables and/or constants. +

PHP supports passing arguments by value (the default), passing by + reference, and default argument + values. Variable-length argument lists are supported only + in PHP 4 and later; see Variable-length argument + lists and the function references for + func_num_args(), + func_get_arg(), and + func_get_args() for more information. A + similar effect can be achieved in PHP 3 by passing an array of + arguments to a function: + +


function takes_array($input) {
+    echo "$input[0] + $input[1] = ", $input[0]+$input[1];
+}
+     

+

Making arguments be passed by reference

By default, function arguments are passed by value (so that if + you change the value of the argument within the function, it does + not get changed outside of the function). If you wish to allow a + function to modify its arguments, you must pass them by + reference. +

If you want an argument to a function to always be passed by + reference, you can prepend an ampersand (&) to the argument + name in the function definition: + +


function add_some_extra(&$string) {
+    $string .= 'and something extra.';
+}
+$str = 'This is a string, ';
+add_some_extra($str);
+echo $str;    // outputs 'This is a string, and something extra.'
+      

+

If you wish to pass a variable by reference to a function which + does not do this by default, you may prepend an ampersand to the + argument name in the function call: + +


function foo ($bar) {
+    $bar .= ' and something extra.';
+}
+$str = 'This is a string, ';
+foo ($str);
+echo $str;    // outputs 'This is a string, '
+foo (&$str);
+echo $str;    // outputs 'This is a string, and something extra.'
+      

+

Default argument values

A function may define C++-style default values for scalar + arguments as follows: + +


function makecoffee ($type = "cappucino") {
+    return "Making a cup of $type.\n";
+}
+echo makecoffee ();
+echo makecoffee ("espresso");
+      

+

The output from the above snippet is: + +

Making a cup of cappucino.
+Making a cup of espresso.
+     
+

The default value must be a constant expression, not (for + example) a variable or class member. +

Note that when using default arguments, any defaults should be on + the right side of any non-default arguments; otherwise, things + will not work as expected. Consider the following code snippet: + +


function makeyogurt ($type = "acidophilus", $flavour) {
+    return "Making a bowl of $type $flavour.\n";
+}
+ 
+echo makeyogurt ("raspberry");   // won't work as expected
+      

+

The output of the above example is: + +

Warning: Missing argument 2 in call to makeyogurt() in 
+/usr/local/etc/httpd/htdocs/php3test/functest.html on line 41
+Making a bowl of raspberry .
+     
+

Now, compare the above with this: + +


function makeyogurt ($flavour, $type = "acidophilus") {
+    return "Making a bowl of $type $flavour.\n";
+}
+ 
+echo makeyogurt ("raspberry");   // works as expected
+      

+

The output of this example is: + +

Making a bowl of acidophilus raspberry.
+     
+

Variable-length argument lists

PHP 4 has support for variable-length argument lists in + user-defined functions. This is really quite easy, using the + func_num_args(), + func_get_arg(), and + func_get_args() functions. +

No special syntax is required, and argument lists may still be + explicitly provided with function definitions and will behave as + normal. +


PrevHomeNext
FunctionsUpReturning values
\ No newline at end of file diff --git a/functions.html b/functions.html new file mode 100644 index 0000000..34b478e --- /dev/null +++ b/functions.html @@ -0,0 +1,268 @@ +Functions
PHP Manual
PrevNext

Chapter 12. Functions

Table of Contents
User-defined functions
Function arguments
Returning values
old_function
Variable functions

User-defined functions

A function may be defined using syntax such as the following: + +


function foo ($arg_1, $arg_2, ..., $arg_n) {
+    echo "Example function.\n";
+    return $retval;
+}
+     

+

Any valid PHP code may appear inside a function, even other + functions and class + definitions. +

In PHP 3, functions must be defined before they are referenced. No + such requirement exists in PHP 4. +

PHP does not support function overloading, nor is it possible to + undefine or redefine previously-declared functions. +

PHP 3 does not support variable numbers of arguments to functions, + although default arguments are supported (see Default argument + values for more information). PHP 4 supports both: see Variable-length argument + lists and the function references for + func_num_args(), + func_get_arg(), and + func_get_args() for more information. +


PrevHomeNext
include_once()UpFunction arguments
\ No newline at end of file diff --git a/functions.old-syntax.html b/functions.old-syntax.html new file mode 100644 index 0000000..cd3f200 --- /dev/null +++ b/functions.old-syntax.html @@ -0,0 +1,207 @@ +old_function
PHP Manual
PrevChapter 12. FunctionsNext

old_function

The old_function statement allows you to + declare a function using a syntax identical to PHP/FI2 (except you + must replace 'function' with 'old_function'. +

This is a deprecated feature, and should only be used by the + PHP/FI2->PHP 3 convertor. +

Warning

Functions declared as old_function cannot be + called from PHP's internal code. Among other things, this means + you can't use them in functions such as + usort(), array_walk(), and + register_shutdown_function(). You can get + around this limitation by writing a wrapper function (in normal + PHP 3 form) to call the old_function. +


PrevHomeNext
Returning valuesUpVariable functions
\ No newline at end of file diff --git a/functions.returning-values.html b/functions.returning-values.html new file mode 100644 index 0000000..ade599a --- /dev/null +++ b/functions.returning-values.html @@ -0,0 +1,237 @@ +Returning values
PHP Manual
PrevChapter 12. FunctionsNext

Returning values

Values are returned by using the optional return statement. Any + type may be returned, including lists and objects. + +


function square ($num) {
+    return $num * $num;
+}
+echo square (4);   // outputs '16'.
+     

+

You can't return multiple values from a function, but similar + results can be obtained by returning a list. + +


function small_numbers() {
+    return array (0, 1, 2);
+}
+list ($zero, $one, $two) = small_numbers();
+     

+

To return a reference from a function, you have to use + the reference operator & in both the function declaration and + when assigning the return value to a variable: +


function &returns_reference() {
+    return &$someref;
+}
+
+$newref = &returns_reference();
+     

+


PrevHomeNext
Function argumentsUpold_function
\ No newline at end of file diff --git a/functions.variable-functions.html b/functions.variable-functions.html new file mode 100644 index 0000000..54d33e5 --- /dev/null +++ b/functions.variable-functions.html @@ -0,0 +1,197 @@ +Variable functions
PHP Manual
PrevChapter 12. FunctionsNext

Variable functions

PHP supports the concept of variable functions. This means that if + a variable name has parentheses appended to it, PHP will look for + a function with the same name as whatever the variable evaluates + to, and will attempt to execute it. Among other things, this can + be used to implement callbacks, function tables, and so forth. +

Example 12-1. Variable function example


<?php
+function foo() {
+    echo "In foo()<br>\n";
+}
+
+function bar( $arg = '' ) {
+    echo "In bar(); argument was '$arg'.<br>\n";
+}
+
+$func = 'foo';
+$func();
+$func = 'bar';
+$func( 'test' );
+?>
+     
+


PrevHomeNext
old_functionUpClasses and Objects
\ No newline at end of file diff --git a/getting-started.html b/getting-started.html new file mode 100644 index 0000000..1305193 --- /dev/null +++ b/getting-started.html @@ -0,0 +1,163 @@ +Getting Started
PHP Manual
PrevNext

I. Getting Started

Table of Contents
1. Introduction
2. Installation
3. Configuration
4. Security

PrevHomeNext
Preface Introduction
\ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..2c7529b --- /dev/null +++ b/index.html @@ -0,0 +1,2 @@ + + diff --git a/install-problems.html b/install-problems.html new file mode 100644 index 0000000..9140c7b --- /dev/null +++ b/install-problems.html @@ -0,0 +1,210 @@ +Problems?
PHP Manual
PrevChapter 2. InstallationNext

Problems?

Read the FAQ

Some problems are more common than others. The most common ones + are listed in the PHP FAQ, found at http://www.php.net/FAQ.php +

Bug reports

If you think you have found a bug in PHP, please report it. The + PHP developers probably don't know about it, and unless you + report it, chances are it won't be fixed. You can report bugs + using the bug-tracking system at http://www.php.net/bugs.php. +

Other problems

If you are still stuck, someone on the PHP mailing list may be + able to help you. You should check out the archive first, in case + someone already answered someone else who had the same problem as + you. The archives are available from the support page on http://www.php.net/. To subscribe to the PHP + mailing list, send an empty mail to php-general-subscribe@lists.php.net. + The mailing list address is + php-general@lists.php.net. +

If you want to get help on the mailing list, please try to be + precise and give the necessary details about your environment + (which operating system, what PHP version, what web server, if + you are running PHP as CGI or a server module, etc.), and + preferably enough code to make others able to reproduce and test + your problem. +


PrevHomeNext
Installation on Windows 95/98/NT systemsUpConfiguration
\ No newline at end of file diff --git a/install-security.html b/install-security.html new file mode 100644 index 0000000..bb59610 --- /dev/null +++ b/install-security.html @@ -0,0 +1,146 @@ +Security
PHP3 Manual
PrevChapter 2. InstallationNext

Security

PHP is a powerful tool. As with many other powerful tools, it is + possible to shoot yourself in the foot with it. PHP has + functionality that, if carelessly used, may cause security + problems on your system. The best way of preventing this is to + always know what you are doing. Read the Security chapter for more + information. + +


PrevHomeNext
Problems?UpConfiguration
\ No newline at end of file diff --git a/install-unix.html b/install-unix.html new file mode 100644 index 0000000..85b5c8f --- /dev/null +++ b/install-unix.html @@ -0,0 +1,2187 @@ +Installation on UNIX systems
PHP Manual
PrevChapter 2. InstallationNext

Installation on UNIX systems

This section will guide you through the configuration and + installation of PHP. Prerequisite knowledge and software: + +

  • Basic UNIX skills (being able to operate "make" and a C + compiler) +

  • An ANSI C compiler +

  • A web server +

+

Quick Installation Instructions (Apache Module Version)


1.  gunzip apache_1.3.x.tar.gz
+2.  tar xvf apache_1.3.x.tar
+3.  gunzip php-x.x.x.tar.gz
+4.  tar xvf php-x.x.x.tar
+5.  cd apache_1.3.x
+6.  ./configure --prefix=/www
+7.  cd ../php-x.x.x
+8.  ./configure --with-mysql --with-apache=../apache_1.3.x --enable-track-vars
+9.  make
+10. make install
+11. cd ../apache_1.3.x
+12. for PHP 3: ./configure --activate-module=src/modules/php3/libphp3.a
+    for PHP 4: ./configure --activate-module=src/modules/php4/libphp4.a
+13. make
+14. make install
+
+  Instead of this step you may prefer to simply copy the httpd binary
+  overtop of your existing binary.  Make sure you shut down your
+  server first though.
+
+15. cd ../php-x.x.x
+16. for PHP 3: cp php3.ini-dist /usr/local/lib/php3.ini
+    for PHP 4: cp php.ini-dist /usr/local/lib/php.ini
+
+  You can edit your .ini file to set PHP options.  If
+  you prefer this file in another location, use
+  --with-config-file-path=/path in step 8.
+
+17. Edit your httpd.conf or srm.conf file and add: 
+      
+     For PHP 3:   AddType application/x-httpd-php3 .php3
+     For PHP 4:   AddType application/x-httpd-php .php
+ 
+  You can choose any extension you wish here.  .php is simply the one
+  we suggest. You can even include .html .
+
+
+18. Use your normal procedure for starting the Apache server. (You must
+    stop and restart the server, not just cause the server to reload by
+    use a HUP or USR1 signal.)
+      

+

Apache Module

PHP can be compiled in a number of different ways. Here is a + quick summary: +


./configure --with-apxs --with-pgsql
+      

+

This will create a libphp4.so shared library + that is loaded into Apache using a LoadModule line in Apache's + httpd.conf file. The PostgreSQL support is + embedded into this libphp4.so library. +


./configure --with-apxs --with-pgsql=shared
+      

+

This will again create a libphp4.so shared + library for Apache, but it will also create a + pgsql.so shared library that is loaded into + PHP either by using the extension directive in + php.ini file or by loading it explicitly in + a script using the dl() function. +


./configure --with-apache=/path/to/apache_source --with-pgsql
+      

+

This will create a libmodphp4.a library, a + mod_php4.c and some accompanying files and + copy this into the src/modules/php4 directory + in the Apache source tree. Then you compile Apache using + --activate-module=src/modules/php4/libphp4.a + and the Apache build system will create + libphp4.a and link it statically into the + httpd binary. The PostgreSQL support is + included directly into this httpd binary, so + the final result here is a single httpd + binary that includes all of Apache and all of PHP. +


./configure --with-apache=/path/to/apache_source --with-pgsql=shared
+      

+

Same as before, except instead of including PostgreSQL support + directly into the final httpd you will get a + pgsql.so shared library that you can load + into PHP from either the php.ini file or + directly using dl(). +

When choosing to build PHP in different ways, you should consider + the advantages and drawbacks of each method. Building as a shared + object will mean that you can compile apache separately, and don't + have to recompile everything as you add to, or change, PHP. + Building PHP into apache (static method) means that PHP will + load and run faster. For more information, see the Apache + webpage on DSO support. +

fhttpd Module

To build PHP as an fhttpd module, answer "yes" to "Build as an + fhttpd module?" (the --with-fhttpd=DIR + option to configure) and specify the fhttpd source base + directory. The default directory is /usr/local/src/fhttpd. If you are + running fhttpd, building PHP as a module will give better + performance, more control and remote execution + capability. +

CGI version

The default is to build PHP as a CGI program. If you are + running a web server PHP has module support for, you should + generally go for that solution for performance reasons. However, + the CGI version enables Apache users to run different + PHP-enabled pages under different user-ids. Please make sure + you read through the Security + chapter if you are going to run PHP as a CGI. +

Database Support Options

PHP has native support for a number of databases (as well as + ODBC): +

Adabas D


      --with-adabas=DIR
+     

Enables Adabas D support. The parameter is the Adabas D + install directory and defaults to /usr/local/adabasd. +

Adabas home page +

dBase


      --with-dbase
+     

Enables the bundled DBase support. No external libraries are + required. +

filePro


      --with-filepro
+     

Enables the bundled read-only filePro support. No external + libraries are required. +

IBM DB2


      --with-ibm-db2=DIR
+     

Enables IBM DB2 support. The parameter to this option is the + DB2 base install directory and defaults to + /home/db2inst1/sqllib. +

IBM DB2 home page +

mSQL


      --with-msql=DIR
+     

Enables mSQL support. The parameter to this option is the mSQL + install directory and defaults to /usr/local/Hughes. This is the + default directory of the mSQL 2.0 distribution. + configure automatically detects which mSQL + version you are running and PHP supports both 1.0 and 2.0, but + if you compile PHP with mSQL 1.0, you can only access mSQL 1.0 + databases, and vice-versa. +

See also mSQL Configuration + Directives in the configuration + file. +

mSQL home page +

MySQL


      --with-mysql=DIR
+     

Enables MySQL support. The parameter to this option is the + MySQL install directory and defaults to /usr/local. This is the default + installation directory of the MySQL distribution. +

See also MySQL + Configuration Directives in the configuration file. +

MySQL home page +

iODBC


      --with-iodbc=DIR
+     

Includes iODBC support. This feature was first developed for + iODBC Driver Manager, a freely redistributable ODBC driver + manager which runs under many flavors of UNIX. The parameter to + this option is the iODBC installation directory and defaults to + /usr/local.

FreeODBC home page + or iODBC home page +

OpenLink ODBC


      --with-openlink=DIR
+     

Includes OpenLink ODBC support. The parameter to this option is + the OpenLink ODBC installation directory and defaults to + /usr/local/openlink. +

OpenLink Software's home + page +

Oracle


      --with-oracle=DIR
+     

Includes Oracle support. Has been tested and should be working + at least with Oracle versions 7.0 through 7.3. The parameter is + the ORACLE_HOME directory. You do not have to + specify this parameter if your Oracle environment has been set + up.

Oracle home page +

PostgreSQL


      --with-pgsql=DIR
+     

Includes PostgreSQL support. The parameter is the PostgreSQL + base install directory and defaults to /usr/local/pgsql. +

See also Postgres + Configuration Directives in the configuration file. +

PostgreSQL home + page +

Solid


      --with-solid=DIR
+     

Includes Solid support. The parameter is the Solid install + directory and defaults to /usr/local/solid. +

Solid home page +

Sybase


      --with-sybase=DIR
+     

Includes Sybase support. The parameter is the Sybase install + directory and defaults to /home/sybase. +

See also Sybase + Configuration Directives in the configuration file. +

Sybase home page +

Sybase-CT


      --with-sybase-ct=DIR
+     

Includes Sybase-CT support. The parameter is the Sybase-CT + install directory and defaults to /home/sybase. +

See also Sybase-CT + Configuration Directives in the configuration + file. +

Velocis


      --with-velocis=DIR
+     

Includes Velocis support. The parameter is the Velocis install + directory and defaults to /usr/local/velocis. +

Velocis home page +

A custom ODBC library


      --with-custom-odbc=DIR
+     

Includes support for an arbitrary custom ODBC library. The + parameter is the base directory and defaults to /usr/local. +

This option implies that you have defined CUSTOM_ODBC_LIBS when + you run the configure script. You also must have a valid odbc.h + header somewhere in your include path. If you don't have one, + create it and include your specific header from there. Your + header may also require some extra definitions, particularly + when it is multiplatform. Define them in CFLAGS.

For example, you can use Sybase SQL Anywhere on QNX as + following: + CFLAGS=-DODBC_QNX LDFLAGS=-lunix CUSTOM_ODBC_LIBS="-ldblib + -lodbc" ./configure --with-custom-odbc=/usr/lib/sqlany50 + +

Unified ODBC


      --disable-unified-odbc
+     

Disables the Unified ODBC module, which is a common interface to + all the databases with ODBC-based interfaces, such as Solid, + IBM DB2 and Adabas D. It also works for normal ODBC libraries. + Has been tested with iODBC, Solid, Adabas D, IBM DB2 and Sybase SQL + Anywhere. Requires that one (and only one) of these modules or + the Velocis module is enabled, or a custom ODBC library + specified. This option is only applicable if one of the + following options is used: --with-iodbc, --with-solid, --with-ibm-db2, --with-adabas, --with-velocis, or --with-custom-odbc. +

See also Unified ODBC + Configuration Directives in the configuration + file. +

LDAP


      --with-ldap=DIR
+     

Includes LDAP (Lightweight Directory Access + Protocol) support. The parameter is the LDAP base install + directory, defaults to /usr/local/ldap. +

More information about LDAP can be found in RFC1777 and + RFC1778. +

Other configure options

--with-mcrypt=DIR


      --with-mcrypt
+     

Include support for the mcrypt library. See the mcrypt documentation for more + information. If you use the optional + DIR argument, PHP will look for + mcrypt.h in DIR/include. +

--enable-sysvsem


      --enable-sysvsem
+     

Include support for Sys V semaphores (supported by most Unix + derivates). See the Semaphore and Shared + Memory documentation for more information. +

--enable-sysvshm


      --enable-sysvshm
+     

Include support for Sys V shared memory (supported by most Unix + derivates). See the Semaphore and Shared + Memory documentation for more information. +

--with-xml


      --with-xml
+     

Include support for a non-validating XML parser using James + Clark's expat library. See the + XML function reference for + details. +

--enable-maintainer-mode


      --enable-maintainer-mode
+     

Turns on extra dependencies and compiler warnings used by some + of the PHP developers.

--with-system-regex


      --with-system-regex
+     

Uses the system's regular expression library rather than the + bundled one. If you are building PHP as a server module, you + must use the same library when building PHP as when linking the + server. Enable this if the system's library provides special + features you need. It is recommended that you use the bundled + library if possible.

--with-config-file-path


      --with-config-file-path=DIR
+     

The path used to look for the + configuration file when PHP starts up. +

--with-exec-dir


      --with-exec-dir=DIR
+     

Only allow running of executables in DIR when in safe mode. + Defaults to /usr/local/bin. + This option only sets the default, it may be changed with the + safe_mode_exec_dir + directive in the configuration + file later.

--enable-debug


      --enable-debug
+     

Enables extra debug information. This makes it possible to + gather more detailed information when there are problems with + PHP. (Note that this doesn't have anything to do with debugging + facilities or information available to PHP scripts.) +

--enable-safe-mode


      --enable-safe-mode
+     

Enables "safe mode" by default. This imposes several + restrictions on what PHP can do, such as opening only files + within the document root. Read the Security chapter for more more + information. CGI users should always enable secure mode. This + option only sets the default, it may be enabled or disabled with + the safe_mode directive in + the configuration file + later. +

--enable-track-vars


      --enable-track-vars
+     

Makes PHP keep track of where GET/POST/cookie variables come + from in the arrays HTTP_GET_VARS, HTTP_POST_VARS and + HTTP_COOKIE_VARS. This option only sets the default, it may be + enabled or disabled with the track_vars directive in the + configuration file + later. +

--enable-magic-quotes


      --enable-magic-quotes
+     

Enable magic quotes by default. This option only sets the + default, it may be enabled or disabled with the magic_quotes_runtime + directive in the configuration file + later. See also the magic_quotes_gpc and the magic_quotes_sybase + directives. +

--enable-debugger


      --enable-debugger
+     

Enables the internal PHP debugger support. This feature is + still in an experimental state. See also the Debugger Configuration + directives in the configuration + file. +

--enable-discard-path


      --enable-discard-path
+     

If this is enabled, the PHP CGI binary can safely be placed + outside of the web tree and people will not be able to + circumvent .htaccess security. Read the section in the security + chapter about this option. +

--enable-bcmath


      --enable-bcmath
+     

Enables bc style arbitrary precision math + functions. See also the bcmath.scale option in the + configuration + file. +

--enable-force-cgi-redirect


      --enable-force-cgi-redirect
+     

Enable the security check for internal server redirects. You + should use this if you are running the CGI version with + Apache. +

When using PHP as a CGI binary, PHP by default always first + checks that it is used by redirection (for example under Apache, + by using Action directives). This makes sure that the PHP + binary cannot be used to bypass standard web server + authentication procedures by calling it directly, like http://my.host/cgi-bin/php/secret/doc.html. + This example accesses http://my.host/secret/doc.html but does + not honour any security settings enforced by httpd for directory + /secret. +

Not enabling option disables the check and enables bypassing + httpd security and authentication settings. Do this only if + your server software is unable to indicate that a safe + redirection was done and all your files under your document root + and user directories may be accessed by anyone. +

Read the section in + the security chapter about this option. +

--disable-short-tags


      --disable-short-tags
+     

Disables the short form <? ?> PHP tags. + You must disable the short form if you want to use PHP with + XML. With short tags disabled, the only PHP + code tag is <?php ?>. This option only + sets the default, it may be enabled or disabled with the short_open_tag directive in + the configuration file + later. +

--enable-url-includes


      --enable-url-includes
+     

Makes it possible to run code on other HTTP or FTP servers + directly from PHP with include(). See also the include_path option in the + configuration file. +

--disable-syntax-hl


      --disable-syntax-hl
+     

Turns off syntax highlighting. +

CPPFLAGS and LDFLAGS

To make the PHP installation look for header or library files in + different directories, modify the CPPFLAGS and + LDFLAGS environment variables, respectively. If + you are using a sensible shell, you should be able to do + LDFLAGS=-L/my/lib/dir CPPFLAGS=-I/my/include/dir ./configure + +

Building

When PHP is configured, you are ready to build the CGI executable + or the PHP library. The command make should + take care of this. If it fails and you can't figure out why, see + the Problems section. +

Testing

If you have built PHP as a CGI program, you may test your build + by typing make test. It is always a good idea + to test your build. This way you may catch a problem with PHP on + your platform early instead of having to struggle with it later. +

Benchmarking

If you have built PHP as a CGI program, you may benchmark your + build by typing make bench. Note that if safe + mode is on by default, the benchmark may not be able to finish if + it takes longer then the 30 seconds allowed. This is because the + set_time_limit() can not be used in safe + mode. Use the max_execution_time + configuration setting to control this time for your own + scripts. make bench ignores the configuration file. +


PrevHomeNext
InstallationUpInstallation on Windows 95/98/NT systems
\ No newline at end of file diff --git a/install-windows95-nt.html b/install-windows95-nt.html new file mode 100644 index 0000000..7355ffb --- /dev/null +++ b/install-windows95-nt.html @@ -0,0 +1,958 @@ +Installation on Windows 95/98/NT systems
PHP Manual
PrevChapter 2. InstallationNext

Installation on Windows 95/98/NT systems

This install guide will help you install and configure PHP on your + Windows 9x/NT webservers. This guide was compiled by + Bob Silva. The latest revision can be found at http://www.umesd.k12.or.us/php/win32install.html. +

This guide provides installation support for: +

  • Personal Web Server (Newest version recommended) +

  • Internet Information Server 3 or 4 +

  • Apache 1.3.x +

  • Omni HTTPd 2.0b1 +

+

General Installation Steps

The following steps should be performed on all installations + before the server specific instructions. + +

  • Extract the distribution file to a directory of your choice. + "C:\PHP\" is a good start. +

  • Copy the file, 'php.ini-dist' to your '%WINDOWS%' directory + and rename it to 'php.ini'. Your '%WINDOWS%' directory is + typically: +

    c:\windows for Windows 95/98
    c:\winnt or c:\winnt40 for NT servers

    +

  • Edit your 'php.ini' file: +

    • You will need to change the 'extension_dir' setting to + point to your php-install-dir, or where you have placed + your 'php_*.dll' files. ex: c:\php +

    • If you are using Omni Httpd, do not follow the next step. + Set the 'doc_root' to point to your webservers + document_root. ex: c:\apache\htdocs or c:\webroot +

    • Choose which modules you would like to load when PHP + starts. You can uncomment the: 'extension=php_*.dll' lines + to load these modules. Some modules require you to have + additional libraries installed on your system for the + module to work correctly. The PHP FAQ has more information on + where to get supporting libraries. You can also load a + module dynamically in your script using: + dl("php_*.dll"); +

    • On PWS and IIS, you can set the browscap.ini to point to: + 'c:\windows\system\inetsrv\browscap.ini' on Windows 95/98 + and 'c:\winnt\system32\inetsrv\browscap.ini' on NT + Server. Additional information on using the browscap + functionality in PHP can be found at this mirror, select the "source" + button to see it in action. +

    +

The DLLs for PHP extensions are prefixed with 'php_'. This + prevents confusion between PHP extensions and their supporting + libraries. +

Windows 95/98/NT and PWS/IIS 3

The recommended method for configuring these servers is to use + the INF file included with the distribution + (php_iis_reg.inf). You may want to edit this file and make sure + the extensions and PHP install directories match your + configuration. Or you can follow the steps below to do it + manually. +

WARNING: These steps involve working directly with the windows + registry. One error here can leave your system in an unstable + state. We highly recommend that you back up your registry + first. The PHP Development team will not be held responsible if + you damage your registry. +

  • Run Regedit. +

  • Navigate to: HKEY_LOCAL_MACHINE /System + /CurrentControlSet /Services /W3Svc /Parameters + /ScriptMap. +

  • On the edit menu select: New->String Value. +

  • Type in the extension you wish to use for your php + scripts. ex: .php +

  • Double click on the new string value and enter the path to + php.exe in the value data field. ex: + c:\php\php.exe %s %s. The '%s %s' is VERY + important, PHP will not work properly without it. +

  • Repeat these steps for each extension you wish to associate + with PHP scripts. +

  • Now navigate to: HKEY_CLASSES_ROOT +

  • On the edit menu select: New->Key. +

  • Name the key to the extension you setup in the previous + section. ex: .php +

  • Highlight the new key and in the right side pane, double click + the "default value" and enter phpfile. +

  • Repeat the last step for each extension you set up in the + previous section. +

  • Now create another New->Key under + HKEY_CLASSES_ROOT and name it + phpfile. +

  • Highlight the new key phpfile and in the + right side pane, double click the "default value" and enter + PHP Script. +

  • Right click on the phpfile key and select + New->Key, name it Shell. +

  • Right click on the Shell key and select + New->Key, name it open. +

  • Right click on the open key and select + New->Key, name it + command. +

  • Highlight the new key command and in the + right side pane, double click the "default value" and enter + the path to php.exe. ex: + c:\php\php.exe -q %1. (don't forget the + %1). +

  • Exit Regedit. +

+

PWS and IIS 3 users now have a fully operational system. IIS 3 + users can use a nifty tool from + Steven Genusa to configure their script maps. +

Windows NT and IIS 4

To install PHP on an NT Server running IIS 4, follow these + instructions: +

  • In Internet Service Manager (MMC), select the Web site or the + starting point directory of an application. +

  • Open the directory's property sheets (by right clicking and + selecting properties), and then click the Home Directory, + Virtual Directory, or Directory tab. +

  • Click the Configuration button, and then click the App + Mappings tab. +

  • Click Add, and in the Executable box, type: + c:\path-to-php-dir\php.exe %s %s. You MUST + have the %s %s on the end, PHP will not function properly if + you fail to do this. +

  • In the Extension box, type the file name extension you want + associated with PHP scripts. (You must repeat step 5 and 6 for + each extension you want accociated with PHP + scripts. (.php and + .phtml are common.) +

  • Set up the appropriate security. (This is done in Internet + Service Manager), and if your NT Server uses NTFS file system, + add execute rights for I_USR_ to the directory that contains + php.exe. +

+

Windows 9x/NT and Apache 1.3.x

You must edit your srm.conf or + httpd.conf to configure Apache to work with + the PHP CGI binary. +

Although there can be a few variations of configuring PHP under + Apache, this one is simple enough to be used by the + newcomer. Please consult the Apache Docs for further + configuration directives. +

  • ScriptAlias /php/ "c:/path-to-php-dir/" + +

  • AddType application/x-httpd-php .php + +

  • AddType application/x-httpd-php .phtml + +

  • Action application/x-httpd-php "/php/php.exe" + +

+

To use the source code highlighting feature, simply create a PHP + script file and stick this code in: <?php show_source + ("original_php_script.php"); ?>. Substitute + original_php_script.php with the name of the + file you wish to show the source of. (this is only one way of + doing it). Note: On Win-Apache all back + slashes in a path statement such as: "c:\directory\file.ext", + must be converted to forward slashes. +

Omni HTTPd 2.0b1 for Windows

This has got to be the easiest config there is: +

  • Step 1: Install Omni server +

  • Step 2: Right click on the blue OmniHTTPd icon in the system + tray and select Properties +

  • Step 3: Click on Web Server Global Settings +

  • Step 4: On the 'External' tab, enter: virtual = .php + | actual = c:\path-to-php-dir\php.exe +

  • Step 5: On the Mime tab, enter: + virtual = wwwserver/stdcgi | actual = .php +

  • Step 6: Click OK +

+

Repeat steps 2 - 6 for each extension you want to associate with + PHP. +

PHP Modules

Table 2-1. PHP Modules

php_calendar.dllCalendar conversion functions
php_crypt.dllCrypt functions
php_dbase.dllDBase functions
php_dbm.dllGDBM emulation via Berkely DB2 library
php_filepro.dllREAD ONLY access to filepro databases
php_gd.dllGD Library functions for gif manipulation
php_hyperwave.dllHyperWave functions
php_imap4r2.dllIMAP 4 functions
php_ldap.dllLDAP functions
php_msql1.dllmSQL 1 client
php_msql2.dllmSQL 2 client
php_mssql.dllMSSQL client (requires MSSQL DB-Libraries
php3_mysql.dll (Built into PHP 4)MySQL functions
php_nsmail.dllNetscape mail functions
php_oci73.dllOracle functions
php_snmp.dllSNMP get and walk functions (NT only!)
php_zlib.dllZLib functions
+


PrevHomeNext
Complete list of configure optionsUpProblems?
\ No newline at end of file diff --git a/install.configure.html b/install.configure.html new file mode 100644 index 0000000..b4d9b9b --- /dev/null +++ b/install.configure.html @@ -0,0 +1,3362 @@ +Complete list of configure options
PHP Manual
PrevChapter 2. InstallationNext

Complete list of configure options

Note: + These are only used at compile time. If you want to alter PHP's + runtime configuration, please go to Configuration. +

The following is a complete list of options supported by the PHP 3 + and PHP 4 configure scripts, used when + compiling in Unix-like environments. Some are available in PHP 3, + some in PHP 4, and some in both, as noted. There are many options + the names of which have changed between PHP 3 and PHP 4, but which + accomplish the same things. These entries are cross-referenced to + each other, so if you have a problem getting your PHP 3-era + configuration options to work, check here to see whether the names + have changed. +

Database

--with-adabas[=DIR]

PHP 3, PHP 4: Include Adabas D support. DIR is the Adabas base + install directory, defaults to /usr/local. +

Adabas home page +

--enable-dba=shared

PHP 3: Option not available in PHP 3 +

PHP 4: Build DBA as a shared module +

--enable-dbase

PHP 3: Option not available; use --with-dbase + instead. +

PHP 4: Enable the bundled dbase library. No external libraries + are required. +

--with-dbase

PHP 3: Include the bundled dbase library. No external + libraries are required. +

PHP 4: Option not available; use --enable-dbase + instead. +

--with-db2[=DIR]

PHP 3, PHP 4: Include Berkeley DB2 support +

--with-db3[=DIR]

PHP 3: Option not available in PHP 3 +

PHP 4: Include Berkeley DB3 support +

--with-dbm[=DIR]

PHP 3, PHP 4: Include DBM support +

--with-dbmaker[=DIR]

PHP 3: Option not available in PHP 3 +

PHP 4: Include DBMaker support. DIR is the DBMaker base install + directory, defaults to where the latest version of DBMaker is installed + (such as /home/dbmaker/3.6). +

--with-empress[=DIR]

PHP 3, PHP 4: Include Empress support. DIR is the Empress base install + directory, defaults to $EMPRESSPATH +

--enable-filepro

PHP 3: Option not available; use --with-filepro + instead. +

PHP 4: Enable the bundled read-only filePro support. No + external libraries are required. +

--with-filepro

PHP 3: Include the bundled read-only filePro support. No + external libraries are required. +

PHP 4: Option not available; use --enable-filepro + instead. +

--with-gdbm[=DIR]

PHP 3, PHP 4: Include GDBM support +

--with-hyperwave

PHP 3, PHP 4: Include Hyperwave support +

--with-ibm-db2[=DIR]

PHP 3, PHP 4: Include IBM DB2 support. DIR is the DB2 base + install directory, defaults to + /home/db2inst1/sqllib. +

IBM DB2 home page +

--with-informix[=DIR]

PHP 3, PHP 4: Include Informix support. DIR is the Informix base install + directory, defaults to nothing. +

--with-ingres[=DIR]

PHP 3: Option not available in PHP 3 +

PHP 4: Include Ingres II support. DIR is the Ingres base directory + (default /II/ingres) +

--with-interbase[=DIR]

PHP 3, PHP 4: Include InterBase support. DIR is the InterBase base + install directory, which defaults to /usr/interbase. +

Interbase functions +

Interbase home page +

--with-ldap[=DIR]

PHP 3: Include LDAP support. DIR is the LDAP base install + directory. Defaults to /usr and + /usr/local +

PHP 4: Include LDAP support. DIR is the LDAP base install directory. +

This provides LDAP (Lightweight Directory Access + Protocol support). The parameter is the LDAP base install + directory, defaults to /usr/local/ldap. +

More information about LDAP can be found in RFC1777 and + RFC1778. +

--with-msql[=DIR]

PHP 3, PHP 4: Enables mSQL support. The parameter to this + option is the mSQL install directory and defaults to /usr/local/Hughes. This is the + default directory of the mSQL 2.0 distribution. + configure automatically detects which mSQL + version you are running and PHP supports both 1.0 and 2.0, but + if you compile PHP with mSQL 1.0, you can only access mSQL 1.0 + databases, and vice-versa. +

See also mSQL + Configuration Directives in the configuration file. +

mSQL home page +

--with-mysql[=DIR]

PHP 3: Include MySQL support. DIR is the MySQL base install directory, + defaults to searching through a number of common places for the MySQL + files. +

PHP 4: Include MySQL support. DIR is the MySQL base directory. If + unspecified, the bundled MySQL library will be used. This + option is turned on by default. +

See also MySQL + Configuration Directives in the configuration file. +

MySQL home page +

--with-ndbm[=DIR]

PHP 3, PHP 4: Include NDBM support +

--with-oci8[=DIR]

PHP 3: Option not available in PHP 3 +

PHP 4: Include Oracle-oci8 support. Default DIR is ORACLE_HOME. +

--with-oracle[=DIR]

PHP 3: Include Oracle database support. DIR is Oracle's home directory, + defaults to $ORACLE_HOME. +

PHP 4: Include Oracle-oci7 support. Default DIR is ORACLE_HOME. +

Includes Oracle support. Has been tested and should be + working at least with Oracle versions 7.0 through 7.3. The + parameter is the ORACLE_HOME directory. You do + not have to specify this parameter if your Oracle environment + has been set up. +

Oracle home page +

--with-pgsql[=DIR]

PHP 3: Include PostgresSQL support. DIR is the PostgresSQL base + install directory, which defaults to + /usr/local/pgsql. +

PHP 4: Include PostgreSQL support. DIR is the PostgreSQL base + install directory, which defaults to + /usr/local/pgsql. Set DIR to shared to + build as a dl, or shared,DIR to build as a dl and still specify + DIR. +

See also Postgres + Configuration Directives in the configuration file. +

PostgreSQL home page +

--with-solid[=DIR]

PHP 3, PHP 4: Include Solid support. DIR is the Solid base install + directory, defaults to /usr/local/solid +

Solid home page +

--with-sybase-ct[=DIR]

PHP 3, PHP 4: Include Sybase-CT support. DIR is the Sybase home + directory, defaults to /home/sybase. +

See also Sybase-CT + Configuration Directives in the configuration + file. +

--with-sybase[=DIR]

PHP 3, PHP 4: Include Sybase-DB support. DIR is the Sybase home + directory, which defaults to /home/sybase. +

See also Sybase + Configuration Directives in the configuration file. +

Sybase home page +

--with-openlink[=DIR]

PHP 3, PHP 4: Include OpenLink ODBC support. DIR is the OpenLink base + install directory, defaults to /usr/local/openlink. +

OpenLink Software's home page +

--with-iodbc[=DIR]

PHP 3, PHP 4: Include iODBC support. DIR is the iODBC base install + directory, defaults to /usr/local. +

This feature was first developed for iODBC Driver Manager, a + freely redistributable ODBC driver manager which runs under + many flavors of UNIX. +

FreeODBC home page + or iODBC home page +

--with-custom-odbc[=DIR]

PHP 3, PHP 4: Includes support for an arbitrary custom ODBC + library. The parameter is the base directory and defaults to + /usr/local. +

This option implies that you have defined CUSTOM_ODBC_LIBS + when you run the configure script. You also must have a valid + odbc.h header somewhere in your include path. If you don't + have one, create it and include your specific header from + there. Your header may also require some extra definitions, + particularly when it is multiplatform. Define them in + CFLAGS. +

For example, you can use Sybase SQL Anywhere on QNX as + following: + CFLAGS=-DODBC_QNX LDFLAGS=-lunix CUSTOM_ODBC_LIBS="-ldblib + -lodbc" ./configure --with-custom-odbc=/usr/lib/sqlany50 + +

--disable-unified-odbc

PHP 3: Disable unified ODBC support. Only applicable if iODBC, Adabas, + Solid, Velocis or a custom ODBC interface is enabled. +

PHP 4: Option not available in PHP 4 +

The Unified ODBC module, which is a common interface to all + the databases with ODBC-based interfaces, such as Solid, IBM + DB2 and Adabas D. It also works for normal ODBC libraries. + Has been tested with iODBC, Solid, Adabas D, IBM DB2 and + Sybase SQL Anywhere. Requires that one (and only one) of these + modules or the Velocis module is enabled, or a custom ODBC + library specified. This option is only applicable if one of + the following options is used: --with-iodbc, + --with-solid, + --with-ibm-db2, + --with-adabas, + --with-velocis, + or --with-custom-odbc. +

See also Unified ODBC + Configuration Directives in the configuration + file. +

--with-unixODBC[=DIR]

PHP 3: Option not available in PHP 3 +

PHP 4: Include unixODBC support. DIR is the unixODBC base install + directory, defaults to /usr/local. +

--with-velocis[=DIR]

PHP 3, PHP 4: Include Velocis support. DIR is the Velocis base install + directory, defaults to /usr/local/velocis. +

Velocis home page +

Ecommerce

--with-ccvs[=DIR]

PHP 3: Option not available in PHP 3 +

PHP 4: Compile CCVS support into PHP4. Please specify your CCVS base + install directory as DIR. +

--with-mck[=DIR]

PHP 3: Include Cybercash MCK support. DIR is the cybercash mck + build directory, which defaults to + /usr/src/mck-3.2.0.3-linux. For help, look + in extra/cyberlib. +

PHP 4: Option not available; use --with-cybercash + instead. +

--with-cybercash[=DIR]

PHP 3: Option not available; use --with-mck + instead. +

PHP 4: Include CyberCash support. DIR is the CyberCash MCK install + directory. +

--with-pfpro[=DIR]

PHP 3: Option not available in PHP 3 +

PHP 4: Include Verisign Payflow Pro support +

Graphics

--enable-freetype-4bit-antialias-hack

PHP 3: Option not available in PHP 3 +

PHP 4: Include support for FreeType2 (experimental). +

--with-gd[=DIR]

PHP 3: Include GD support (DIR is GD's install dir). +

PHP 4: Include GD support (DIR is GD's install dir). Set DIR to shared + to build as a dl, or shared,DIR to build as a dl and still specify DIR. +

--without-gd

PHP 3, PHP 4: Disable GD support. +

--with-imagick[=DIR]

PHP 3: Include ImageMagick support. DIR is the install + directory, and if left out, PHP will try to find it on its + own. [experimental] +

PHP 4: Option not available in PHP 4 +

--with-jpeg-dir[=DIR]

PHP 3: jpeg dir for pdflib 2.0 +

PHP 4: jpeg dir for pdflib 3.x +

--with-png-dir[=DIR]

PHP 3: Option not available in PHP 3 +

PHP 4: png dir for pdflib 3.x +

--enable-t1lib

PHP 3: Enable t1lib support. +

PHP 4: Option not available; use --with-t1lib + instead. +

--with-t1lib[=DIR]

PHP 3: Option not available; use --enable-t1lib + instead. +

PHP 4: Include T1lib support. +

--with-tiff-dir[=DIR]

PHP 3: tiff dir for pdflib 2.0 +

PHP 4: tiff dir for pdflib 3.x +

--with-ttf[=DIR]

PHP 3, PHP 4: Include FreeType support +

--with-xpm-dir[=DIR]

PHP 3: Option not available in PHP 3 +

PHP 4: xpm dir for gd-1.8+ +

Miscellaneous

These are being classified over time, where appropriate. +

--disable-bcmath

PHP 3: Compile without BC arbitrary precision math + functions. These functions allow you to operate with numbers + outside of the ranges allowed by regular integers and floats; + see BCMath Arbitrary Precision + Mathematics Functions for more information. +

PHP 4: Option not available; bcmath is not compiled in by + default. Use --enable-bcmath + to compile it in. +

--disable-display-source

PHP 3: Compile without displaying source support +

PHP 4: Option not available in PHP 4 +

--disable-libtool-lock

PHP 3: Option not available in PHP 3 +

PHP 4: avoid locking (might break parallel builds) +

--disable-pear

PHP 3: Option not available in PHP 3 +

PHP 4: Do not install PEAR +

--disable-pic

PHP 3: Option not available in PHP 3 +

PHP 4: Disable PIC for shared objects +

--disable-posix

PHP 3: Option not available in PHP 3; use --without-posix + instead. +

PHP 4: Disable POSIX-like functions +

--disable-rpath

PHP 3: Option not available in PHP 3 +

PHP 4: Disable passing additional runtime library search paths +

--disable-session

PHP 3: Option not available in PHP 3 +

PHP 4: Disable session support +

--enable-bcmath

PHP 3: Option not available in PHP 3; bcmath is compiled in + by default. Use --disable-bcmath + to disable it. +

PHP 4: Compile with bc style precision math functions. Read + README-BCMATH for instructions on how to get this module + installed. These functions allow you to operate with numbers + outside of the ranges allowed by regular integers and floats; + see BCMath Arbitrary Precision + Mathematics Functions for more information. +

--enable-c9x-inline

PHP 3: Option not available in PHP 3 +

PHP 4: Enable C9x-inline semantics +

--enable-calendar

PHP 3: Option not available in PHP 3 +

PHP 4: Enable support for calendar conversion +

--enable-debug

PHP 3, PHP 4: Compile with debugging symbols. +

--enable-debugger

PHP 3: Compile with remote debugging functions +

PHP 4: Option not available in PHP 4 +

--enable-discard-path

PHP 3, PHP 4: If this is enabled, the PHP CGI binary can safely be + placed outside of the web tree and people will not be able to circumvent + .htaccess security. +

--enable-dmalloc

PHP 3, PHP 4: Enable dmalloc +

--enable-exif

PHP 3: Option not available in PHP 3 +

PHP 4: Enable exif support +

--enable-experimental-zts

PHP 3: Option not available in PHP 3 +

PHP 4: This will most likely break your build +

--enable-fast-install[=PKGS]

PHP 3: Option not available in PHP 3 +

PHP 4: optimize for fast installation [default=yes] +

--enable-force-cgi-redirect

PHP 3, PHP 4: Enable the security check for internal server redirects. + You should use this if you are running the CGI version with Apache. +

--enable-inline-optimization

PHP 3: Option not available in PHP 3 +

PHP 4: If you have much memory and are using gcc, you might try this. +

--enable-libgcc

PHP 3: Option not available in PHP 3 +

PHP 4: Enable explicitly linking against libgcc +

--enable-maintainer-mode

PHP 3, PHP 4: enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer +

--enable-memory-limit

PHP 3, PHP 4: Compile with memory limit support. +

--enable-safe-mode

PHP 3, PHP 4: Enable safe mode by default. +

--enable-satellite

PHP 3: Option not available in PHP 3 +

PHP 4: Enable CORBA support via Satellite (Requires ORBit) +

--enable-shared[=PKGS]

PHP 3: Option not available in PHP 3 +

PHP 4: build shared libraries [default=yes] +

--enable-sigchild

PHP 3, PHP 4: Enable PHP's own SIGCHLD handler. +

--enable-static[=PKGS]

PHP 3: Option not available in PHP 3 +

PHP 4: build static libraries [default=yes] +

--enable-sysvsem

PHP 3, PHP 4: Enable System V semaphore support. +

--enable-sysvshm

PHP 3, PHP 4: Enable the System V shared memory support +

--enable-trans-sid

PHP 3: Option not available in PHP 3 +

PHP 4: Enable transparent session id propagation +

--with-cdb[=DIR]

PHP 3, PHP 4: Include CDB support +

--with-config-file-path=PATH

PHP 3: Sets the path in which to look for php3.ini. Defaults to + /usr/local/lib +

PHP 4: Sets the path in which to look for php.ini. Defaults to + /usr/local/lib +

--with-cpdflib[=DIR]

PHP 3: Include ClibPDF support. DIR is the ClibPDF install directory, + defaults to /usr/local. +

PHP 4: Include cpdflib support (requires cpdflib >= 2). DIR is the + cpdfllib install directory, defaults to /usr. +

--with-esoob[=DIR]

PHP 3: Option not available in PHP 3 +

PHP 4: Include Easysoft OOB support. DIR is the OOB base install + directory, defaults to /usr/local/easysoft/oob/client. +

--with-exec-dir[=DIR]

PHP 3, PHP 4: Only allow executables in DIR when in safe mode defaults + to /usr/local/php/bin +

--with-fdftk[=DIR]

PHP 3, PHP 4: Include fdftk support. DIR is the fdftk install directory, + defaults to /usr/local. +

--with-gnu-ld

PHP 3: Option not available in PHP 3 +

PHP 4: assume the C compiler uses GNU ld [default=no] +

--with-icap[=DIR]

PHP 3: Option not available in PHP 3 +

PHP 4: Include ICAP support. +

--with-imap[=DIR]

PHP 3, PHP 4: Include IMAP support. DIR is the IMAP include and + c-client.a directory. +

--with-imsp[=DIR]

PHP 3: Include IMSP support (DIR is IMSP's include dir and libimsp.a + dir). +

PHP 4: Option not available in PHP 4 +

--with-java[=DIR]

PHP 3: Option not available in PHP 3 +

PHP 4: Include Java support. DIR is the base install directory for the + JDK. This extension can only be built as a shared dl. +

--with-kerberos[=DIR]

PHP 3: Option not available in PHP 3 +

PHP 4: Include Kerberos support in IMAP. +

--with-mcal[=DIR]

PHP 3, PHP 4: Include MCAL support. +

--with-mcrypt[=DIR]

PHP 3, PHP 4: Include mcrypt support. DIR is the mcrypt install + directory. +

--with-mhash[=DIR]

PHP 3, PHP 4: Include mhash support. DIR is the mhash install directory. +

--with-mm[=DIR]

PHP 3: Option not available in PHP 3 +

PHP 4: Include mm support for session storage +

--with-mod_charset

PHP 3, PHP 4: Enable transfer tables for mod_charset (Rus Apache). +

--with-pdflib[=DIR]

PHP 3: Include pdflib support (tested with 0.6 and 2.0). DIR is + the pdflib install directory, which defaults to + /usr/local. +

PHP 4: Include pdflib 3.x support. DIR is the pdflib install + directory, which defaults to /usr/local. +

--with-readline[=DIR]

PHP 3: Option not available in PHP 3 +

PHP 4: Include readline support. DIR is the readline install directory. +

--with-regex=TYPE

PHP 3: Option not available in PHP 3 +

PHP 4: regex library type: system, apache, php +

--with-servlet[=DIR]

PHP 3: Option not available in PHP 3 +

PHP 4: Include servlet support. DIR is the base install + directory for the JSDK. This SAPI requires that the Java + extension be built as a shared dl. +

--with-swf[=DIR]

PHP 3: Option not available in PHP 3 +

PHP 4: Include swf support +

--with-system-regex

PHP 3: Do not use the bundled regex library +

PHP 4: (deprecated) Use system regex library +

--with-tsrm-pth[=pth-config]

PHP 3: Option not available in PHP 3 +

PHP 4: Use GNU Pth. +

--with-tsrm-pthreads

PHP 3: Option not available in PHP 3 +

PHP 4: Use POSIX threads (default) +

--with-x

PHP 3: use the X Window System +

PHP 4: Option not available in PHP 4 +

--with-zlib-dir[=DIR]

PHP 3: zlib dir for pdflib 2.0 or include zlib support +

PHP 4: zlib dir for pdflib 3.x or include zlib support +

--with-zlib[=DIR]

PHP 3, PHP 4: Include zlib support (requires zlib >= 1.0.9). DIR is + the zlib install directory, defaults to /usr. +

--without-pcre-regex

PHP 3: Don't include Perl Compatible Regular Expressions support +

PHP 4: Do not include Perl Compatible Regular Expressions support. Use + --with-pcre-regex=DIR to specify DIR where PCRE's include and library + files are located, if not using bundled library. +

--without-posix

PHP 3: Don't include POSIX functions +

PHP 4: Option not available in PHP 4; use --disable-posix + instead. +

Networking

--with-curl[=DIR]

PHP 3: Option not available in PHP 3 +

PHP 4: Include CURL support +

--enable-ftp

PHP 3: Option not available; use --with-ftp + instead. +

PHP 4: Enable FTP support +

--with-ftp

PHP 3: Include FTP support. +

PHP 4: Option not available; use --enable-ftp + instead +

--disable-url-fopen-wrapper

PHP 3, PHP 4: Disable the URL-aware fopen wrapper that allows accessing + files via http or ftp. +

--with-mod-dav=DIR

PHP 3, PHP 4: Include DAV support through Apache's mod_dav, DIR is + mod_dav's installation directory (Apache module version only!) +

--with-openssl[=DIR]

PHP 3, PHP 4: Include OpenSSL support in SNMP. +

--with-snmp[=DIR]

PHP 3, PHP 4: Include SNMP support. DIR is the SNMP base install + directory, defaults to searching through a number of common locations + for the snmp install. Set DIR to shared to build as a dl, or shared,DIR + to build as a dl and still specify DIR. +

--enable-ucd-snmp-hack

PHP 3, PHP 4: Enable UCD SNMP hack +

--enable-sockets

PHP 3: Option not available in PHP 3 +

PHP 4: Enable sockets support +

--with-yaz[=DIR]

PHP 3: Option not available in PHP 3 +

PHP 4: Include YAZ support (ANSI/NISO Z39.50). DIR is the YAZ bin + install directory +

--enable-yp

PHP 3: Option not available; use --with-yp + instead. +

PHP 4: Include YP support +

--with-yp

PHP 3: Include YP support +

PHP 4: Option not available; use --enable-yp + instead. +

PHP Behaviour

--enable-magic-quotes

PHP 3, PHP 4: Enable magic quotes by default. +

--disable-short-tags

PHP 3, PHP 4: Disable the short-form <? start tag by default. +

--enable-track-vars

PHP 3: Enable GET/POST/Cookie track variables by default. +

PHP 4: Option not available in PHP 4; as of PHP 4.0.2, + track_vars is always on. +

Server

--with-aolserver-src=DIR

PHP 3: Option not available in PHP 3 +

PHP 4: Specify path to the source distribution of AOLserver +

--with-aolserver=DIR

PHP 3: Option not available in PHP 3 +

PHP 4: Specify path to the installed AOLserver +

--with-apache[=DIR]

PHP 3, PHP 4: Build Apache module. DIR is the top-level Apache build + directory, defaults to /usr/local/etc/httpd. +

--with-apxs[=FILE]

PHP 3, PHP 4: Build shared Apache module. FILE is the optional pathname + to the Apache apxs tool; defaults to apxs. +

--enable-versioning

PHP 3: Take advantage of versioning and scoping Provided by Solaris 2.x + and Linux +

PHP 4: Export only required symbols. See INSTALL for more information +

--with-fhttpd[=DIR]

PHP 3, PHP 4: Build fhttpd module. DIR is the fhttpd sources directory, + defaults to /usr/local/src/fhttpd. +

--with-nsapi=DIR

PHP 3: Option not available in PHP 3 +

PHP 4: Specify path to the installed Netscape +

--with-phttpd=DIR

PHP 3: Option not available in PHP 3 +

PHP 4: +

--with-pi3web=DIR

PHP 3: Option not available in PHP 3 +

PHP 4: Build PHP as a module for use with Pi3Web. +

--with-roxen=DIR

PHP 3: Option not available in PHP 3 +

PHP 4: Build PHP as a Pike module. DIR is the base Roxen directory, + normally /usr/local/roxen/server. +

--enable-roxen-zts

PHP 3: Option not available in PHP 3 +

PHP 4: Build the Roxen module using Zend Thread Safety. +

--with-thttpd=SRCDIR

PHP 3: Option not available in PHP 3 +

PHP 4: +

--with-zeus=DIR

PHP 3: Option not available in PHP 3 +

PHP 4: Build PHP as an ISAPI module for use with Zeus. +

Text and language

--with-aspell[=DIR]

PHP 3, PHP 4: Include ASPELL support. +

--with-gettext[=DIR]

PHP 3, PHP 4: Include GNU gettext support. DIR is the gettext install + directory, defaults to /usr/local +

--with-pspell[=DIR]

PHP 3: Option not available in PHP 3 +

PHP 4: Include PSPELL support. +

--with-recode[=DIR]

PHP 3: Include GNU recode support. +

PHP 4: Include recode support. DIR is the recode install directory. +

XML

--with-dom[=DIR]

PHP 3: Option not available in PHP 3 +

PHP 4: Include DOM support (requires libxml >= 2.0). DIR is the + libxml install directory, defaults to /usr +

--enable-sablot-errors-descriptive

PHP 3: Option not available in PHP 3 +

PHP 4: Enable Descriptive errors +

--with-sablot[=DIR]

PHP 3: Option not available in PHP 3 +

PHP 4: Include Sablotron support +

--enable-wddx

PHP 3: Option not available in PHP 3 +

PHP 4: Enable WDDX support +

--disable-xml

PHP 3: Option not available in PHP 3; XML functionality is + not built in by default. Use --with-xml + to turn it on. +

PHP 4: Disable XML support using bundled expat lib +

--with-xml

PHP 3: Include XML support +

PHP 4: Option not available; XML support is built in by + default. Use --disable-xml to + turn it off. +


PrevHomeNext
Installation on UNIX systemsUpInstallation on Windows 95/98/NT systems
\ No newline at end of file diff --git a/install.unix.html b/install.unix.html new file mode 100644 index 0000000..c03b484 --- /dev/null +++ b/install.unix.html @@ -0,0 +1,714 @@ +Installation on UNIX systems
PHP Manual
PrevChapter 2. InstallationNext

Installation on UNIX systems

This section will guide you through the configuration and + installation of PHP. +

Prerequisite knowledge and software: + +

  • Basic UNIX skills (being able to operate "make" and a C + compiler) +

  • An ANSI C compiler +

  • A web server +

+

There are several ways to compile and configure PHP for the Unix + platform. The entire configuration process is controlled by the + use of commandline options to the configure + script. This page outlines the usage of the most common options, + but there are many others to play with. Check out the Complete list of configure + options for an exhaustive rundown. +

+

Apache Module

PHP can be compiled in a number of different ways as an Apache + module. First we show the quick instructions. Following this is + a list of various examples with explanations, to provide an + overview of how to accomplish certain things. +

You can select arguments to add to the + configure on line 8 below from the Complete list of configure + options. +

Example 2-1. + Quick Installation Instructions (Apache Module Version) +


1.  gunzip apache_1.3.x.tar.gz
+2.  tar xvf apache_1.3.x.tar
+3.  gunzip php-x.x.x.tar.gz
+4.  tar xvf php-x.x.x.tar
+5.  cd apache_1.3.x
+6.  ./configure --prefix=/www
+7.  cd ../php-x.x.x
+8.  ./configure --with-mysql --with-apache=../apache_1.3.x --enable-track-vars
+9.  make
+10. make install
+11. cd ../apache_1.3.x
+12. for PHP 3: ./configure --activate-module=src/modules/php3/libphp3.a
+    for PHP 4: ./configure --activate-module=src/modules/php4/libphp4.a
+13. make
+14. make install
+
+  Instead of this step you may prefer to simply copy the httpd binary
+  overtop of your existing binary.  Make sure you shut down your
+  server first though.
+
+15. cd ../php-x.x.x
+16. for PHP 3: cp php3.ini-dist /usr/local/lib/php3.ini
+    for PHP 4: cp php.ini-dist /usr/local/lib/php.ini
+
+  You can edit your .ini file to set PHP options.  If
+  you prefer this file in another location, use
+  --with-config-file-path=/path in step 8.
+
+17. Edit your httpd.conf or srm.conf file and add: 
+      
+     For PHP 3:   AddType application/x-httpd-php3 .php3
+     For PHP 4:   AddType application/x-httpd-php .php
+ 
+  You can choose any extension you wish here.  .php is simply the one
+  we suggest. You can even include .html .
+
+
+18. Use your normal procedure for starting the Apache server. (You must
+    stop and restart the server, not just cause the server to reload by
+    use a HUP or USR1 signal.)
+      


./configure --with-apxs --with-pgsql
+       

+

This will create a libphp4.so shared + library that is loaded into Apache using a LoadModule line in + Apache's httpd.conf file. The PostgreSQL + support is embedded into this libphp4.so + library. +


./configure --with-apxs --with-pgsql=shared
+       

+

This will again create a libphp4.so shared + library for Apache, but it will also create a + pgsql.so shared library that is loaded into + PHP either by using the extension directive in + php.ini file or by loading it explicitly in + a script using the dl() function. +


./configure --with-apache=/path/to/apache_source --with-pgsql
+       

+

This will create a libmodphp4.a library, a + mod_php4.c and some accompanying files and + copy this into the src/modules/php4 directory + in the Apache source tree. Then you compile Apache using + --activate-module=src/modules/php4/libphp4.a + and the Apache build system will create + libphp4.a and link it statically into the + httpd binary. The PostgreSQL support is + included directly into this httpd binary, + so the final result here is a single httpd + binary that includes all of Apache and all of PHP. +


./configure --with-apache=/path/to/apache_source --with-pgsql=shared
+       

+

Same as before, except instead of including PostgreSQL support + directly into the final httpd you will get + a pgsql.so shared library that you can load + into PHP from either the php.ini file or + directly using dl(). +

When choosing to build PHP in different ways, you should consider + the advantages and drawbacks of each method. Building as a shared + object will mean that you can compile apache separately, and don't + have to recompile everything as you add to, or change, PHP. + Building PHP into apache (static method) means that PHP will + load and run faster. For more information, see the Apache + webpage on DSO support. +

fhttpd Module

To build PHP as an fhttpd module, answer "yes" to "Build as an + fhttpd module?" (the --with-fhttpd=DIR + option to configure) and specify the fhttpd source base + directory. The default directory is /usr/local/src/fhttpd. If you are + running fhttpd, building PHP as a module will give better + performance, more control and remote execution capability. +

Other web servers

PHP can be built to support a large number of web servers. Please + see Server-related + options for a full list of server-related configure + options. +

CGI/Commandline version

The default is to build PHP as a CGI program. This creates a + commandline interpreter, which can be used for CGI processing, or + for non-web-related PHP scripting. If you are running a web + server PHP has module support for, you should generally go for + that solution for performance reasons. However, the CGI version + enables Apache users to run different PHP-enabled pages under + different user-ids. Please make sure you read through the Security chapter if you are going to + run PHP as a CGI. +

Database Support Options

PHP has native support for a number of databases (as well as + ODBC). To enable support for the various databases, options are + given to the configure script at compile + time. Read the list + of all database-related options for more information. +

For a list of all possible options to + configure, please see the Complete list of configure + options. +

Building

When PHP is configured, you are ready to build the CGI executable + or the PHP library. The command make should + take care of this. If it fails and you can't figure out why, see + the Problems section. +

Testing

If you have built PHP as a CGI program, you may test your build + by typing make test. It is always a good idea + to test your build. This way you may catch a problem with PHP on + your platform early instead of having to struggle with it later. +

Benchmarking

If you have built PHP as a CGI program, you may benchmark your + build by typing make bench. Note that if safe + mode is on by default, the benchmark may not be able to finish if + it takes longer then the 30 seconds allowed. This is because the + set_time_limit() can not be used in safe + mode. Use the max_execution_time + configuration setting to control this time for your own + scripts. make bench ignores the configuration file. +


PrevHomeNext
InstallationUpComplete list of configure options
\ No newline at end of file diff --git a/installation.html b/installation.html new file mode 100644 index 0000000..92ba6ad --- /dev/null +++ b/installation.html @@ -0,0 +1,190 @@ +Installation
PHP Manual
PrevNext

Chapter 2. Installation

Table of Contents
Downloading the latest version
Installation on UNIX systems
Complete list of configure options
Installation on Windows 95/98/NT systems
Problems?

Downloading the latest version

The source code, and binary distributions for some platforms + (including Windows), can be found at http://www.php.net/. +


PrevHomeNext
A brief history of PHPUpInstallation on UNIX systems
\ No newline at end of file diff --git a/intro-history.html b/intro-history.html new file mode 100644 index 0000000..a8b5182 --- /dev/null +++ b/intro-history.html @@ -0,0 +1,198 @@ +A brief history of PHP
PHP Manual
PrevChapter 1. IntroductionNext

A brief history of PHP

PHP was conceived sometime in the fall of 1994 by Rasmus Lerdorf. + Early non-released versions were used on his home page to keep + track of who was looking at his online resume. The first version + used by others was available sometime in early 1995 and was known + as the Personal Home Page Tools. It consisted of a very + simplistic parser engine that only understood a few special macros + and a number of utilities that were in common use on home pages + back then. A guestbook, a counter and some other stuff. The + parser was rewritten in mid-1995 and named PHP/FI Version 2. The + FI came from another package Rasmus had written which interpreted + html form data. He combined the Personal Home Page tools scripts + with the Form Interpreter and added mSQL support and PHP/FI was + born. PHP/FI grew at an amazing pace and people started + contributing code to it. +

It is difficult to give any hard statistics, but it is estimated + that by late 1996 PHP/FI was in use on at least 15,000 web sites + around the world. By mid-1997 this number had grown to over + 50,000. Mid-1997 also saw a change in the development of PHP. It + changed from being Rasmus' own pet project that a handful of + people had contributed to, to being a much more organized team + effort. The parser was rewritten from scratch by Zeev Suraski and + Andi Gutmans and this new parser formed the basis for PHP Version + 3. A lot of the utility code from PHP/FI was ported over to PHP 3 + and a lot of it was completely rewritten. +

Today (end-1999) either PHP/FI or PHP 3 ships with a number of + commercial products such as C2's StrongHold web server and RedHat + Linux. A conservative estimate based on an extrapolation from + numbers provided by NetCraft + (see also Netcraft Web Server + Survey) would be that PHP is in use on over 1,000,000 + sites around the world. To put that in perspective, that is more + sites than run Netscape's flagship Enterprise server on the + Internet. +

Also as of this writing, work is underway on the next generation + of PHP, which will utilize the powerful Zend scripting engine to deliver higher + performance, and will also support running under webservers other + than Apache as a native server module. +


PrevHomeNext
What can PHP do?UpInstallation
\ No newline at end of file diff --git a/intro-whatcando.html b/intro-whatcando.html new file mode 100644 index 0000000..fc3a78d --- /dev/null +++ b/intro-whatcando.html @@ -0,0 +1,225 @@ +What can PHP do?
PHP Manual
PrevChapter 1. IntroductionNext

What can PHP do?

At the most basic level, PHP can do anything any other CGI + program can do, such as collect form data, generate dynamic + page content, or send and receive cookies. +

Perhaps the strongest and most significant feature in PHP is its + support for a wide range of databases. Writing a database-enabled + web page is incredibly simple. The following databases are currently + supported: +

Adabas DInterBasePostgreSQL
dBaseFrontBaseSolid
EmpressmSQLSybase
FilePro (read-only)Direct MS-SQLVelocis
IBM DB2MySQLUnix dbm
InformixODBC 
IngresOracle (OCI7 and OCI8) 

+

PHP also has support for talking to other services using protocols + such as IMAP, SNMP, NNTP, POP3, HTTP and countless others. You can also + open raw network sockets and interact using other protocols. +


PrevHomeNext
IntroductionUpA brief history of PHP
\ No newline at end of file diff --git a/introduction.html b/introduction.html new file mode 100644 index 0000000..d76773e --- /dev/null +++ b/introduction.html @@ -0,0 +1,244 @@ +Introduction
PHP Manual
PrevNext

Chapter 1. Introduction

Table of Contents
What is PHP?
What can PHP do?
A brief history of PHP

What is PHP?

PHP (officially "PHP: Hypertext Preprocessor") is a server-side + HTML-embedded scripting language. +

Simple answer, but what does that mean? An example: +

Example 1-1. An introductory example


<html>
+    <head>
+        <title>Example</title>
+    </head>
+    <body>
+    
+        <?php 
+        echo "Hi, I'm a PHP script!"; 
+        ?>
+        
+    </body>
+</html>
+     
+

Notice how this is different from a CGI script written in other + languages like Perl or C -- instead of writing a program with lots + of commands to output HTML, you write an HTML script with a some + embedded code to do something (in this case, output some + text). The PHP code is enclosed in special start and end tags + that allow you to jump into and out of PHP mode. +

What distinguishes PHP from something like client-side Javascript + is that the code is executed on the server. If you were to have a + script similar to the above on your server, the client would receive + the results of running that script, with no way of determining what + the underlying code may be. You can even configure your web server + to process all your HTML files with PHP, and then there's really no + way that users can tell what you have up your sleeve. +


PrevHomeNext
Getting StartedUpWhat can PHP do?
\ No newline at end of file diff --git a/keyword.class.html b/keyword.class.html new file mode 100644 index 0000000..ee4cc15 --- /dev/null +++ b/keyword.class.html @@ -0,0 +1,332 @@ +class
PHP Manual
PrevChapter 11. Control StructuresNext

class

A class is a collection of variables and functions working with + these variables. A class is defined using the following syntax: + +

 <?php
+ class Cart {
+     var $items;  // Items in our shopping cart
+   
+     // Add $num articles of $artnr to the cart
+ 
+     function add_item ($artnr, $num) {
+         $this->items[$artnr] += $num;
+     }
+   
+     // Take $num articles of $artnr out of the cart
+ 
+     function remove_item ($artnr, $num) {
+         if ($this->items[$artnr] > $num) {
+             $this->items[$artnr] -= $num;
+             return true;
+         } else {
+             return false;
+         }   
+     }
+ }
+ ?>
+      

+ +

This defines a class named Cart that consists of an associative + array of articles in the cart and two functions to add and remove + items from this cart. + +

Classes are types, that is, they are blueprints for actual + variables. You have to create a variables of the desired type with + the new operator. +

 $cart = new Cart;
+ $cart->add_item("10", 1);
+     

This creates an object $cart of the class Cart. The function + add_item() of that object is being called to add 1 item of article + number 10 to the cart. +

Classes can be extensions of other classes. The extended or + derived class has all variables and functions of the base class + and what you add in the extended definition. This is done using + the extends keyword. +

 class Named_Cart extends Cart {
+     var $owner;
+  
+     function set_owner ($name) {
+         $this->owner = $name;
+     }
+ }
+     

This defines a class Named_Cart that has all variables and + functions of Cart plus an additional variable $owner and an + additional function set_owner(). You create a named cart the usual + way and can now set and get the carts owner. You can still use + normal cart functions on named carts: +

 $ncart = new Named_Cart;    // Create a named cart
+ $ncart->set_owner ("kris"); // Name that cart
+ print $ncart->owner;        // print the cart owners name
+ $ncart->add_item ("10", 1); // (inherited functionality from cart)
+     

Within functions of a class the variable $this means this + object. You have to use $this->something to access any variable or + function named something within your current object. +

Constructors are functions in a class that are automatically + called when you create a new instance of a class. A function + becomes a constructor when it has the same name as the class. +

 class Auto_Cart extends Cart {
+     function Auto_Cart () {
+         $this->add_item ("10", 1);
+     }
+ }
+     

This defines a class Auto_Cart that is a Cart plus a constructor + which initializes the cart with one item of article number "10" + each time a new Auto_Cart is being made with "new". Constructors + can also take arguments and these arguments can be optional, which + makes them much more useful. +

 class Constructor_Cart {
+     function Constructor_Cart ($item = "10", $num = 1) {
+         $this->add_item ($item, $num);
+     }
+ }
+ 
+ // Shop the same old boring stuff.
+ 
+ $default_cart   = new Constructor_Cart;
+ 
+ // Shop for real...
+ 
+ $different_cart = new Constructor_Cart ("20", 17);
+     

Caution

For derived classes, the constructor of the parent class is not + automatically called when the derived class's constructor is called. +


PrevHomeNext
includeUpFunctions
\ No newline at end of file diff --git a/keyword.function.html b/keyword.function.html new file mode 100644 index 0000000..70a8c27 --- /dev/null +++ b/keyword.function.html @@ -0,0 +1,173 @@ +function
PHP3 Manual
PrevChapter 10. Control StructuresNext

function

A function may be defined using syntax such as the following: + +

 function foo ($arg_1, $arg_2, ..., $arg_n) {
+     echo "Example function.\n";
+     return $retval;
+ }
+      

+ +

Any valid PHP code may appear inside a function, even other + functions and class + definitions. + +

Functions must be defined before they are referenced. + +


PrevHomeNext
includeUpReturning values
\ No newline at end of file diff --git a/keyword.function.return.html b/keyword.function.return.html new file mode 100644 index 0000000..41a426c --- /dev/null +++ b/keyword.function.return.html @@ -0,0 +1,403 @@ +Returning values
PHP3 Manual
PrevChapter 10. Control StructuresNext

Returning values

Values are returned by using the optional return statement. Any + type may be returned, including lists and objects. + +

 function my_sqrt ($num) {
+     return $num * $num;
+ }
+ echo my_sqrt (4);   // outputs '16'.
+       

+ +

Multiple values may not be returned, but the same effect can be + achieved by returning a list: + +

 function foo() {
+    return array (0, 1, 2);
+ }
+ list ($zero, $one, $two) = foo();
+       

+ +

Arguments

Information may be passed to functions via the argument list, + which is a comma-delimited list of variables and/or constants. + +

PHP supports passing arguments by value (the default), passing by + reference, and default argument + values. Variable-length argument lists are not supported, + but a similar effect may be achieved by passing arrays. + +

 function takes_array($input) {
+     echo "$input[0] + $input[1] = ", $input[0]+$input[1];
+ }
+       

+ +

Passing by reference

By default, function arguments are passed by value. If you wish + to allow a function to modify its arguments, you may pass them + by reference. + +

If you wish a function's argument to always be passed by + reference, you can prepend an ampersand (&) to the argument + name in the function definition: + +

 function foo( &$bar ) {
+     $bar .= 'and something extra.';
+ }
+ $str = 'This is a string, ';
+ foo ($str);
+ echo $str;    // outputs 'This is a string, and something extra.'
+        

+ +

If you wish to pass a variable by reference to a function which + does not do this by default, you may prepend an ampersand to the + argument name in the function call: + +

 function foo ($bar) {
+     $bar .= ' and something extra.';
+ }
+ $str = 'This is a string, ';
+ foo ($str);
+ echo $str;    // outputs 'This is a string, '
+ foo (&$str);
+ echo $str;    // outputs 'This is a string, and something extra.'
+        

+ +

Default values

A function may define C++-style default values for scalar + arguments as follows: + +

 function makecoffee ($type = "cappucino") {
+     echo "Making a cup of $type.\n";
+ }
+ echo makecoffee ();
+ echo makecoffee ("espresso");
+        

+ +

The output from the above snippet is: + +

 Making a cup of cappucino.
+ Making a cup of espresso.
+       
+ +

The default value must be a constant expression, not (for + example) a variable or class member. + +

Note that when using default arguments, any defaults should be + on the right side of any non-default arguments; otherwise, + things will not work as expected. Consider the following code + snippet: + +

 function makeyogurt ($type = "acidophilus", $flavour) {
+     return "Making a bowl of $type $flavour.\n";
+ }
+ 
+ echo makeyogurt ("raspberry");   // won't work as expected
+        

+ +

The output of the above example is: + +

 Warning: Missing argument 2 in call to makeyogurt() in 
+ /usr/local/etc/httpd/htdocs/php3test/functest.html on line 41
+ Making a bowl of raspberry .
+       
+ +

Now, compare the above with this: + +

 function makeyogurt ($flavour, $type = "acidophilus") {
+     return "Making a bowl of $type $flavour.\n";
+ }
+ 
+ echo makeyogurt ("raspberry");   // works as expected
+        

+ +

The output of this example is: + +

 Making a bowl of acidophilus raspberry.
+      
+ +


PrevHomeNext
functionUpold_function
\ No newline at end of file diff --git a/keyword.old-function.html b/keyword.old-function.html new file mode 100644 index 0000000..824d742 --- /dev/null +++ b/keyword.old-function.html @@ -0,0 +1,186 @@ +old_function
PHP3 Manual
PrevChapter 10. Control StructuresNext

old_function

The old_function statement allows you to declare + a function using a syntax identical to PHP/FI2 (except you must + replace 'function' with 'old_function'. +

This is a deprecated feature, and should only be used by the + PHP/FI2->PHP3 convertor. +

Functions declared as old_function + cannot be called from PHP's internal code. Among other + things, this means you can't use them in functions such as + usort(), array_walk(), and + register_shutdown_function(). You can get around + this limitation by writing a wrapper function (in normal PHP3 form) + to call the old_function. + +


PrevHomeNext
Returning valuesUpclass
\ No newline at end of file diff --git a/lang-syntax.html b/lang-syntax.html new file mode 100644 index 0000000..29350f3 --- /dev/null +++ b/lang-syntax.html @@ -0,0 +1,367 @@ +Syntax and grammar
PHP3 Manual
PrevNext

Chapter 5. Syntax and grammar

Table of Contents
Basic Syntax
Types
Variables
Constants
Expressions
Operators
Control Structures

PHP's syntax is borrowed primarily from C. Java and Perl have + also influenced the syntax. + +

Basic Syntax

Escaping from HTML

There are four ways of escaping from HTML and entering "PHP code + mode": + +

Example 5-1. Ways of escaping from HTML

1.  <? echo ("this is the simplest, an SGML processing instruction\n"); ?>
+ 
+2.  <?php echo("if you want to serve XML documents, do like this\n"); ?>
+
+3.  <script language="php"> 
+        echo ("some editors (like FrontPage) don't
+              like processing instructions");
+    </script>
+
+4.  <% echo ("As of PHP 3.0.4 you may optionally use ASP-style tags"); %>
+    <%= $variable; # This is a shortcut for "<%echo .." %>
+      
+ +

The first way is only available if short tags have been enabled + (either by calling short_tags(), they are + configured on using the short_tags run-time configuration setting, + or they are enabled using the --enable-short-tags compile-time + configuration setting. + +

The fourth way is only available if ASP-style tags have been + enabled using either the asp_tags configuration setting or the + --enable-asp-tags compile-time configuration setting. + +

The closing "bracket" for the block will include the immediately + trailing newline if one is present. + +

Instruction separation

Instructions are separated the same as in C or perl - terminate + each statement with a semicolon. + +

The closing tag (?>) also implies the end of the statement, so the + following are equivalent: + +

<?php
+    echo "This is a test";
+?>
+
+<?php echo "This is a test" ?>
+      

+ +

Comments

PHP supports 'C', 'C++' and Unix shell-style comments. For example: + +

<?php
+    echo "This is a test"; // This is a one-line c++ style comment
+    /* This is a multi line comment
+       yet another line of comment */
+    echo "This is yet another test";
+    echo "One Final Test"; # This is shell-style style comment
+?>
+     

+ +

The "one-line" comment styles actually only comment to the + end of the line or the current block of PHP code, whichever + comes first. +

<h1>This is an <?# echo "simple";?> example.</h1>
+<p>The header above will say 'This is an example'.

You should be careful not to nest 'C' style comments, which can + happen when commenting out large blocks. + +

<?php
+ /* 
+    echo "This is a test"; /* This comment will cause a problem */
+ */
+?>
+    


PrevHomeNext
Connection HandlingUpTypes
\ No newline at end of file diff --git a/langref.html b/langref.html new file mode 100644 index 0000000..61645d7 --- /dev/null +++ b/langref.html @@ -0,0 +1,193 @@ +Language Reference
PHP Manual
PrevNext

II. Language Reference

Table of Contents
5. Basic syntax
6. Types
7. Variables
8. Constants
9. Expressions
10. Operators
11. Control Structures
12. Functions
13. Classes and Objects
14. References Explained

PrevHomeNext
Apache module Basic syntax
\ No newline at end of file diff --git a/language.basic-syntax.comments.html b/language.basic-syntax.comments.html new file mode 100644 index 0000000..26fb34b --- /dev/null +++ b/language.basic-syntax.comments.html @@ -0,0 +1,228 @@ +Comments
PHP Manual
PrevChapter 5. Basic syntaxNext

Comments

PHP supports 'C', 'C++' and Unix shell-style comments. For example: + +


<?php
+    echo "This is a test"; // This is a one-line c++ style comment
+    /* This is a multi line comment
+       yet another line of comment */
+    echo "This is yet another test";
+    echo "One Final Test"; # This is shell-style style comment
+?>
+     

The "one-line" comment styles actually only comment to the + end of the line or the current block of PHP code, whichever + comes first.


<h1>This is an <?# echo "simple";?> example.</h1>
+<p>The header above will say 'This is an example'.
+

You should be careful not to nest 'C' style comments, which can + happen when commenting out large blocks.


<?php
+ /* 
+    echo "This is a test"; /* This comment will cause a problem */
+ */
+?>
+    


PrevHomeNext
Instruction separationUpTypes
\ No newline at end of file diff --git a/language.basic-syntax.html b/language.basic-syntax.html new file mode 100644 index 0000000..371438d --- /dev/null +++ b/language.basic-syntax.html @@ -0,0 +1,255 @@ +Basic syntax
PHP Manual
PrevNext

Chapter 5. Basic syntax

Table of Contents
Escaping from HTML
Instruction separation
Comments

Escaping from HTML

There are four ways of escaping from HTML and entering "PHP code + mode":

Example 5-1. Ways of escaping from HTML


1.  <? echo ("this is the simplest, an SGML processing instruction\n"); ?>
+ 
+2.  <?php echo("if you want to serve XML documents, do like this\n"); ?>
+
+3.  <script language="php"> 
+        echo ("some editors (like FrontPage) don't
+              like processing instructions");
+    </script>
+
+4.  <% echo ("You may optionally use ASP-style tags"); %>
+    <%= $variable; # This is a shortcut for "<%echo .." %>
+      

The first way is only available if short tags have been + enabled. This can be done via the short_tags() + function, by enabling the short_open_tag configuration + setting in the PHP config file, or by compiling PHP with the + --enable-short-tags option to configure.

The fourth way is only available if ASP-style tags have been + enabled using the asp_tags + configuration setting. + +

Note: Support for ASP-style tags was added in 3.0.4.

The closing tag for the block will include the immediately + trailing newline if one is present.


PrevHomeNext
Language ReferenceUpInstruction separation
\ No newline at end of file diff --git a/language.basic-syntax.instruction-separation.html b/language.basic-syntax.instruction-separation.html new file mode 100644 index 0000000..74d7504 --- /dev/null +++ b/language.basic-syntax.instruction-separation.html @@ -0,0 +1,172 @@ +Instruction separation
PHP Manual
PrevChapter 5. Basic syntaxNext

Instruction separation

Instructions are separated the same as in C or perl - terminate + each statement with a semicolon.

The closing tag (?>) also implies the end of the statement, so the + following are equivalent: + +


<?php
+    echo "This is a test";
+?>
+
+<?php echo "This is a test" ?>
+      


PrevHomeNext
Basic syntaxUpComments
\ No newline at end of file diff --git a/language.constants.html b/language.constants.html new file mode 100644 index 0000000..28eb974 --- /dev/null +++ b/language.constants.html @@ -0,0 +1,374 @@ +Constants
PHP Manual
PrevNext

Chapter 8. Constants

PHP defines several constants and provides a mechanism for defining + more at run-time. Constants are much like variables, save for the + two facts that constants must be defined using the + define() function, and that they cannot later be + redefined to another value. +

The predefined constants (always available) are: + +

__FILE__

The name of the script file presently being parsed. If used + within a file which has been included or required, then the + name of the included file is given, and not the name of the + parent file. +

__LINE__

The number of the line within the current script file which is + being parsed. If used within a file which has been included or + required, then the position within the included file is given. +

PHP_VERSION

The string representation of the version of the PHP parser + presently in use; e.g. '3.0.8-dev'. +

PHP_OS

The name of the operating system on which the PHP parser is + executing; e.g. 'Linux'. +

TRUE

A true value. +

FALSE

A false value. +

E_ERROR

Denotes an error other than a parsing error from which + recovery is not possible. +

E_WARNING

Denotes a condition where PHP knows something is wrong, but + will continue anyway; these can be caught by the script + itself. An example would be an invalid regexp in + ereg(). +

E_PARSE

The parser choked on invalid syntax in the script + file. Recovery is not possible. +

E_NOTICE

Something happened which may or may not be an error. Execution + continues. Examples include using an unquoted string as a hash + index, or accessing a variable which has not been set. +

E_ALL

All of the E_* constants rolled into one. If used with + error_reporting(), will cause any and all + problems noticed by PHP to be reported. +

+

The E_* constants are typically used with the + error_reporting() function for setting the + error reporting level. See all these constants at + Error handling. +

You can define additional constants using the + define() function.

Note that these are constants, not C-style macros; only valid + scalar data may be represented by a constant. + +

Example 8-1. Defining Constants


<?php
+define("CONSTANT", "Hello world.");
+echo CONSTANT; // outputs "Hello world."
+?>
+     
+ +

Example 8-2. Using __FILE__ and __LINE__


<?php
+function report_error($file, $line, $message) {
+    echo "An error occured in $file on line $line: $message.";
+}
+
+report_error(__FILE__,__LINE__, "Something went wrong!");
+?>
+     


PrevHomeNext
Variables from outside PHPUpExpressions
\ No newline at end of file diff --git a/language.expressions.html b/language.expressions.html new file mode 100644 index 0000000..a915c79 --- /dev/null +++ b/language.expressions.html @@ -0,0 +1,389 @@ +Expressions
PHP Manual
PrevNext

Chapter 9. Expressions

Expressions are the most important building stones of PHP. In PHP, + almost anything you write is an expression. The simplest yet + most accurate way to define an expression is "anything that has a + value".

The most basic forms of expressions are constants and variables. + When you type "$a = 5", you're assigning '5' into $a. '5', obviously, + has the value 5, or in other words '5' is an expression with the + value of 5 (in this case, '5' is an integer constant).

After this assignment, you'd expect $a's value to be 5 as + well, so if you wrote $b = $a, you'd expect it to behave just as + if you wrote $b = 5. In other words, $a is an expression with the + value of 5 as well. If everything works right, this is exactly + what will happen.

Slightly more complex examples for expressions are functions. For + instance, consider the following function: + +


function foo () {
+    return 5;
+}
+     

Assuming you're familiar with the concept of functions (if you're + not, take a look at the chapter about functions), you'd assume + that typing $c = foo() is essentially just like + writing $c = 5, and you're right. Functions + are expressions with the value of their return value. Since foo() + returns 5, the value of the expression 'foo()' is 5. Usually + functions don't just return a static value but compute something.

Of course, values in PHP don't have to be integers, and very often + they aren't. PHP supports three scalar value types: integer values, + floating point values and string values (scalar values are values that + you can't 'break' into smaller pieces, unlike arrays, for instance). + PHP also supports two composite (non-scalar) types: arrays and + objects. Each of these value types can be assigned into variables or + returned from functions.

So far, users of PHP/FI 2 shouldn't feel any change. However, PHP + takes expressions much further, in the same way many other + languages do. PHP is an expression-oriented language, in the + sense that almost everything is an expression. Consider the + example we've already dealt with, '$a = 5'. It's easy to see that + there are two values involved here, the value of the integer + constant '5', and the value of $a which is being updated to 5 as + well. But the truth is that there's one additional value involved + here, and that's the value of the assignment itself. The + assignment itself evaluates to the assigned value, in this case 5. + In practice, it means that '$a = 5', regardless of what it does, + is an expression with the value 5. Thus, writing something like + '$b = ($a = 5)' is like writing '$a = 5; $b = 5;' (a semicolon + marks the end of a statement). Since assignments are parsed in a + right to left order, you can also write '$b = $a = 5'.

Another good example of expression orientation is pre- and + post-increment and decrement. Users of PHP/FI 2 and many other + languages may be familiar with the notation of variable++ and + variable--. These are increment and decrement operators. In + PHP/FI 2, the statement '$a++' has no value (is not an + expression), and thus you can't assign it or use it in any way. + PHP enhances the increment/decrement capabilities by making + these expressions as well, like in C. In PHP, like in C, there + are two types of increment - pre-increment and post-increment. + Both pre-increment and post-increment essentially increment the + variable, and the effect on the variable is idential. The + difference is with the value of the increment expression. + Pre-increment, which is written '++$variable', evaluates to the + incremented value (PHP increments the variable before reading its + value, thus the name 'pre-increment'). Post-increment, which is + written '$variable++' evaluates to the original value of + $variable, before it was incremented (PHP increments the variable + after reading its value, thus the name 'post-increment').

A very common type of expressions are comparison expressions. + These expressions evaluate to either 0 or 1, meaning FALSE or TRUE + (respectively). PHP supports > (bigger than), >= (bigger than + or equal to), == (equal), != (not equal), < (smaller than) and <= + (smaller than or equal to). These expressions are most commonly used + inside conditional execution, such as if + statements.

The last example of expressions we'll deal with here is combined + operator-assignment expressions. You already know that if you + want to increment $a by 1, you can simply write '$a++' or '++$a'. + But what if you want to add more than one to it, for instance 3? + You could write '$a++' multiple times, but this is obviously not a + very efficient or comfortable way. A much more common practice is + to write '$a = $a + 3'. '$a + 3' evaluates to the value of $a + plus 3, and is assigned back into $a, which results in + incrementing $a by 3. In PHP, as in several other languages + like C, you can write this in a shorter way, which with time would + become clearer and quicker to understand as well. Adding 3 to the + current value of $a can be written '$a += 3'. This means exactly + "take the value of $a, add 3 to it, and assign it back into $a". + In addition to being shorter and clearer, this also results in + faster execution. The value of '$a += 3', like the value of a + regular assignment, is the assigned value. Notice that it is NOT + 3, but the combined value of $a plus 3 (this is the value that's + assigned into $a). Any two-place operator can be used in this + operator-assignment mode, for example '$a -= 5' (subtract 5 from + the value of $a), '$b *= 7' (multiply the value of $b by 7), etc.

There is one more expression that may seem odd if you haven't seen + it in other languages, the ternary conditional operator: + +


$first ? $second : $third
+

+ + If the value of the first subexpression is true (non-zero), then + it the second subexpression is evaluated, and that is the result + of the conditional expression. Otherwise, the third subexpression + is evaluated, and that is the value.

The following example should help you understand pre- and + post-increment and expressions in general a bit better: + +


function double($i) {
+    return $i*2;
+}
+$b = $a = 5;        /* assign the value five into the variable $a and $b */
+$c = $a++;          /* post-increment, assign original value of $a 
+                       (5) to $c */
+$e = $d = ++$b;     /* pre-increment, assign the incremented value of 
+                       $b (6) to $d and $e */
+
+/* at this point, both $d and $e are equal to 6 */
+
+$f = double($d++);  /* assign twice the value of $d before 
+                       the increment, 2*6 = 12 to $f */
+$g = double(++$e);  /* assign twice the value of $e after
+                       the increment, 2*7 = 14 to $g */
+$h = $g += 10;      /* first, $g is incremented by 10 and ends with the 
+                       value of 24. the value of the assignment (24) is 
+                       then assigned into $h, and $h ends with the value 
+                       of 24 as well. */
+

In the beginning of the chapter we said that we'll be describing + the various statement types, and as promised, expressions can be + statements. However, not every expression is a statement. In + this case, a statement has the form of 'expr' ';' that is, an + expression followed by a semicolon. In '$b=$a=5;', $a=5 is a + valid expression, but it's not a statement by itself. '$b=$a=5;' + however is a valid statement.

One last thing worth mentioning is the truth value of expressions. + In many events, mainly in conditional execution and loops, you're + not interested in the specific value of the expression, but only + care about whether it means TRUE or FALSE (PHP doesn't have a + dedicated boolean type). The truth value of expressions in PHP is + calculated in a similar way to perl. Any numeric non-zero numeric + value is TRUE, zero is FALSE. Be sure to note that negative + values are non-zero and are thus considered TRUE! The empty + string and the string "0" are FALSE; all other strings are TRUE. + With non-scalar values (arrays and objects) - if the value + contains no elements it's considered FALSE, otherwise it's + considered TRUE.

PHP provides a full and powerful implementation of expressions, and + documenting it entirely goes beyond the scope of this manual. The + above examples should give you a good idea about what expressions + are and how you can construct useful expressions. Throughout the + rest of this manual we'll write expr + to indicate any valid PHP expression.


PrevHomeNext
ConstantsUpOperators
\ No newline at end of file diff --git a/language.oop.html b/language.oop.html new file mode 100644 index 0000000..2fda578 --- /dev/null +++ b/language.oop.html @@ -0,0 +1,428 @@ +Classes and Objects
PHP Manual
PrevNext

Chapter 13. Classes and Objects

Table of Contents
class

class

A class is a collection of variables and functions working with + these variables. A class is defined using the following syntax: + +


<?php
+class Cart {
+    var $items;  // Items in our shopping cart
+   
+    // Add $num articles of $artnr to the cart
+ 
+    function add_item ($artnr, $num) {
+        $this->items[$artnr] += $num;
+    }
+   
+    // Take $num articles of $artnr out of the cart
+ 
+    function remove_item ($artnr, $num) {
+        if ($this->items[$artnr] > $num) {
+            $this->items[$artnr] -= $num;
+            return true;
+        } else {
+            return false;
+        }   
+    }
+}
+?>
+     

+

This defines a class named Cart that consists of an associative + array of articles in the cart and two functions to add and remove + items from this cart. +

Classes are types, that is, they are blueprints for actual + variables. You have to create a variable of the desired type with + the new operator. +


 $cart = new Cart;
+ $cart->add_item("10", 1);
+    

This creates an object $cart of the class Cart. The function + add_item() of that object is being called to add 1 item of article + number 10 to the cart.

Classes can be extensions of + other classes. The extended or derived class has all variables and + functions of the base class and what you add in the extended + definition. This is done using the extends keyword. Multiple + inheritance is not supported. +


class Named_Cart extends Cart {
+    var $owner;
+  
+    function set_owner ($name) {
+        $this->owner = $name;
+    }
+}
+    

This defines a class Named_Cart that has all variables and + functions of Cart plus an additional variable $owner and an + additional function set_owner(). You create a named cart the usual + way and can now set and get the carts owner. You can still use + normal cart functions on named carts: +


$ncart = new Named_Cart;    // Create a named cart
+$ncart->set_owner ("kris"); // Name that cart
+print $ncart->owner;        // print the cart owners name
+$ncart->add_item ("10", 1); // (inherited functionality from cart)
+    

Within functions of a class the variable $this means this + object. You have to use $this->something to access any variable or + function named something within your current object. +

Constructors are functions in a class that are automatically + called when you create a new instance of a class. A function + becomes a constructor when it has the same name as the class. +


class Auto_Cart extends Cart {
+    function Auto_Cart () {
+        $this->add_item ("10", 1);
+    }
+}
+    

This defines a class Auto_Cart that is a Cart plus a constructor + which initializes the cart with one item of article number "10" + each time a new Auto_Cart is being made with "new". Constructors + can also take arguments and these arguments can be optional, which + makes them much more useful. +


class Constructor_Cart extends Cart {
+    function Constructor_Cart ($item = "10", $num = 1) {
+        $this->add_item ($item, $num);
+    }
+}
+ 
+// Shop the same old boring stuff.
+ 
+$default_cart   = new Constructor_Cart;
+ 
+// Shop for real...
+ 
+$different_cart = new Constructor_Cart ("20", 17);
+    

Caution

For derived classes, the constructor of the parent class is not + automatically called when the derived class's constructor is + called. +


PrevHomeNext
Variable functionsUpReferences Explained
\ No newline at end of file diff --git a/language.operators.assignment.html b/language.operators.assignment.html new file mode 100644 index 0000000..6850684 --- /dev/null +++ b/language.operators.assignment.html @@ -0,0 +1,223 @@ +Assignment Operators
PHP Manual
PrevChapter 10. OperatorsNext

Assignment Operators

The basic assignment operator is "=". Your first inclination might + be to think of this as "equal to". Don't. It really means that the + the left operand gets set to the value of the expression on the + rights (that is, "gets set to"). +

The value of an assignment expression is the value assigned. That + is, the value of "$a = 3" is 3. This allows you to do some tricky + things: +

 
+$a = ($b = 4) + 5; // $a is equal to 9 now, and $b has been set to 4.
+     

+

In addition to the basic assignment operator, there are "combined + operators" for all of the binary arithmetic and string operators + that allow you to use a value in an expression and then set its + value to the result of that expression. For example: +


$a = 3;
+$a += 5; // sets $a to 8, as if we had said: $a = $a + 5;
+$b = "Hello ";
+$b .= "There!"; // sets $b to "Hello There!", just like $b = $b . "There!";
+     

+

Note that the assignment copies the original variable to the new + one (assignment by value), so changes to one will not affect the + other. This may also have relevance if you need to copy something + like a large array inside a tight loop. PHP 4 supports assignment + by reference, using the $var = + &$othervar; syntax, but this is not possible + in PHP 3. 'Assignment by reference' means that both variables end + up pointing at the same data, and nothing is copied anywhere. + To learn more about references, please read References explained. +


PrevHomeNext
OperatorsUpBitwise Operators
\ No newline at end of file diff --git a/language.operators.bitwise.html b/language.operators.bitwise.html new file mode 100644 index 0000000..a5d8c80 --- /dev/null +++ b/language.operators.bitwise.html @@ -0,0 +1,263 @@ +Bitwise Operators
PHP Manual
PrevChapter 10. OperatorsNext

Bitwise Operators

Bitwise operators allow you to turn specific bits within an + integer on or off. +

Table 10-2. Bitwise Operators

ExampleNameResult
$a & $bAndBits that are set in both $a and $b are set.
$a | $bOrBits that are set in either $a or $b are set.
$a ^ $bXor Bits that are set in $a or $b but not both are set. +
~ $aNot Bits that are set in $a are not set, and vice versa. +
$a << $bShift left Shift the bits of $a $b steps to the left (each step means + "multiply by two") +
$a >> $bShift right Shift the bits of $a $b steps to the right (each step means + "divide by two") +

PrevHomeNext
Assignment OperatorsUpComparison Operators
\ No newline at end of file diff --git a/language.operators.comparison.html b/language.operators.comparison.html new file mode 100644 index 0000000..2302c11 --- /dev/null +++ b/language.operators.comparison.html @@ -0,0 +1,341 @@ +Comparison Operators
PHP Manual
PrevChapter 10. OperatorsNext

Comparison Operators

Comparison operators, as their name implies, allow you to compare + two values. +

Table 10-3. Comparison Operators

ExampleNameResult
$a == $bEqualTrue if $a is equal to $b.
$a === $bIdentical True if $a is equal to $b, and they are of the same + type. (PHP 4 only) +
$a != $bNot equalTrue if $a is not equal to $b.
$a !== $bNot identical True if $a is not equal to $b, or they are not of the same + type. (PHP 4 only) +
$a < $bLess thanTrue if $a is strictly less than $b.
$a > $bGreater thanTrue if $a is strictly greater than $b.
$a <= $bLess than or equal to True if $a is less than or equal to $b.
$a >= $bGreater than or equal to True if $a is greater than or equal to $b.

Another conditional operator is the "?:" (or trinary) operator, + which operates as in C and many other languages. +


(expr1) ? (expr2) : (expr3);
+     

+ This expression evaluates to expr2 if + expr1 evaluates to true, and + expr3 if + expr1 evaluates to false. +


PrevHomeNext
Bitwise OperatorsUpError Control Operators
\ No newline at end of file diff --git a/language.operators.errorcontrol.html b/language.operators.errorcontrol.html new file mode 100644 index 0000000..e175dcc --- /dev/null +++ b/language.operators.errorcontrol.html @@ -0,0 +1,221 @@ +Error Control Operators
PHP Manual
PrevChapter 10. OperatorsNext

Error Control Operators

PHP supports one error control operator: the at sign (@). When + prepended to an expression in PHP, any error messages that might + be generated by that expression will be ignored. +

If the track_errors + feature is enabled, any error message generated by the expression + will be saved in the global variable $php_errormsg. This variable + will be overwritten on each error, so check early if you want to + use it. +


<?php
+/* Intentional SQL error (extra quote): */
+$res = @mysql_query ("select name, code from 'namelist") or
+    die ("Query failed: error was '$php_errormsg'");
+?>
+     

+

See also error_reporting(). +

Warning

Currently the "@" error-control operator prefix will even disable + error reporting for critical errors that will terminate script + execution. Among other things, this means that if you use "@" 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. +


PrevHomeNext
Comparison OperatorsUpExecution Operators
\ No newline at end of file diff --git a/language.operators.execution.html b/language.operators.execution.html new file mode 100644 index 0000000..9bff6f6 --- /dev/null +++ b/language.operators.execution.html @@ -0,0 +1,205 @@ +Execution Operators
PHP Manual
PrevChapter 10. OperatorsNext

Execution Operators

PHP supports one execution operator: backticks (``). Note that + these are not single-quotes! PHP will attempt to execute the + contents of the backticks as a shell command; the output will be + returned (i.e., it won't simply be dumped to output; it can be + assigned to a variable). +


$output = `ls -al`;
+echo "<pre>$output</pre>";
+     

+

See also system(), + passthru(), exec(), + popen(), and + escapeshellcmd(). +


PrevHomeNext
Error Control OperatorsUpIncrementing/Decrementing Operators
\ No newline at end of file diff --git a/language.operators.html b/language.operators.html new file mode 100644 index 0000000..3160423 --- /dev/null +++ b/language.operators.html @@ -0,0 +1,320 @@ +Operators
PHP Manual
PrevNext

Chapter 10. Operators

Table of Contents
Arithmetic Operators
Assignment Operators
Bitwise Operators
Comparison Operators
Error Control Operators
Execution Operators
Incrementing/Decrementing Operators
Logical Operators
Operator Precedence
String Operators

Arithmetic Operators

Remember basic arithmetic from school? These work just + like those. +

Table 10-1. Arithmetic Operators

ExampleNameResult
$a + $bAdditionSum of $a and $b.
$a - $bSubtractionDifference of $a and $b.
$a * $bMultiplicationProduct of $a and $b.
$a / $bDivisionQuotient of $a and $b.
$a % $bModulusRemainder of $a divided by $b.

The division operator ("/") returns an integer value (the result + of an integer division) if the two operands are integers (or + strings that get converted to integers) and the quotient is an + integer. If either operand is a floating-point value, or the + operation results in a non-integer value, a floating-point value + is returned. +


PrevHomeNext
ExpressionsUpAssignment Operators
\ No newline at end of file diff --git a/language.operators.increment.html b/language.operators.increment.html new file mode 100644 index 0000000..e3fb5c5 --- /dev/null +++ b/language.operators.increment.html @@ -0,0 +1,276 @@ +Incrementing/Decrementing Operators
PHP Manual
PrevChapter 10. OperatorsNext

Incrementing/Decrementing Operators

PHP supports C-style pre- and post-increment and decrement + operators. +

Table 10-4. Increment/decrement Operators

ExampleNameEffect
++$aPre-incrementIncrements $a by one, then returns $a.
$a++Post-incrementReturns $a, then increments $a by one.
--$aPre-decrementDecrements $a by one, then returns $a.
$a--Post-decrementReturns $a, then decrements $a by one.

Here's a simple example script: +


<?php
+echo "<h3>Postincrement</h3>";
+$a = 5;
+echo "Should be 5: " . $a++ . "<br>\n";
+echo "Should be 6: " . $a . "<br>\n";
+
+echo "<h3>Preincrement</h3>";
+$a = 5;
+echo "Should be 6: " . ++$a . "<br>\n";
+echo "Should be 6: " . $a . "<br>\n";
+
+echo "<h3>Postdecrement</h3>";
+$a = 5;
+echo "Should be 5: " . $a-- . "<br>\n";
+echo "Should be 4: " . $a . "<br>\n";
+
+echo "<h3>Predecrement</h3>";
+$a = 5;
+echo "Should be 4: " . --$a . "<br>\n";
+echo "Should be 4: " . $a . "<br>\n";
+?>
+     

+


PrevHomeNext
Execution OperatorsUpLogical Operators
\ No newline at end of file diff --git a/language.operators.logical.html b/language.operators.logical.html new file mode 100644 index 0000000..b71ea27 --- /dev/null +++ b/language.operators.logical.html @@ -0,0 +1,262 @@ +Logical Operators
PHP Manual
PrevChapter 10. OperatorsNext

Logical Operators

Table 10-5. Logical Operators

ExampleNameResult
$a and $bAndTrue if both $a and $b are true.
$a or $bOrTrue if either $a or $b is true.
$a xor $bOrTrue if either $a or $b is true, but not both.
! $aNotTrue if $a is not true.
$a && $bAndTrue if both $a and $b are true.
$a || $bOrTrue if either $a or $b is true.

The reason for the two different variations of "and" and "or" + operators is that they operate at different precedences. (See + Operator + Precedence.) +


PrevHomeNext
Incrementing/Decrementing OperatorsUpOperator Precedence
\ No newline at end of file diff --git a/language.operators.precedence.html b/language.operators.precedence.html new file mode 100644 index 0000000..a9cab01 --- /dev/null +++ b/language.operators.precedence.html @@ -0,0 +1,396 @@ +Operator Precedence
PHP Manual
PrevChapter 10. OperatorsNext

Operator Precedence

The precedence of an operator specifies how "tightly" it binds two + expressions together. For example, in the expression 1 + + 5 * 3, the answer is 16 and not + 18 because the multiplication ("*") operator + has a higher precedence than the addition ("+") operator. + Parentheses may be used to force precedence, if necessary. For + instance: (1 + 5) * 3 evaluates to + 18. +

The following table lists the precedence of operators with the + lowest-precedence operators listed first. +

Table 10-6. Operator Precedence

AssociativityOperators
left,
leftor
leftxor
leftand
rightprint
left = += -= *= /= .= %= &= |= ^= ~= <<= >>= +
left? :
left||
left&&
left|
left^
left&
non-associative== != === !==
non-associative< <= > >=
left<< >>
left+ - .
left* / %
right! ~ ++ -- (int) (double) (string) (array) (object) @
right[
non-associativenew
+


PrevHomeNext
Logical OperatorsUpString Operators
\ No newline at end of file diff --git a/language.operators.string.html b/language.operators.string.html new file mode 100644 index 0000000..90f4928 --- /dev/null +++ b/language.operators.string.html @@ -0,0 +1,178 @@ +String Operators
PHP Manual
PrevChapter 10. OperatorsNext

String Operators

There are two string operators. The first is the concatenation + operator ('.'), which returns the concatenation of its right and + left arguments. The second is the concatenating assignment + operator ('.='), which appends the argument on the right side to + the argument on the left side. Please read Assignment + Operators for more information. +


$a = "Hello ";
+$b = $a . "World!"; // now $b contains "Hello World!"
+
+$a = "Hello ";
+$a .= "World!";     // now $a contains "Hello World!"
+     

+


PrevHomeNext
Operator PrecedenceUpControl Structures
\ No newline at end of file diff --git a/language.references.arent.html b/language.references.arent.html new file mode 100644 index 0000000..ca4c92a --- /dev/null +++ b/language.references.arent.html @@ -0,0 +1,200 @@ +What References Are Not
PHP Manual
PrevChapter 14. References ExplainedNext

What References Are Not

As said above, references aren't pointers. That means, the + following construct won't do what you expect: +


function foo (&$var) {
+    $var =& $GLOBALS["baz"];
+}
+foo($bar); 
+     

+

What will happen that $var in foo will be bound + with $bar in caller, but then it will be + re-bound with $GLOBALS["baz"]. There's no way + to bind $bar in the caller to something else + using reference mechanism, since $bar is not + available in the function foo (it is represented by + $var, but $var has only + variable contents and not name-to-value binding in the calling + symbol table). +


PrevHomeNext
What References DoUpReturning References
\ No newline at end of file diff --git a/language.references.html b/language.references.html new file mode 100644 index 0000000..1bb815f --- /dev/null +++ b/language.references.html @@ -0,0 +1,195 @@ +References Explained
PHP Manual
PrevNext

Chapter 14. References Explained

Table of Contents
What References Are
What References Do
What References Are Not
Returning References
Unsetting References
Spotting References

What References Are

+ References in PHP are means to call same variable content with + different names. They are not like C pointers, they are symbol + table aliases. Note that in PHP, variable names and variable + content are different, so same content can have different + names. The most close analogy is Unix filenames and files - + variable names are directory entries, while variable contents is + the file itself. References can be thought of as hardlinking in + Unix filesystem. +


PrevHomeNext
Classes and ObjectsUpWhat References Do
\ No newline at end of file diff --git a/language.references.return.html b/language.references.return.html new file mode 100644 index 0000000..cbcfc5e --- /dev/null +++ b/language.references.return.html @@ -0,0 +1,200 @@ +Returning References
PHP Manual
PrevChapter 14. References ExplainedNext

Returning References

Returning by-refernce it is useful when you want to use function + to find variable which should be bound to. When returning + references, use this syntax: +


function &find_var ($param) {
+    ...code...
+    return $found_var;
+}
+
+$foo =& find_var ($bar);
+$foo->x = 2; 
+     

+ In this example, property of the object returned by the + find_var function would be set, not of the + copy, as it would be without using reference syntax. +

Note: + Unlike parameter passing, here you have to use + & in both places - to indicate that you + return by-reference, not a copy as usual, and to indicate than + reference binding and not usual assignment should be done for + $foo. +


PrevHomeNext
What References Are NotUpUnsetting References
\ No newline at end of file diff --git a/language.references.spot.html b/language.references.spot.html new file mode 100644 index 0000000..52f9b1b --- /dev/null +++ b/language.references.spot.html @@ -0,0 +1,214 @@ +Spotting References
PHP Manual
PrevChapter 14. References ExplainedNext

Spotting References

Many syntax constructs in PHP are implemented via referencing + mechanisms, so everything told above about reference binding also + apply to these constructs. Some constructs, like passing and + returning by-reference, are mentioned above. Other constructs that + use references are: +

global References

When you declare variable as global $var you + are in fact creating reference to a global variable. That means, + this is the same as: +


$var =& $GLOBALS["var"];
+      

+

That means, for example, that unsetting $var + won't unset global variable. +

$this

In an object method, $this is always reference + to the caller object. +


PrevHomeNext
Unsetting ReferencesUpFeatures
\ No newline at end of file diff --git a/language.references.unset.html b/language.references.unset.html new file mode 100644 index 0000000..0510445 --- /dev/null +++ b/language.references.unset.html @@ -0,0 +1,182 @@ +Unsetting References
PHP Manual
PrevChapter 14. References ExplainedNext

Unsetting References

When you unset the reference, you just break the binding between + variable name and variable content. This does not mean that + variable content will be destroyed. For example: +


$a = 1;
+$b =& $a;
+unset ($a); 
+     

+ won't unset $b, just $a. +

Again, it might be useful to think about this as analogous to Unix + unlink call. +


PrevHomeNext
Returning ReferencesUpSpotting References
\ No newline at end of file diff --git a/language.references.whatdo.html b/language.references.whatdo.html new file mode 100644 index 0000000..71b28a7 --- /dev/null +++ b/language.references.whatdo.html @@ -0,0 +1,264 @@ +What References Do
PHP Manual
PrevChapter 14. References ExplainedNext

What References Do

PHP references allow you to make two variables to refer to the + same content. Meaning, when you do: +


$a =& $b 
+     

+ it means that $a and $b + point to the same variable. +

Note: + $a and $b are completely + equal here, that's not $a is pointing to + $b or vice versa, that's + $a and $b pointing to the + same place. +

+

The second thing references do is to pass variables + by-reference. This is done by making local function variable and + caller variable to be reference to the same content. Example: +


function foo (&$var) {
+    $var++;
+}
+
+$a=5;
+foo ($a);
+     

+ will make $a to be 6. This happens because in + the function foo the variable + $var refers to the same content as + $a. +

The third thing reference can do is return by-reference. +


PrevHomeNext
References ExplainedUpWhat References Are Not
\ No newline at end of file diff --git a/language.types.array.html b/language.types.array.html new file mode 100644 index 0000000..3ddabcc --- /dev/null +++ b/language.types.array.html @@ -0,0 +1,561 @@ +Arrays
PHP Manual
PrevChapter 6. TypesNext

Arrays

Arrays actually act like both hash tables (associative arrays) and + indexed arrays (vectors). +

Single Dimension Arrays

PHP supports both scalar and associative arrays. In fact, there + is no difference between the two. You can create an array using + the list() or array() + functions, or you can explicitly set each array element value. +

 
+$a[0] = "abc"; 
+$a[1] = "def"; 
+$b["foo"] = 13;
+      

+

You can also create an array by simply adding values to the + array. When you assign a value to an array variable using empty + brackets, the value will be added onto the end of the array. +

 
+$a[] = "hello"; // $a[2] == "hello"
+$a[] = "world"; // $a[3] == "world" 
+      

+

Arrays may be sorted using the asort(), + arsort(), ksort(), + rsort(), sort(), + uasort(), usort(), and + uksort() functions depending on the type of + sort you want. +

You can count the number of items in an array using the + count() function. +

You can traverse an array using next() and + prev() functions. Another common way to + traverse an array is to use the each() + function. +

Multi-Dimensional Arrays

Multi-dimensional arrays are actually pretty simple. For each + dimension of the array, you add another [key] value to the end: +

 
+$a[1]      = $f;               # one dimensional examples
+$a["foo"]  = $f;   
+
+$a[1][0]     = $f;             # two dimensional
+$a["foo"][2] = $f;             # (you can mix numeric and associative indices)
+$a[3]["bar"] = $f;             # (you can mix numeric and associative indices)
+
+$a["foo"][4]["bar"][0] = $f;   # four dimensional!
+      

+

In PHP 3 it is not possible to reference multidimensional arrays + directly within strings. For instance, the following will not + have the desired result: +

 
+$a[3]['bar'] = 'Bob';
+echo "This won't work: $a[3][bar]";
+      

+ In PHP 3, the above will output This won't work: + Array[bar]. The string concatenation operator, + however, can be used to overcome this: +


$a[3]['bar'] = 'Bob';
+echo "This will work: " . $a[3][bar];
+      

+

In PHP 4, however, the whole problem may be circumvented by + enclosing the array reference (inside the string) in curly + braces: +


$a[3]['bar'] = 'Bob';
+echo "This will work: {$a[3][bar]}";
+      

+

You can "fill up" multi-dimensional arrays in many ways, but the + trickiest one to understand is how to use the + array() command for associative arrays. These + two snippets of code fill up the one-dimensional array in the + same way: +

 
+# Example 1:
+
+$a["color"]	= "red";
+$a["taste"]	= "sweet";
+$a["shape"]	= "round";
+$a["name"]	= "apple";
+$a[3]		= 4;
+
+# Example 2:
+$a = array(
+     "color" => "red",
+     "taste" => "sweet",
+     "shape" => "round",
+     "name"  => "apple",
+     3       => 4
+);
+      

+

The array() function can be nested for + multi-dimensional arrays: +

 
+<?
+$a = array(
+     "apple"  => array(
+          "color"  => "red",
+          "taste"  => "sweet",
+          "shape"  => "round"
+     ),
+     "orange"  => array(
+          "color"  => "orange",
+          "taste"  => "tart",
+          "shape"  => "round"
+     ),
+     "banana"  => array(
+          "color"  => "yellow",
+          "taste"  => "paste-y",
+          "shape"  => "banana-shaped"
+     )
+);
+
+echo $a["apple"]["taste"];    # will output "sweet"
+?>
+      

+


PrevHomeNext
StringsUpObjects
\ No newline at end of file diff --git a/language.types.double.html b/language.types.double.html new file mode 100644 index 0000000..e1b8b65 --- /dev/null +++ b/language.types.double.html @@ -0,0 +1,243 @@ +Floating point numbers
PHP Manual
PrevChapter 6. TypesNext

Floating point numbers

Floating point numbers ("doubles") can be specified using any of + the following syntaxes: +

 
+$a = 1.234; $a = 1.2e3;
+     

+ The size of a floating point number is platform-dependent, + although a maximum of ~1.8e308 with a precision of roughly 14 + decimal digits is a common value (that's 64 bit IEEE format). +

Warning

It is quite usual that simple decimal fractions like + 0.1 or 0.7 cannot be + converted into their internal binary counterparts without a + little loss of precision. This can lead to confusing results: for + example, floor((0.1+0.7)*10) will usually + return 7 instead of the expected + 8 as the result of the internal representation + really being something like 7.9999999999.... +

This is related to the fact that it is impossible to exactly + express some fractions in decimal notation with a finite number + of digits. For instance, 1/3 in decimal form + becomes 0.3333333. . .. +

So never trust floating number results to the last digit and + never compare floating point numbers for equality. If you really + need higher precision, you should use the arbitrary precision math functions + instead. +


PrevHomeNext
TypesUpStrings
\ No newline at end of file diff --git a/language.types.html b/language.types.html new file mode 100644 index 0000000..598a83f --- /dev/null +++ b/language.types.html @@ -0,0 +1,293 @@ +Types
PHP Manual
PrevNext

Chapter 6. Types

Table of Contents
Integers
Floating point numbers
Strings
Arrays
Objects
Type Juggling

PHP supports the following types: +

+

The type of a variable is usually not set by the programmer; + rather, it is decided at runtime by PHP depending on the context in + which that variable is used. +

If you would like to force a variable to be converted to a certain + type, you may either cast the variable or + use the settype() function on it. +

Note that a variable may behave in different manners in certain + situations, depending on what type it is at the time. For more + information, see the section on Type Juggling. +

Integers

Integers can be specified using any of the following syntaxes: +


$a = 1234; # decimal number
+$a = -123; # a negative number
+$a = 0123; # octal number (equivalent to 83 decimal)
+$a = 0x12; # hexadecimal number (equivalent to 18 decimal)
+     

+ The size of an integer is platform-dependent, although a + maximum value of about 2 billion is the usual value + (that's 32 bits signed). +


PrevHomeNext
CommentsUpFloating point numbers
\ No newline at end of file diff --git a/language.types.object.html b/language.types.object.html new file mode 100644 index 0000000..97d1d1b --- /dev/null +++ b/language.types.object.html @@ -0,0 +1,193 @@ +Objects
PHP Manual
PrevChapter 6. TypesNext

Objects

Object Initialization

To initialize an object, you use the new + statement to instantiate the object to a variable. + +


<?php
+class foo {
+    function do_foo() { 
+        echo "Doing foo."; 
+    }
+}
+
+$bar = new foo;
+$bar->do_foo();
+?>
+      

+

For a full discussion, please read the section Classes and Objects. +


PrevHomeNext
ArraysUpType Juggling
\ No newline at end of file diff --git a/language.types.string.html b/language.types.string.html new file mode 100644 index 0000000..1b89218 --- /dev/null +++ b/language.types.string.html @@ -0,0 +1,566 @@ +Strings
PHP Manual
PrevChapter 6. TypesNext

Strings

Strings can be specified using one of two sets of delimiters. +

If the string is enclosed in double-quotes ("), variables within + the string will be expanded (subject to some parsing + limitations). As in C and Perl, the backslash ("\") character can + be used in specifying special characters: +

Table 6-1. Escaped characters

sequencemeaning
\nlinefeed (LF or 0x0A in ASCII)
\rcarriage return (CR or 0x0D in ASCII)
\thorizontal tab (HT or 0x09 in ASCII)
\\backslash
\$dollar sign
\"double-quote
\[0-7]{1,3} the sequence of characters matching the regular + expression is a character in octal notation +
\x[0-9A-Fa-f]{1,2} the sequence of characters matching the regular + expression is a character in hexadecimal notation +
+

You can escape any other character, but a warning will be issued + at the highest warning level. +

The second way to delimit a string uses the single-quote ("'") + character. When a string is enclosed in single quotes, the only + escapes that will be understood are "\\" and "\'". This is for + convenience, so that you can have single-quotes and backslashes in + a single-quoted string. Variables will not be + expanded inside a single-quoted string. +

Another way to delimit strings is by using here doc syntax + ("<<<"). One should provide an identifier after + <<<, then the string, and then the + same identifier to close the quotation. The closing identifier + must begin in the first column of the line. + The label used must follow the same naming rules as any other + label in PHP: it must contain only alphanumeric characters and + underscores, and must start with a non-digit character or + underscore. +

Here doc text behaves just like a double-quoted string, without + the double-quotes. This means that you do not need to escape quotes + in your here docs, but you can still use the escape codes listed + above. Variables are expanded, but the same care must be taken + when expressing complex variables inside a here doc as with + strings. +

Example 6-1. Here doc string quoting example


<?php
+$str = <<<EOD
+Example of string
+spanning multiple lines
+using heredoc syntax.
+EOD;
+
+/* More complex example, with variables. */
+class foo {
+    var $foo;
+    var $bar;
+
+    function foo() {
+        $this->foo = 'Foo';
+        $this->bar = array('Bar1', 'Bar2', 'Bar3');
+    }
+}
+
+$foo = new foo();
+$name = 'MyName';
+
+echo <<<EOT
+My name is "$name". I am printing some $foo->foo.
+Now, I am printing some {$foo->bar[1]}.
+This should print a capital 'A': \x41
+EOT;
+?>
+     
+

Note: + Here doc support was added in PHP 4. +

Strings may be concatenated using the '.' (dot) operator. Note + that the '+' (addition) operator will not work for this. Please + see String + operators for more information. +

Characters within strings may be accessed by treating the string + as a numerically-indexed array of characters, using C-like + syntax. See below for examples. +

Example 6-2. Some string examples


<?php
+/* Assigning a string. */
+$str = "This is a string";
+
+/* Appending to it. */
+$str = $str . " with some more text";
+
+/* Another way to append, includes an escaped newline. */
+$str .= " and a newline at the end.\n";
+
+/* This string will end up being '<p>Number: 9</p>' */
+$num = 9;
+$str = "<p>Number: $num</p>";
+
+/* This one will be '<p>Number: $num</p>' */
+$num = 9;
+$str = '<p>Number: $num</p>';
+
+/* Get the first character of a string  */
+$str = 'This is a test.';
+$first = $str[0];
+
+/* Get the last character of a string. */
+$str = 'This is still a test.';
+$last = $str[strlen($str)-1];
+?>	  
+     
+

String conversion

When a string is evaluated as a numeric value, the resulting + value and type are determined as follows. +

The string will evaluate as a double if it contains any of the + characters '.', 'e', or 'E'. Otherwise, it will evaluate as an + integer. +

The value is given by the initial portion of the string. If the + string starts with valid numeric data, this will be the value + used. Otherwise, the value will be 0 (zero). Valid numeric data + is an optional sign, followed by one or more digits (optionally + containing a decimal point), followed by an optional + exponent. The exponent is an 'e' or 'E' followed by one or more + digits. +

When the first expression is a string, the type of the variable + will depend on the second expression. +


$foo = 1 + "10.5";              // $foo is double (11.5)
+$foo = 1 + "-1.3e3";            // $foo is double (-1299)
+$foo = 1 + "bob-1.3e3";         // $foo is integer (1)
+$foo = 1 + "bob3";              // $foo is integer (1)
+$foo = 1 + "10 Small Pigs";     // $foo is integer (11)
+$foo = 1 + "10 Little Piggies"; // $foo is integer (11)
+$foo = "10.0 pigs " + 1;        // $foo is integer (11)
+$foo = "10.0 pigs " + 1.0;      // $foo is double (11)     
+     

For more information on this conversion, see the Unix manual page + for strtod(3). +

If you would like to test any of the examples in this section, + you can cut and paste the examples and insert the following line + to see for yourself what's going on: +


echo "\$foo==$foo; type is " . gettype ($foo) . "<br>\n";
+      

+


PrevHomeNext
Floating point numbersUpArrays
\ No newline at end of file diff --git a/language.types.type-juggling.html b/language.types.type-juggling.html new file mode 100644 index 0000000..18e961f --- /dev/null +++ b/language.types.type-juggling.html @@ -0,0 +1,491 @@ +Type Juggling
PHP Manual
PrevChapter 6. TypesNext

Type Juggling

PHP does not require (or support) explicit type definition in + variable declaration; a variable's type is determined by the + context in which that variable is used. That is to say, if you + assign a string value to variable var, + var becomes a string. If you then assign an + integer value to var, it becomes an + integer. +

An example of PHP's automatic type conversion is the addition + operator '+'. If any of the operands is a double, then all + operands are evaluated as doubles, and the result will be a + double. Otherwise, the operands will be interpreted as integers, + and the result will also be an integer. Note that this does NOT + change the types of the operands themselves; the only change is in + how the operands are evaluated. +


$foo = "0";  // $foo is string (ASCII 48)
+$foo++;      // $foo is the string "1" (ASCII 49)
+$foo += 1;   // $foo is now an integer (2)
+$foo = $foo + 1.3;  // $foo is now a double (3.3)
+$foo = 5 + "10 Little Piggies"; // $foo is integer (15)
+$foo = 5 + "10 Small Pigs";     // $foo is integer (15)
+     

+

If the last two examples above seem odd, see String + conversion. +

If you wish to force a variable to be evaluated as a certain type, + see the section on Type + casting. If you wish to change the type of a variable, see + settype(). +

If you would like to test any of the examples in this section, you + can cut and paste the examples and insert the following line to + see for yourself what's going on: +


echo "\$foo==$foo; type is " . gettype ($foo) . "<br>\n";
+     

+

Note: + The behaviour of an automatic conversion to array is currently + undefined. +


$a = 1;       // $a is an integer
+$a[0] = "f";  // $a becomes an array, with $a[0] holding "f"
+      

+

While the above example may seem like it should clearly result in + $a becoming an array, the first element of which is 'f', consider + this: +


$a = "1";     // $a is a string
+$a[0] = "f";  // What about string offsets? What happens?
+      

+

Since PHP supports indexing into strings via offsets using the + same syntax as array indexing, the example above leads to a + problem: should $a become an array with its first element being + "f", or should "f" become the first character of the string $a? +

For this reason, as of PHP 3.0.12 and PHP 4.0b3-RC4, the result + of this automatic conversion is considered to be undefined. Fixes + are, however, being discussed. +

Type Casting

Type casting in PHP works much as it does in C: the name of the + desired type is written in parentheses before the variable which + is to be cast. +


$foo = 10;   // $foo is an integer
+$bar = (double) $foo;   // $bar is a double
+      

+

The casts allowed are: +

  • (int), (integer) - cast to integer

  • (real), (double), (float) - cast to double

  • (string) - cast to string

  • (array) - cast to array

  • (object) - cast to object

+

Note that tabs and spaces are allowed inside the parentheses, so + the following are functionally equivalent: +


$foo = (int) $bar;
+$foo = ( int ) $bar;
+      

+

It may not be obvious exactly what will happen when casting + between certain types. For instance, the following should be + noted. +

When casting from a scalar or a string variable to an array, the + variable will become the first element of the array: +


$var = 'ciao';
+$arr = (array) $var;
+echo $arr[0];  // outputs 'ciao'  
+      

+

When casting from a scalar or a string variable to an object, the + variable will become an attribute of the object; the attribute + name will be 'scalar': +


$var = 'ciao';
+$obj = (object) $var;
+echo $obj->scalar;  // outputs 'ciao'
+      

+


PrevHomeNext
ObjectsUpVariables
\ No newline at end of file diff --git a/language.variables.external.html b/language.variables.external.html new file mode 100644 index 0000000..2f47fdb --- /dev/null +++ b/language.variables.external.html @@ -0,0 +1,591 @@ +Variables from outside PHP
PHP Manual
PrevChapter 7. VariablesNext

Variables from outside PHP

HTML Forms (GET and POST)

When a form is submitted to a PHP script, any variables from that + form will be automatically made available to the script by + PHP. If the track_vars + configuration option is turned on, then these variables will be + located in the associative arrays + $HTTP_POST_VARS, + $HTTP_GET_VARS, and/or + $HTTP_POST_FILES, according to the + source of the variable in question. +

For more information on these variables, please read Predefined + variables. +

Example 7-1. Simple form variable


<form action="foo.php" method="post">
+    Name: <input type="text" name="username"><br>
+    <input type="submit">
+</form>
+      
+

When the above form is submitted, the value from the text input + will be available in + $HTTP_POST_VARS['username']. If the register_globals + configuration directive is turned on, then the variable will also + be available as $username in the global scope. +

PHP also understands arrays in the context of form variables. You + may, for example, group related variables together, or use this + feature to retrieve values from a multiple select + input: +

Example 7-2. More complex form variables


<form action="array.php" method="post">
+    Name: <input type="text" name="personal[name]"><br>
+    Email: <input type="text" name="personal[email]"><br>
+    Beer: <br>
+    <select multiple name="beer[]">
+        <option value="warthog">Warthog
+        <option value="guinness">Guinness
+        <option value="stuttgarter">Stuttgarter Schwabenbräu
+        </select>
+    <input type="submit">
+</form>
+      
+

In PHP 3, the array form variable usage is limited to + single-dimensional arrays. In PHP 4, no such restriction applies. +

IMAGE SUBMIT variable names

When submitting a form, it is possible to use an image instead + of the standard submit button with a tag like:


<input type=image src="image.gif" name="sub">
+      

When the user clicks somewhere on the image, the accompanying + form will be transmitted to the server with two additional + variables, sub_x and sub_y. These contain the coordinates of the + user click within the image. The experienced may note that the + actual variable names sent by the browser contains a period + rather than an underscore, but PHP converts the period to an + underscore automatically. +

HTTP Cookies

PHP transparently supports HTTP cookies as defined by Netscape's Spec. Cookies are a + mechanism for storing data in the remote browser and thus + tracking or identifying return users. You can set cookies using + the SetCookie() function. Cookies are part of + the HTTP header, so the SetCookie function must be called before + any output is sent to the browser. This is the same restriction + as for the Header() function. 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 [] to the cookie name. For + example: +


SetCookie ("MyCookie[]", "Testing", time()+3600);
+     

Note that a cookie will replace a previous cookie by the same + name in your browser unless the path or domain is different. So, + for a shopping cart application you may want to keep a counter + and pass this along. i.e. +

Example 7-3. SetCookie Example


$Count++;
+SetCookie ("Count", $Count, time()+3600);
+SetCookie ("Cart[$Count]", $item, time()+3600);
+     

Environment variables

PHP automatically makes environment variables available as normal + PHP variables. + +


echo $HOME;  /* Shows the HOME environment variable, if set. */
+      

+

Since information coming in via GET, POST and Cookie mechanisms + also automatically create PHP variables, it is sometimes best to + explicitly read a variable from the environment in order to make + sure that you are getting the right version. The + getenv() function can be used for this. You + can also set an environment variable with the + putenv() function. +

Dots in incoming variable names

Typically, PHP does not alter the names of variables when they + are passed into a script. However, it should be noted that the + dot (period, full stop) is not a valid character in a PHP + variable name. For the reason, look at it: +

$varname.ext;  /* invalid variable name */
+     
+ Now, what the parser sees is a variable named + $varname, followed by the string concatenation + operator, followed by the barestring (i.e. unquoted string which + doesn't match any known key or reserved words) 'ext'. Obviously, + this doesn't have the intended result. +

For this reason, it is important to note that PHP will + automatically replace any dots in incoming variable names with + underscores. +

Determining variable types

Because PHP determines the types of variables and converts them + (generally) as needed, it is not always obvious what type a given + variable is at any one time. PHP includes several functions + which find out what type a variable is. They are + gettype(), is_long(), + is_double(), is_string(), + is_array(), and + is_object(). +


PrevHomeNext
Variable variablesUpConstants
\ No newline at end of file diff --git a/language.variables.html b/language.variables.html new file mode 100644 index 0000000..9b0421e --- /dev/null +++ b/language.variables.html @@ -0,0 +1,336 @@ +Variables
PHP Manual
PrevNext

Chapter 7. Variables

Table of Contents
Basics
Predefined variables
Variable scope
Variable variables
Variables from outside PHP

Basics

Variables in PHP are represented by a dollar sign followed by the + name of the variable. The variable name is case-sensitive. +

Variable names follow the same rules as other labels in PHP. A + valid variable name starts with a letter or underscore, followed + by any number of letters, numbers, or underscores. As a regular + expression, it would be expressed thus: + '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*' +

Note: + For our purposes here, a letter is a-z, A-Z, and the ASCII + characters from 127 through 255 (0x7f-0xff). +

 
+$var = "Bob";
+$Var = "Joe";
+echo "$var, $Var";      // outputs "Bob, Joe"
+
+$4site = 'not yet';     // invalid; starts with a number
+$_4site = 'not yet';    // valid; starts with an underscore
+$täyte = 'mansikka';    // valid; 'ä' is ASCII 228.
+     

+

In PHP 3, variables are always assigned by value. That is to say, + when you assign an expression to a variable, the entire value of + the original expression is copied into the destination + variable. This means, for instance, that after assigning one + variable's value to another, changing one of those variables will + have no effect on the other. For more information on this kind of + assignment, see Expressions. +

PHP 4 offers another way to assign values to variables: + assign by reference. This means that the new + variable simply references (in other words, "becomes an alias for" + or "points to") the original variable. Changes to the new variable + affect the original, and vice versa. This also means that no + copying is performed; thus, the assignment happens more + quickly. However, any speedup will likely be noticed only in tight + loops or when assigning large arrays or objects. +

To assign by reference, simply prepend an ampersand (&) to the + beginning of the variable which is being assigned (the source + variable). For instance, the following code snippet outputs 'My + name is Bob' twice: + +


<?php
+$foo = 'Bob';              // Assign the value 'Bob' to $foo
+$bar = &$foo;          // Reference $foo via $bar.
+$bar = "My name is $bar";  // Alter $bar...
+echo $foo;                 // $foo is altered too.
+echo $bar;
+?>
+     

+

One important thing to note is that only named variables may be + assigned by reference. +


<?php
+$foo = 25;
+$bar = &$foo;      // This is a valid assignment.
+$bar = &(24 * 7);  // Invalid; references an unnamed expression.
+
+function test() {
+   return 25;
+}
+
+$bar = &test();    // Invalid.
+?>
+     

+


PrevHomeNext
Type JugglingUpPredefined variables
\ No newline at end of file diff --git a/language.variables.predefined.html b/language.variables.predefined.html new file mode 100644 index 0000000..56deba3 --- /dev/null +++ b/language.variables.predefined.html @@ -0,0 +1,635 @@ +Predefined variables
PHP Manual
PrevChapter 7. VariablesNext

Predefined variables

PHP provides a large number of predefined variables to any script + which it runs. Many of these variables, however, cannot be fully + documented as they are dependent upon which server is running, the + version and setup of the server, and other factors. Some of these + variables will not be available when PHP is run on the + command-line. +

Despite these factors, here is a list of predefined variables + available under a stock installation of PHP 3 running as a module + under a stock installation of Apache 1.3.6. +

For a list of all predefined variables (and lots of other useful + information), please see (and use) phpinfo(). +

Note: + This list is neither exhaustive nor intended to be. It is simply + a guideline as to what sorts of predefined variables you can + expect to have access to in your script. +

Apache variables

These variables are created by the Apache webserver. If you are running + another webserver, there is no guarantee that it will provide the + same variables; it may omit some, or provide others not listed + here. That said, a large number of these variables are accounted + for in the CGI 1.1 + specification, so you should be able to expect those. +

Note that few, if any, of these will be available (or indeed have + any meaning) if running PHP on the command line. +

GATEWAY_INTERFACE

What revision of the CGI specification the server is using; + i.e. 'CGI/1.1'. +

SERVER_NAME

The name of the server host under which the current script is + executing. If the script is running on a virtual host, this + will be the value defined for that virtual host. +

SERVER_SOFTWARE

Server identification string, given in the headers when + responding to requests. +

SERVER_PROTOCOL

Name and revision of the information protocol via which the + page was requested; i.e. 'HTTP/1.0'; +

REQUEST_METHOD

Which request method was used to access the page; i.e. 'GET', + 'HEAD', 'POST', 'PUT'. +

QUERY_STRING

The query string, if any, via which the page was accessed. +

DOCUMENT_ROOT

The document root directory under which the current script is + executing, as defined in the server's configuration file. +

HTTP_ACCEPT

Contents of the Accept: header from the + current request, if there is one. +

HTTP_ACCEPT_CHARSET

Contents of the Accept-Charset: header + from the current request, if there is one. Example: + 'iso-8859-1,*,utf-8'. +

HTTP_ENCODING

Contents of the Accept-Encoding: header + from the current request, if there is one. Example: 'gzip'. +

HTTP_ACCEPT_LANGUAGE

Contents of the Accept-Language: header + from the current request, if there is one. Example: 'en'. +

HTTP_CONNECTION

Contents of the Connection: header from + the current request, if there is one. Example: 'Keep-Alive'. +

HTTP_HOST

Contents of the Host: header from the + current request, if there is one. +

HTTP_REFERER

The address of the page (if any) which referred the browser + to the current page. This is set by the user's browser; not + all browsers will set this. +

HTTP_USER_AGENT

Contents of the User_Agent: header from + the current request, if there is one. This is a string + denoting the browser software being used to view the current + page; i.e. Mozilla/4.5 [en] (X11; U; Linux + 2.2.9 i586). Among other things, you can use + this value with get_browser() to tailor + your page's functionality to the capabilities of the user's + browser. +

REMOTE_ADDR

The IP address from which the user is viewing the current + page. +

REMOTE_PORT

The port being used on the user's machine to communicate with + the web server. +

SCRIPT_FILENAME

The absolute pathname of the currently executing script. +

SERVER_ADMIN

The value given to the SERVER_ADMIN (for Apache) directive in + the web server configuration file. If the script is running + on a virtual host, this will be the value defined for that + virtual host. +

SERVER_PORT

The port on the server machine being used by the web server + for communication. For default setups, this will be '80'; + using SSL, for instance, will change this to whatever your + defined secure HTTP port is. +

SERVER_SIGNATURE

String containing the server version and virtual host name + which are added to server-generated pages, if enabled. +

PATH_TRANSLATED

Filesystem- (not document root-) based path to the current + script, after the server has done any virtual-to-real + mapping. +

SCRIPT_NAME

Contains the current script's path. This is useful for pages + which need to point to themselves. +

REQUEST_URI

The URI which was given in order to access this page; for + instance, '/index.html'. +

+

Environment variables

These variables are imported into PHP's global namespace from the + environment under which the PHP parser is running. Many are + provided by the shell under which PHP is running and different + systems are likely running different kinds of shells, a + definitive list is impossible. Please see your shell's + documentation for a list of defined environment variables. +

Other environment variables include the CGI variables, placed + there regardless of whether PHP is running as a server module or + CGI processor. +

PHP variables

These variables are created by PHP itself. The + $HTTP_*_VARS variables are available only if + the track_vars + configuration is turned on. +

Note: + As of PHP 4.0.3, track_vars is always turned on, + regardless of the configuration file setting. +

If the register_globals directive + is set, then these variables will also be made available in the + global scope of the script; i.e., separate from the + $HTTP_*_VARS arrays. This feature should be + used with care, and turned off if possible; while the + $HTTP_*_VARS variables are safe, the bare + global equivalents can be overwritten by user input, with + possibly malicious intent. If you cannot turn off register_globals, you must + take whatever steps are necessary to ensure that the data you are + using is safe. +

argv

Array of arguments passed to the script. When the script is + run on the command line, this gives C-style access to the + command line parameters. When called via the GET method, this + will contain the query string. +

argc

Contains the number of command line parameters passed to the + script (if run on the command line). +

PHP_SELF

The filename of the currently executing script, relative to + the document root. If PHP is running as a command-line + processor, this variable is not available. +

HTTP_COOKIE_VARS

An associative array of variables passed to the current + script via HTTP cookies. +

HTTP_GET_VARS

An associative array of variables passed to the current + script via the HTTP GET method. +

HTTP_POST_VARS

An associative array of variables passed to the current + script via the HTTP POST method. +

HTTP_POST_FILES

An associative array of variables containing information + about files uploaded via the HTTP POST method. See POST method + uploads for information on the contents of + $HTTP_POST_FILES. +

$HTTP_POST_FILES is available only in PHP + 4.0.0 and later. +

HTTP_ENV_VARS

An associative array of variables passed to the current + script via the parent environment. +

HTTP_SERVER_VARS

An associative array of variables passed to the current + script from the HTTP server. These variables are analogous to + the Apache variables described above. +

+


PrevHomeNext
VariablesUpVariable scope
\ No newline at end of file diff --git a/language.variables.scope.html b/language.variables.scope.html new file mode 100644 index 0000000..afceabb --- /dev/null +++ b/language.variables.scope.html @@ -0,0 +1,457 @@ +Variable scope
PHP Manual
PrevChapter 7. VariablesNext

Variable scope

The scope of a variable is the context within which it is defined. + For the most part all PHP variables only have a single scope. + This single scope spans included and required files as well. For + example: +


$a = 1;
+include "b.inc";
+    

Here the $a variable will be available within + the included b.inc script. However, within + user-defined functions a local function scope is introduced. Any + variable used inside a function is by default limited to the local + function scope. For example: +

 
+$a = 1; /* global scope */ 
+
+Function Test () { 
+    echo $a; /* reference to local scope variable */ 
+} 
+
+Test ();
+    

This script will not produce any output because the echo statement + refers to a local version of the $a variable, + and it has not been assigned a value within this scope. You may + notice that this is a little bit different from the C language in + that global variables in C are automatically available to + functions unless specifically overridden by a local definition. + This can cause some problems in that people may inadvertently + change a global variable. In PHP global variables must be + declared global inside a function if they are going to be used in + that function. An example: +


$a = 1;
+$b = 2;
+
+Function Sum () {
+    global $a, $b;
+
+    $b = $a + $b;
+} 
+
+Sum ();
+echo $b;
+    

The above script will output "3". By declaring + $a and $b global within the + function, all references to either variable will refer to the + global version. There is no limit to the number of global + variables that can be manipulated by a function. +

A second way to access variables from the global scope is to use + the special PHP-defined $GLOBALS array. The + previous example can be rewritten as: +


$a = 1;
+$b = 2;
+
+Function Sum () {
+    $GLOBALS["b"] = $GLOBALS["a"] + $GLOBALS["b"];
+} 
+
+Sum ();
+echo $b;
+    

The $GLOBALS array is an associative array with + the name of the global variable being the key and the contents of + that variable being the value of the array element. +

Another important feature of variable scoping is the + static variable. A static variable exists + only in a local function scope, but it does not lose its value + when program execution leaves this scope. Consider the following + example: +


Function Test () {
+    $a = 0;
+    echo $a;
+    $a++;
+}
+    

This function is quite useless since every time it is called it + sets $a to 0 and prints + "0". The $a++ which increments the + variable serves no purpose since as soon as the function exits the + $a variable disappears. To make a useful + counting function which will not lose track of the current count, + the $a variable is declared static: +


Function Test () {
+    static $a = 0;
+    echo $a;
+    $a++;
+}
+    

Now, every time the Test() function is called it will print the + value of $a and increment it. +

Static variables also provide one way to deal with recursive + functions. A recursive function is one which calls itself. Care + must be taken when writing a recursive function because it is + possible to make it recurse indefinitely. You must make sure you + have an adequate way of terminating the recursion. The following + simple function recursively counts to 10, using the static + variable $count to know when to stop: +


Function Test () {
+    static $count = 0;
+
+    $count++;
+    echo $count;
+    if ($count < 10) {
+        Test ();
+    }
+    $count--;
+}
+    


PrevHomeNext
Predefined variablesUpVariable variables
\ No newline at end of file diff --git a/language.variables.variable.html b/language.variables.variable.html new file mode 100644 index 0000000..06915c4 --- /dev/null +++ b/language.variables.variable.html @@ -0,0 +1,289 @@ +Variable variables
PHP Manual
PrevChapter 7. VariablesNext

Variable variables

Sometimes it is convenient to be able to have variable variable + names. That is, a variable name which can be set and used + dynamically. A normal variable is set with a statement such as: +


$a = "hello";
+    

A variable variable takes the value of a variable and treats that + as the name of a variable. In the above example, + hello, can be used as the name of a variable + by using two dollar signs. i.e. +


$$a = "world";
+    

At this point two variables have been defined and stored in the + PHP symbol tree: $a with contents "hello" and + $hello with contents "world". Therefore, this + statement: +


echo "$a ${$a}";
+    

produces the exact same output as: +


echo "$a $hello";
+    

i.e. they both produce: hello world. +

In order to use variable variables with arrays, you have to + resolve an ambiguity problem. That is, if you write + $$a[1] then the parser needs to know if you + meant to use $a[1] as a variable, or if you + wanted $$a as the variable and then the [1] + index from that variable. The syntax for resolving this ambiguity + is: ${$a[1]} for the first case and + ${$a}[1] for the second. +


PrevHomeNext
Variable scopeUpVariables from outside PHP
\ No newline at end of file diff --git a/ln39.html b/ln39.html new file mode 100644 index 0000000..2fc5f8d --- /dev/null +++ b/ln39.html @@ -0,0 +1,119 @@ +
PHP3 Manual

Copyright

This manual is © Copyright 1997, 1998 the PHP Documentation + Group. The members of this group are listed on the front page of this manual. + +

This manual can be redistributed under the terms of the GNU + General Public License as published by the Free Software + Foundation; either version 2 of the License, or (at your option) + any later version. + +

PHP 3.0 is copyright (C) 1997 the PHP Development Team. The + members of this team are listed in the CREDITS file that comes with + the PHP 3.0 source distribution. + +

PHP 3.0 is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + +

PHP 3.0 is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + +

You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +


 Home 
\ No newline at end of file diff --git a/manual.html b/manual.html new file mode 100644 index 0000000..3c59ed9 --- /dev/null +++ b/manual.html @@ -0,0 +1,687 @@ +PHP Manual

PHP Manual

Stig Sæther Bakken
Alexander Aulbach
Egon Schmid
Jim Winstead
Lars Torben Wilson
Rasmus Lerdorf
Zeev Suraski
Andrei Zmievski

Edited by

Stig Sæther Bakken

Egon Schmid

Copyright © 1997, 1998, 1999, 2000 by the PHP Documentation Group


Table of Contents
Preface
About this Manual
I. Getting Started
1. Introduction
2. Installation
3. Configuration
4. Security
II. Language Reference
5. Basic syntax
6. Types
7. Variables
8. Constants
9. Expressions
10. Operators
11. Control Structures
12. Functions
13. Classes and Objects
14. References Explained
III. Features
15. Error Handling
16. Creating and manipulating images
17. HTTP authentication with PHP
18. Cookies
19. Handling file uploads
20. Using remote files
21. Connection handling
22. Persistent Database Connections
IV. Function Reference
I. Apache-specific Functions
II. Array Functions
III. Aspell functions
IV. BCMath Arbitrary Precision Mathematics Functions
V. Calendar functions
VI. CCVS API Functions
VII. COM support functions for Windows
VIII. Class/Object Functions
IX. ClibPDF functions
X. CURL, Client URL Library Functions
XI. Cybercash payment functions
XII. Database (dbm-style) abstraction layer functions
XIII. Date and Time functions
XIV. dBase functions
XV. DBM Functions
XVI. Directory functions
XVII. DOM XML functions
XVIII. Error Handling and Logging Functions
XIX. filePro functions
XX. Filesystem functions
XXI. Forms Data Format functions
XXII. FTP functions
XXIII. Function Handling functions
XXIV. GNU Gettext
XXV. HTTP functions
XXVI. Hyperwave functions
XXVII. ICAP Functions
XXVIII. Image functions
XXIX. IMAP, POP3 and NNTP functions
XXX. Informix functions
XXXI. InterBase functions
XXXII. LDAP functions
XXXIII. Mail functions
XXXIV. Mathematical Functions
XXXV. MCAL functions
XXXVI. Mcrypt Encryption Functions
XXXVII. Mhash Functions
XXXVIII. Microsoft SQL Server functions
XXXIX. Miscellaneous functions
XL. mSQL functions
XLI. MySQL functions
XLII. Network Functions
XLIII. Unified ODBC functions
XLIV. Oracle 8 functions
XLV. Oracle functions
XLVI. Output Control Functions
XLVII. PDF functions
XLVIII. Verisign Payflow Pro functions
XLIX. PHP options & information
L. POSIX functions
LI. PostgreSQL functions
LII. Program Execution functions
LIII. Pspell Functions
LIV. GNU Readline
LV. GNU Recode functions
LVI. Regular Expression Functions (Perl-Compatible)
LVII. Regular Expression Functions (POSIX Extended)
LVIII. Satellite CORBA client extension
LIX. Semaphore and Shared Memory Functions
LX. Session handling functions
LXI. Shared Memory Functions
LXII. Shockwave Flash functions
LXIII. SNMP functions
LXIV. Socket functions
LXV. String functions
LXVI. Sybase functions
LXVII. URL Functions
LXVIII. Variable Functions
LXIX. Vmailmgr functions
LXX. WDDX functions
LXXI. XML parser functions
LXXII. YAZ functions
LXXIII. YP/NIS Functions
LXXIV. Zlib Compression Functions
V. Appendixes
A. Migrating from PHP/FI 2.0 to PHP 3.0
B. PHP development
C. The PHP Debugger

  Next
  Preface
\ No newline at end of file diff --git a/manual.php3 b/manual.php3 new file mode 100644 index 0000000..808abfc --- /dev/null +++ b/manual.php3 @@ -0,0 +1,2 @@ + + diff --git a/migration-booleval.html b/migration-booleval.html new file mode 100644 index 0000000..eff074d --- /dev/null +++ b/migration-booleval.html @@ -0,0 +1,155 @@ +Short-circuited boolean evaluation
PHP Manual
PrevAppendix A. Migrating from PHP/FI 2.0 to PHP 3.0Next

Short-circuited boolean evaluation

In PHP 3.0 boolean evaluation is short-circuited. This means that + in an expression like (1 || test_me()), the + function test_me() would not be executed since + nothing can change the result of the expression after the + 1.

This is a minor compatibility issue, but may cause unexpected + side-effects.


PrevHomeNext
Error messages have changedUpFunction true/false return values
\ No newline at end of file diff --git a/migration-errors.html b/migration-errors.html new file mode 100644 index 0000000..5fd2931 --- /dev/null +++ b/migration-errors.html @@ -0,0 +1,143 @@ +Error messages have changed
PHP Manual
PrevAppendix A. Migrating from PHP/FI 2.0 to PHP 3.0Next

Error messages have changed

PHP 3.0's error messages are usually more accurate than 2.0's were, + but you no longer get to see the code fragment causing the error. + You will be supplied with a file name and a line number for the + error, though. +


PrevHomeNext
Expression typesUpShort-circuited boolean evaluation
\ No newline at end of file diff --git a/migration-expr.html b/migration-expr.html new file mode 100644 index 0000000..2dd7e5f --- /dev/null +++ b/migration-expr.html @@ -0,0 +1,238 @@ +Expression types
PHP Manual
PrevAppendix A. Migrating from PHP/FI 2.0 to PHP 3.0Next

Expression types

PHP/FI 2.0 used the left side of expressions to determine what type + the result should be. PHP 3.0 takes both sides into account when + determining result types, and this may cause 2.0 scripts to behave + unexpectedly in 3.0.

Consider this example: +


$a[0]=5;
+$a[1]=7;
+
+$key = key($a);
+while ("" != $key) {
+    echo "$keyn";
+    next($a);
+}
+

+ + In PHP/FI 2.0, this would display both of $a's indices. In PHP + 3.0, it wouldn't display anything. The reason is that in PHP 2.0, + because the left argument's type was string, a string comparison + was made, and indeed "" does not equal + "0", and the loop went through. In PHP 3.0, + when a string is compared with an integer, an integer comparison is + made (the string is converted to an integer). This results in + comparing atoi("") which is + 0, and variablelist which is + also 0, and since 0==0, the + loop doesn't go through even once. + +

The fix for this is simple. Replace the while statement with: +


while ((string)$key != "") {
+


PrevHomeNext
while syntaxUpError messages have changed
\ No newline at end of file diff --git a/migration-if-endif.html b/migration-if-endif.html new file mode 100644 index 0000000..e3f4ee2 --- /dev/null +++ b/migration-if-endif.html @@ -0,0 +1,227 @@ +if..endif syntax
PHP Manual
PrevAppendix A. Migrating from PHP/FI 2.0 to PHP 3.0Next

if..endif syntax

The `alternative' way to write if/elseif/else statements, using if(); + elseif(); else; endif; cannot be efficiently implemented without + adding a large amount of complexity to the 3.0 parser. Because of + this, the syntax has been changed: +

Example A-5. Migration: old if..endif syntax


if ($foo);
+    echo "yep\n";
+elseif ($bar);
+    echo "almost\n";
+else;
+    echo "nope\n";
+endif;
+
+

Example A-6. Migration: new if..endif syntax


if ($foo):
+    echo "yep\n";
+elseif ($bar):
+    echo "almost\n";
+else:
+    echo "nope\n";
+endif;
+
+ + Notice that the semicolons have been replaced by colons in all + statements but the one terminating the expression (endif).


PrevHomeNext
Start/end tagsUpwhile syntax
\ No newline at end of file diff --git a/migration-other.html b/migration-other.html new file mode 100644 index 0000000..1c93811 --- /dev/null +++ b/migration-other.html @@ -0,0 +1,329 @@ +Other incompatibilities
PHP Manual
PrevAppendix A. Migrating from PHP/FI 2.0 to PHP 3.0Next

Other incompatibilities

  • The PHP 3.0 Apache module no longer supports Apache versions + prior to 1.2. Apache 1.2 or later is required.

  • echo() no longer + supports a format string. Use the + printf() function instead.

  • In PHP/FI 2.0, an implementation side-effect caused + $foo[0] to have the same effect as + $foo. This is not true for PHP 3.0.

  • Reading arrays with $array[] is no longer + supported

    That is, you cannot traverse an array by having a loop that does + $data = $array[]. Use + current() and next() + instead.

    Also, $array1[] = $array2 does not append the + values of $array2 to $array1, + but appends $array2 as the last entry of + $array1. See also multidimensional array + support.

  • "+" is no longer overloaded as a + concatenation operator for strings, instead it converts it's + arguments to numbers and performs numeric addition. Use + "." instead.

Example A-11. Migration from 2.0: concatenation for strings


echo "1" + "1";
+

+ In PHP 2.0 this would echo 11, in PHP 3.0 it would echo 2. Instead + use: + +

echo "1"."1";
+
+ +

$a = 1;
+$b = 1;
+echo $a + $b;
+

+ This would echo 2 in both PHP 2.0 and 3.0. + +

$a = 1;
+$b = 1;
+echo $a.$b;
+
+ This will echo 11 in PHP 3.0.


PrevHomeNext
Function true/false return valuesUpPHP development
\ No newline at end of file diff --git a/migration-startendtags.html b/migration-startendtags.html new file mode 100644 index 0000000..ef40bcb --- /dev/null +++ b/migration-startendtags.html @@ -0,0 +1,305 @@ +Start/end tags
PHP Manual
PrevAppendix A. Migrating from PHP/FI 2.0 to PHP 3.0Next

Start/end tags

The first thing you probably will notice is that PHP's start and end + tags have changed. The old <? > form has been + replaced by three new possible forms: +

Example A-1. Migration: old start/end tags


<? echo "This is PHP/FI 2.0 code.\n"; >
+
+ + As of version 2.0, PHP/FI also supports this variation: + +

Example A-2. Migration: first new start/end tags


<? echo "This is PHP 3.0 code!\n"; ?>
+
+ + Notice that the end tag now consists of a question mark and a + greater-than character instead of just greater-than. However, if + you plan on using XML on your server, you will get problems with + the first new variant, because PHP may try to execute the XML + markup in XML documents as PHP code. Because of this, the + following variation was introduced: + +

Example A-3. Migration: second new start/end tags


<?php echo "This is PHP 3.0 code!\n"; ?>
+
+ + Some people have had problems with editors that don't understand + the processing instruction tags at all. Microsoft FrontPage is one + such editor, and as a workaround for these, the following variation + was introduced as well: + +

Example A-4. Migration: third new start/end tags


<script language="php">
+
+  echo "This is PHP 3.0 code!\n";
+
+</script>
+


PrevHomeNext
Migrating from PHP/FI 2.0 to PHP 3.0Upif..endif syntax
\ No newline at end of file diff --git a/migration-truefalse.html b/migration-truefalse.html new file mode 100644 index 0000000..6b607ec --- /dev/null +++ b/migration-truefalse.html @@ -0,0 +1,223 @@ +Function true/false return values
PHP Manual
PrevAppendix A. Migrating from PHP/FI 2.0 to PHP 3.0Next

Function true/false return values

Most internal functions have been rewritten so they return TRUE + when successful and FALSE when failing, as opposed to 0 and -1 in + PHP/FI 2.0, respectively. The new behaviour allows for more + logical code, like $fp = fopen("/your/file") or + fail("darn!");. Because PHP/FI 2.0 had no clear rules + for what functions should return when they failed, most such + scripts will probably have to be checked manually after using the + 2.0 to 3.0 convertor.

Example A-9. Migration from 2.0: return values, old code


$fp = fopen($file, "r");
+if ($fp == -1);
+    echo("Could not open $file for reading<br>\n");
+endif;
+
+

Example A-10. Migration from 2.0: return values, new code


$fp = @fopen($file, "r") or print("Could not open $file for reading<br>\n");
+


PrevHomeNext
Short-circuited boolean evaluationUpOther incompatibilities
\ No newline at end of file diff --git a/migration-while.html b/migration-while.html new file mode 100644 index 0000000..8609d37 --- /dev/null +++ b/migration-while.html @@ -0,0 +1,241 @@ +while syntax
PHP Manual
PrevAppendix A. Migrating from PHP/FI 2.0 to PHP 3.0Next

while syntax

Just like with if..endif, the syntax of while..endwhile has changed + as well: +

Example A-7. Migration: old while..endwhile syntax


while ($more_to_come);
+    ...
+endwhile;
+
+

Example A-8. Migration: new while..endwhile syntax


while ($more_to_come):
+    ...
+endwhile;
+
+

Warning

If you use the old while..endwhile syntax in PHP 3.0, you will get + a never-ending loop. +


PrevHomeNext
if..endif syntaxUpExpression types
\ No newline at end of file diff --git a/migration.html b/migration.html new file mode 100644 index 0000000..303d854 --- /dev/null +++ b/migration.html @@ -0,0 +1,223 @@ +Migrating from PHP/FI 2.0 to PHP 3.0
PHP Manual
PrevNext

Appendix A. Migrating from PHP/FI 2.0 to PHP 3.0

Table of Contents
About the incompatbilities in 3.0
Start/end tags
if..endif syntax
while syntax
Expression types
Error messages have changed
Short-circuited boolean evaluation
Function true/false return values
Other incompatibilities

About the incompatbilities in 3.0

PHP 3.0 is rewritten from the ground up. It has a proper parser + that is much more robust and consistent than 2.0's. 3.0 is also + significantly faster, and uses less memory. However, some of + these improvements have not been possible without compatibility + changes, both in syntax and functionality.

In addition, PHP's developers have tried to clean up both PHP's + syntax and semantics in version 3.0, and this has also caused some + incompatibilities. In the long run, we believe that these changes + are for the better.

This chapter will try to guide you through the incompatibilities + you might run into when going from PHP/FI 2.0 to PHP 3.0 and help + you resolve them. New features are not mentioned here unless + necessary.

A conversion program that can automatically convert your old + PHP/FI 2.0 scripts exists. It can be found in the convertor subdirectory of the PHP 3.0 + distribution. This program only catches the syntax changes though, + so you should read this chapter carefully anyway.


PrevHomeNext
AppendixesUpStart/end tags
\ No newline at end of file diff --git a/oop.html b/oop.html new file mode 100644 index 0000000..4ca2bbe --- /dev/null +++ b/oop.html @@ -0,0 +1,413 @@ +Classes and Objects
PHP Manual
PrevNext

Chapter 13. Classes and Objects

Table of Contents
class

class

A class is a collection of variables and functions working with + these variables. A class is defined using the following syntax: + +

  1 
+  2 <?php
+  3 class Cart {
+  4     var $items;  // Items in our shopping cart
+  5    
+  6     // Add $num articles of $artnr to the cart
+  7  
+  8     function add_item ($artnr, $num) {
+  9         $this->items[$artnr] += $num;
+ 10     }
+ 11    
+ 12     // Take $num articles of $artnr out of the cart
+ 13  
+ 14     function remove_item ($artnr, $num) {
+ 15         if ($this->items[$artnr] > $num) {
+ 16             $this->items[$artnr] -= $num;
+ 17             return true;
+ 18         } else {
+ 19             return false;
+ 20         }   
+ 21     }
+ 22 }
+ 23 ?>
+ 24      

+

This defines a class named Cart that consists of an associative + array of articles in the cart and two functions to add and remove + items from this cart. +

Classes are types, that is, they are blueprints for actual + variables. You have to create a variable of the desired type with + the new operator. +

  1 
+  2  $cart = new Cart;
+  3  $cart->add_item("10", 1);
+  4     

This creates an object $cart of the class Cart. The function + add_item() of that object is being called to add 1 item of article + number 10 to the cart.

Classes can be extensions of + other classes. The extended or derived class has all variables and + functions of the base class and what you add in the extended + definition. This is done using the extends keyword. Multiple + inheritance is not supported. +

  1 
+  2 class Named_Cart extends Cart {
+  3     var $owner;
+  4   
+  5     function set_owner ($name) {
+  6         $this->owner = $name;
+  7     }
+  8 }
+  9     

This defines a class Named_Cart that has all variables and + functions of Cart plus an additional variable $owner and an + additional function set_owner(). You create a named cart the usual + way and can now set and get the carts owner. You can still use + normal cart functions on named carts: +

  1 
+  2 $ncart = new Named_Cart;    // Create a named cart
+  3 $ncart->set_owner ("kris"); // Name that cart
+  4 print $ncart->owner;        // print the cart owners name
+  5 $ncart->add_item ("10", 1); // (inherited functionality from cart)
+  6     

Within functions of a class the variable $this means this + object. You have to use $this->something to access any variable or + function named something within your current object. +

Constructors are functions in a class that are automatically + called when you create a new instance of a class. A function + becomes a constructor when it has the same name as the class. +

  1 
+  2 class Auto_Cart extends Cart {
+  3     function Auto_Cart () {
+  4         $this->add_item ("10", 1);
+  5     }
+  6 }
+  7     

This defines a class Auto_Cart that is a Cart plus a constructor + which initializes the cart with one item of article number "10" + each time a new Auto_Cart is being made with "new". Constructors + can also take arguments and these arguments can be optional, which + makes them much more useful. +

  1 
+  2 class Constructor_Cart extends Cart {
+  3     function Constructor_Cart ($item = "10", $num = 1) {
+  4         $this->add_item ($item, $num);
+  5     }
+  6 }
+  7  
+  8 // Shop the same old boring stuff.
+  9  
+ 10 $default_cart   = new Constructor_Cart;
+ 11  
+ 12 // Shop for real...
+ 13  
+ 14 $different_cart = new Constructor_Cart ("20", 17);
+ 15     

Caution

For derived classes, the constructor of the parent class is not + automatically called when the derived class's constructor is + called. +


PrevHomeNext
Variable functionsUpFeatures
\ No newline at end of file diff --git a/operators.html b/operators.html new file mode 100644 index 0000000..4b5c34b --- /dev/null +++ b/operators.html @@ -0,0 +1,954 @@ +Operators
PHP3 Manual
PrevChapter 5. Syntax and grammarNext

Operators

Arithmetic Operators

Remember basic arithmetic from school? These work just + like those. +

Table 5-2. Arithmetic Operators

examplenameresult
$a + $bAdditionSum of $a and $b.
$a - $bSubtractionRemainder of $b subtracted from $a.
$a * $bMultiplicationProduct of $a and $b.
$a / $bDivisionDividend of $a and $b.
$a % $bModulusRemainder of $a divided by $b.

String Operators

There is only really one string operator -- the concatenation + operator ("."). +

$a = "Hello ";
+$b = $a . "World!"; // now $b = "Hello World!"
+     

+

Assignment Operators

The basic assignment operator is "=". Your first inclination might + be to think of this as "equal to". Don't. It really means that + the the left operand gets set to the value of the expression on the + rights (that is, "gets set to"). +

The value of an assignment expression is the value assigned. That + is, the value of "$a = 3" is 3. This allows you to do some tricky + things:

$a = ($b = 4) + 5; // $a is equal to 9 now, and $b has been set to 4.

+

In addition to the basic assignment operator, there are "combined + operators" for all of the binary arithmetic and string operators + that allow you to use a value in an expression and then set its + value to the result of that expression. For example:

$a = 3;
+$a += 5; // sets $a to 8, as if we had said: $a = $a + 5;
+$b = "Hello ";
+$b .= "There!"; // sets $b to "Hello There!", just like $b = $b . "There!";

+

Bitwise Operators

Bitwise operators allow you to turn specific bits within an integer + on or off. +

Table 5-3. Bitwise Operators

examplenameresult
$a & $bAndBits that are set in both $a and $b are set.
$a | $bOrBits that are set in either $a or $b are set.
~ $aNotBits that are set in $a are not set, and vice versa.
$a << $bShift leftShift the bits of $a $b steps to the left (each step means "multiply by two")
$a >> $bShift rightShift the bits of $a $b steps to the right (each step means "divide by two")

Logical Operators

Table 5-4. Logical Operators

examplenameresult
$a and $bAndTrue of both $a and $b are true.
$a or $bOrTrue if either $a or $b is true.
$a xor $bOrTrue if either $a or $b is true, but not both.
! $aNotTrue if $a is not true.
$a && $bAndTrue of both $a and $b are true.
$a || $bOrTrue if either $a or $b is true.

The reason for the two different variations of "and" and "or" + operators is that they operate at different precedences. (See below.) +

Comparison Operators

Comparison operators, as their name imply, allow you to compare two + values. +

Table 5-5. Comparson Operators

examplenameresult
$a == $bEqualTrue if $a is equal to $b.
$a != $bNot equalTrue if $a is not equal to $b.
$a < $bLess thanTrue if $a is strictly less than $b.
$a > $bGreater thanTrue if $a is strictly greater than $b.
$a <= $bLess than or equal to True if $a is less than or equal to $b.
$a >= $bGreater than or equal to True if $a is greater than or equal to $b.

Another conditional operator is the "?:" (or trinary) operator, which + operates as in C and many other languages. +

(expr1) ? (expr2) : (expr3);

+ This expression returns to expr2 if + expr1 evalutes to true, and expr3 if + expr1 evaluates to false. + +

Operator Precedence

The precedence of an operator specifies how "tightly" it binds + two expressions together. For example, in the expression + 1 + 5 * 3, the answer is 16 and not + 18 because the multiplication ("*") operator has a higher precedence + than the addition ("+") operator. +

The following table lists the precedence of operators with the + lowest-precedence operators listed first. + +

Table 5-6. Operator Precedence

AssociativityOperators
left,
leftor
leftxor
leftand
rightprint
left= += -= *= /= .= %= &= != ~= <<= >>=
left? :
left||
left&&
left|
left^
left&
non-associative== !=
non-associative< <= > >=
left<< >>
left+ - .
left* / %
right! ~ ++ -- (int) (double) (string) (array) (object) @
right[
non-associativenew
+ +


PrevHomeNext
ExpressionsUpControl Structures
\ No newline at end of file diff --git a/pattern.options.html b/pattern.options.html new file mode 100644 index 0000000..edd4712 --- /dev/null +++ b/pattern.options.html @@ -0,0 +1,314 @@ +Pattern Options
PHP3 Manual
PrevNext

Pattern Options

Pattern Options -- describes possible options in regex + patterns

Description

The current possible PCRE options are listed below. The names in + parentheses refer internal PCRE names for these options. + +

i (PCRE_CASELESS)

If this option is set, letters in the pattern match both + upper and lower case letters. +

m (PCRE_MULTILINE)

By default, PCRE treats the subject string as consisting of a + single "line" of characters (even if it actually contains + several newlines). The "start of line" metacharacter (^) + matches only at the start of the string, while the "end of + line" metacharacter ($) matches only at the end of the + string, or before a terminating newline (unless + E option is set). This is the same as + Perl. + +

When this option is set, the "start of line" and "end of + line" constructs match immediately following or immediately + before any newline in the subject string, respectively, as + well as at the very start and end. This is equivalent to + Perl's /m option. If there are no "\n" characters in a + subject string, or no occurrences of ^ or $ in a pattern, + setting this option has no effect. +

s (PCRE_DOTALL)

If this option is set, a dot metacharater in the pattern + matches all characters, including newlines. Without it, + newlines are excluded. This option is equivalent to Perl's + /s option. A negative class such as [^a] always matches a + newline character, independent of the setting of this + option. +

x (PCRE_EXTENDED)

If this option is set, whitespace data characters in the + pattern are totally ignored except when escaped or inside a + character class, and characters between an unescaped # + outside a character class and the next newline character, + inclusive, are also ignored. This is equivalent to Perl's /x + option, and makes it possible to include comments inside + complicated patterns. Note, however, that this applies only + to data characters. Whitespace characters may never appear + within special character sequences in a pattern, for example + within the sequence (?( which introduces a conditional + subpattern. +

A (PCRE_ANCHORED)

If this option is set, the pattern is forced to be + "anchored", that is, it is constrained to match only at the + start of the string which is being searched (the "subject + string"). This effect can also be achieved by appropriate + constructs in the pattern itself, which is the only way to + do it in Perl. +

E (PCRE_DOLLAR_ENDONLY)

If this option is set, a dollar metacharacter in the pattern + matches only at the end of the subject string. Without this + option, a dollar also matches immediately before the final + character if it is a newline (but not before any other + newlines). This option is ignored if m + option is set. There is no equivalent to this option in + Perl. +

S

When a pattern is going to be used several times, it is + worth spending more time analyzing it in order to speed up + the time taken for matching. If this option is set, then + this extra analysis is performed. At present, studying a + pattern is useful only for non-anchored patterns that do not + have a single fixed starting character. +

U (PCRE_UNGREEDY)

This option inverts the "greediness" of the quantifiers so + that they are not greedy by default, but become greedy if + followed by "?". It is not compatible with Perl. It can also + be set by a (?U) option setting within the pattern. +

X (PCRE_EXTRA)

This option turns on additional functionality of PCRE that + is incompatible with Perl. Any backslash in a pattern that + is followed by a letter that has no special meaning causes + an error, thus reserving these combinations for future + expansion. By default, as in Perl, a backslash followed by a + letter with no special meaning is treated as a literal. + There are at present no other features controlled by this + option. +

+


PrevHomeNext
preg_splitUpPDF Functions
\ No newline at end of file diff --git a/pcre.pattern.modifiers.html b/pcre.pattern.modifiers.html new file mode 100644 index 0000000..7434dd6 --- /dev/null +++ b/pcre.pattern.modifiers.html @@ -0,0 +1,353 @@ +Pattern Modifiers
PHP Manual
PrevNext

Pattern Modifiers

(unknown)

Pattern Modifiers -- Describes possible modifiers in regex + patterns

Description

The current possible PCRE modifiers are listed below. The names + in parentheses refer to internal PCRE names for these modifiers. +

i (PCRE_CASELESS)

If this modifier is set, letters in the pattern match both + upper and lower case letters. +

m (PCRE_MULTILINE)

By default, PCRE treats the subject string as consisting of a + single "line" of characters (even if it actually contains + several newlines). The "start of line" metacharacter (^) + matches only at the start of the string, while the "end of + line" metacharacter ($) matches only at the end of the + string, or before a terminating newline (unless + E modifier is set). This is the same as + Perl. +

When this modifier is set, the "start of line" and "end of + line" constructs match immediately following or immediately + before any newline in the subject string, respectively, as + well as at the very start and end. This is equivalent to + Perl's /m modifier. If there are no "\n" characters in a + subject string, or no occurrences of ^ or $ in a pattern, + setting this modifier has no effect. +

s (PCRE_DOTALL)

If this modifier is set, a dot metacharater in the pattern + matches all characters, including newlines. Without it, + newlines are excluded. This modifier is equivalent to Perl's + /s modifier. A negative class such as [^a] always matches a + newline character, independent of the setting of this + modifier. +

x (PCRE_EXTENDED)

If this modifier is set, whitespace data characters in the + pattern are totally ignored except when escaped or inside a + character class, and characters between an unescaped # + outside a character class and the next newline character, + inclusive, are also ignored. This is equivalent to Perl's /x + modifier, and makes it possible to include comments inside + complicated patterns. Note, however, that this applies only + to data characters. Whitespace characters may never appear + within special character sequences in a pattern, for example + within the sequence (?( which introduces a conditional + subpattern. +

e

If this modifier is set, preg_replace() + does normal substitution of \\ references in the + replacement string, evaluates it as PHP code, and uses the + result for replacing the search string. +

Only preg_replace() uses this modifier; + it is ignored by other PCRE functions. +

A (PCRE_ANCHORED)

If this modifier is set, the pattern is forced to be + "anchored", that is, it is constrained to match only at the + start of the string which is being searched (the "subject + string"). This effect can also be achieved by appropriate + constructs in the pattern itself, which is the only way to + do it in Perl. +

D (PCRE_DOLLAR_ENDONLY)

If this modifier is set, a dollar metacharacter in the pattern + matches only at the end of the subject string. Without this + modifier, a dollar also matches immediately before the final + character if it is a newline (but not before any other + newlines). This modifier is ignored if m + modifier is set. There is no equivalent to this modifier in + Perl. +

S

When a pattern is going to be used several times, it is + worth spending more time analyzing it in order to speed up + the time taken for matching. If this modifier is set, then + this extra analysis is performed. At present, studying a + pattern is useful only for non-anchored patterns that do not + have a single fixed starting character. +

U (PCRE_UNGREEDY)

This modifier inverts the "greediness" of the quantifiers so + that they are not greedy by default, but become greedy if + followed by "?". It is not compatible with Perl. It can also + be set by a (?U) modifier setting within the pattern. +

X (PCRE_EXTRA)

This modifier turns on additional functionality of PCRE that + is incompatible with Perl. Any backslash in a pattern that + is followed by a letter that has no special meaning causes + an error, thus reserving these combinations for future + expansion. By default, as in Perl, a backslash followed by a + letter with no special meaning is treated as a literal. + There are at present no other features controlled by this + modifier. +

+


PrevHomeNext
preg_grepUpPattern Syntax
\ No newline at end of file diff --git a/pcre.pattern.options.html b/pcre.pattern.options.html new file mode 100644 index 0000000..31d4a40 --- /dev/null +++ b/pcre.pattern.options.html @@ -0,0 +1,343 @@ +Pattern Options
PHP Manual
PrevNext

Pattern Options

Pattern Options -- describes possible options in regex + patterns

Description

The current possible PCRE options are listed below. The names in + parentheses refer to internal PCRE names for these options. + +

i (PCRE_CASELESS)

If this option is set, letters in the pattern match both + upper and lower case letters. +

m (PCRE_MULTILINE)

By default, PCRE treats the subject string as consisting of a + single "line" of characters (even if it actually contains + several newlines). The "start of line" metacharacter (^) + matches only at the start of the string, while the "end of + line" metacharacter ($) matches only at the end of the + string, or before a terminating newline (unless + E option is set). This is the same as + Perl. + +

When this option is set, the "start of line" and "end of + line" constructs match immediately following or immediately + before any newline in the subject string, respectively, as + well as at the very start and end. This is equivalent to + Perl's /m option. If there are no "\n" characters in a + subject string, or no occurrences of ^ or $ in a pattern, + setting this option has no effect. +

s (PCRE_DOTALL)

If this option is set, a dot metacharater in the pattern + matches all characters, including newlines. Without it, + newlines are excluded. This option is equivalent to Perl's + /s option. A negative class such as [^a] always matches a + newline character, independent of the setting of this + option. +

x (PCRE_EXTENDED)

If this option is set, whitespace data characters in the + pattern are totally ignored except when escaped or inside a + character class, and characters between an unescaped # + outside a character class and the next newline character, + inclusive, are also ignored. This is equivalent to Perl's /x + option, and makes it possible to include comments inside + complicated patterns. Note, however, that this applies only + to data characters. Whitespace characters may never appear + within special character sequences in a pattern, for example + within the sequence (?( which introduces a conditional + subpattern. +

e

If this option is set, preg_replace() + does normal substitution of \\ references in the + replacement string, evaluates it as PHP code, and uses the + result for replacing the search string. + +

Only preg_replace() uses this option, it is ignored by other PCRE functions. +

A (PCRE_ANCHORED)

If this option is set, the pattern is forced to be + "anchored", that is, it is constrained to match only at the + start of the string which is being searched (the "subject + string"). This effect can also be achieved by appropriate + constructs in the pattern itself, which is the only way to + do it in Perl. +

E (PCRE_DOLLAR_ENDONLY)

If this option is set, a dollar metacharacter in the pattern + matches only at the end of the subject string. Without this + option, a dollar also matches immediately before the final + character if it is a newline (but not before any other + newlines). This option is ignored if m + option is set. There is no equivalent to this option in + Perl. +

S

When a pattern is going to be used several times, it is + worth spending more time analyzing it in order to speed up + the time taken for matching. If this option is set, then + this extra analysis is performed. At present, studying a + pattern is useful only for non-anchored patterns that do not + have a single fixed starting character. +

U (PCRE_UNGREEDY)

This option inverts the "greediness" of the quantifiers so + that they are not greedy by default, but become greedy if + followed by "?". It is not compatible with Perl. It can also + be set by a (?U) option setting within the pattern. +

X (PCRE_EXTRA)

This option turns on additional functionality of PCRE that + is incompatible with Perl. Any backslash in a pattern that + is followed by a letter that has no special meaning causes + an error, thus reserving these combinations for future + expansion. By default, as in Perl, a backslash followed by a + letter with no special meaning is treated as a literal. + There are at present no other features controlled by this + option. +

+


PrevHomeNext
preg_grepUpPattern Syntax
\ No newline at end of file diff --git a/pcre.pattern.syntax.html b/pcre.pattern.syntax.html new file mode 100644 index 0000000..2ee6d08 --- /dev/null +++ b/pcre.pattern.syntax.html @@ -0,0 +1,1259 @@ +Pattern Syntax
PHP Manual
PrevNext

Pattern Syntax

(unknown)

Pattern Syntax -- Describes PCRE regex syntax

Description


+     The PCRE library is a set of functions that implement regular
+     expression pattern matching using the same syntax and semantics
+     as Perl 5, with just a few differences (see below).  The current
+     implementation corresponds to Perl 5.005.
+    

Differences From Perl


+     The differences described here  are  with  respect  to  Perl
+     5.005.
+
+     1. By default, a whitespace character is any character  that
+     the  C  library  function isspace() recognizes, though it is
+     possible to compile PCRE  with  alternative  character  type
+     tables. Normally isspace() matches space, formfeed, newline,
+     carriage return, horizontal tab, and vertical tab. Perl 5 no
+     longer  includes vertical tab in its set of whitespace char-
+     acters. The \v escape that was in the Perl documentation for
+     a long time was never in fact recognized. However, the char-
+     acter itself was treated as whitespace at least up to 5.002.
+     In 5.004 and 5.005 it does not match \s.
+
+     2. PCRE does  not  allow  repeat  quantifiers  on  lookahead
+     assertions. Perl permits them, but they do not mean what you
+     might think. For example, (?!a){3} does not assert that  the
+     next  three characters are not "a". It just asserts that the
+     next character is not "a" three times.
+
+     3. Capturing subpatterns that occur inside  negative  looka-
+     head  assertions  are  counted,  but  their  entries  in the
+     offsets vector are never set. Perl sets its numerical  vari-
+     ables  from  any  such  patterns that are matched before the
+     assertion fails to match something (thereby succeeding), but
+     only  if  the negative lookahead assertion contains just one
+     branch.
+
+     4. Though binary zero characters are supported in  the  sub-
+     ject  string,  they  are  not  allowed  in  a pattern string
+     because it is passed as a normal  C  string,  terminated  by
+     zero. The escape sequence "\0" can be used in the pattern to
+     represent a binary zero.
+
+     5. The following Perl escape sequences  are  not  supported:
+     \l,  \u,  \L,  \U,  \E, \Q. In fact these are implemented by
+     Perl's general string-handling and are not part of its  pat-
+     tern matching engine.
+
+     6. The Perl \G assertion is  not  supported  as  it  is  not
+     relevant to single pattern matches.
+
+     7. Fairly obviously, PCRE does  not  support  the  (?{code})
+     construction.
+
+     8. There are at the time of writing some  oddities  in  Perl
+     5.005_02  concerned  with  the  settings of captured strings
+     when part of a pattern is repeated.  For  example,  matching
+     "aba"  against the pattern /^(a(b)?)+$/ sets $2 to the value
+     "b", but matching "aabbaa" against /^(aa(bb)?)+$/ leaves  $2
+     unset.    However,    if   the   pattern   is   changed   to
+     /^(aa(b(b))?)+$/ then $2 (and $3) get set.
+
+     In Perl 5.004 $2 is set in both cases, and that is also true
+     of PCRE. If in the future Perl changes to a consistent state
+     that is different, PCRE may change to follow.
+
+     9. Another as yet unresolved discrepancy  is  that  in  Perl
+     5.005_02  the  pattern /^(a)?(?(1)a|b)+$/ matches the string
+     "a", whereas in PCRE it does not.  However, in both Perl and
+     PCRE /^(a)?a/ matched against "a" leaves $1 unset.
+
+     10. PCRE  provides  some  extensions  to  the  Perl  regular
+     expression facilities:
+
+     (a) Although lookbehind assertions must match  fixed  length
+     strings,  each  alternative branch of a lookbehind assertion
+     can match a different length of string. Perl 5.005  requires
+     them all to have the same length.
+
+     (b) If PCRE_DOLLAR_ENDONLY is set and PCRE_MULTILINE is  not
+     set,  the  $ meta- character matches only at the very end of
+     the string.
+
+     (c) If PCRE_EXTRA is set, a backslash followed by  a  letter
+     with no special meaning is faulted.
+
+     (d) If PCRE_UNGREEDY is set, the greediness of  the  repeti-
+     tion  quantifiers  is inverted, that is, by default they are
+     not greedy, but if followed by a question mark they are.
+    

Regular Expression Details


+     The syntax and semantics of  the  regular  expressions  sup-
+     ported  by PCRE are described below. Regular expressions are
+     also described in the Perl documentation and in a number  of
+     other  books,  some  of which have copious examples. Jeffrey
+     Friedl's  "Mastering  Regular  Expressions",  published   by
+     O'Reilly  (ISBN 1-56592-257-3), covers them in great detail.
+     The description here is intended as reference documentation.
+
+     A regular expression is a pattern that is matched against  a
+     subject string from left to right. Most characters stand for
+     themselves in a pattern, and match the corresponding charac-
+     ters in the subject. As a trivial example, the pattern
+
+       The quick brown fox
+
+     matches a portion of a subject string that is  identical  to
+     itself.  The  power  of  regular  expressions comes from the
+     ability to include alternatives and repetitions in the  pat-
+     tern.  These  are encoded in the pattern by the use of meta-
+     characters, which do not stand for  themselves  but  instead
+     are interpreted in some special way.
+
+     There are two different sets of meta-characters: those  that
+     are  recognized anywhere in the pattern except within square
+     brackets, and those that are recognized in square  brackets.
+     Outside square brackets, the meta-characters are as follows:
+
+       \      general escape character with several uses
+       ^      assert start of  subject  (or  line,  in  multiline
+     mode)
+       $      assert end of subject (or line, in multiline mode)
+       .      match any character except newline (by default)
+       [      start character class definition
+       |      start of alternative branch
+       (      start subpattern
+       )      end subpattern
+       ?      extends the meaning of (
+              also 0 or 1 quantifier
+              also quantifier minimizer
+       *      0 or more quantifier
+       +      1 or more quantifier
+       {      start min/max quantifier
+
+     Part of a pattern that is in square  brackets  is  called  a
+     "character  class".  In  a  character  class  the only meta-
+     characters are:
+
+       \      general escape character
+       ^      negate the class, but only if the first character
+       -      indicates character range
+       ]      terminates the character class
+
+     The following sections describe  the  use  of  each  of  the
+     meta-characters.
+
+BACKSLASH
+     The backslash character has several uses. Firstly, if it  is
+     followed  by  a  non-alphameric character, it takes away any
+     special  meaning  that  character  may  have.  This  use  of
+     backslash  as  an  escape  character applies both inside and
+     outside character classes.
+
+     For example, if you want to match a "*" character, you write
+     "\*" in the pattern. This applies whether or not the follow-
+     ing character would otherwise  be  interpreted  as  a  meta-
+     character,  so it is always safe to precede a non-alphameric
+     with "\" to specify that it stands for itself.  In  particu-
+     lar, if you want to match a backslash, you write "\\".
+
+     If a pattern is compiled with the PCRE_EXTENDED option, whi-
+     tespace in the pattern (other than in a character class) and
+     characters between a "#" outside a character class  and  the
+     next  newline  character  are ignored. An escaping backslash
+     can be used to include a whitespace or "#" character as part
+     of the pattern.
+
+     A second use of backslash provides a way  of  encoding  non-
+     printing  characters  in patterns in a visible manner. There
+     is no restriction on the appearance of non-printing  charac-
+     ters,  apart from the binary zero that terminates a pattern,
+     but when a pattern is being prepared by text editing, it  is
+     usually  easier to use one of the following escape sequences
+     than the binary character it represents:
+
+       \a     alarm, that is, the BEL character (hex 07)
+       \cx    "control-x", where x is any character
+       \e     escape (hex 1B)
+       \f     formfeed (hex 0C)
+       \n     newline (hex 0A)
+       \r     carriage return (hex 0D)
+       \t     tab (hex 09)
+       \xhh   character with hex code hh
+       \ddd   character with octal code ddd, or backreference
+
+     The precise effect of "\cx" is as follows: if "x" is a lower
+     case  letter,  it  is converted to upper case. Then bit 6 of
+     the character (hex 40) is inverted.  Thus "\cz" becomes  hex
+     1A, but "\c{" becomes hex 3B, while "\c;" becomes hex 7B.
+
+     After "\x", up to two hexadecimal digits are  read  (letters
+     can be in upper or lower case).
+
+     After "\0" up to two further octal digits are read. In  both
+     cases,  if  there are fewer than two digits, just those that
+     are present are used. Thus the sequence "\0\x\07"  specifies
+     two binary zeros followed by a BEL character.  Make sure you
+     supply two digits after the initial zero  if  the  character
+     that follows is itself an octal digit.
+
+     The handling of a backslash followed by a digit other than 0
+     is  complicated.   Outside  a character class, PCRE reads it
+     and any following digits as a decimal number. If the  number
+     is  less  than  10, or if there have been at least that many
+     previous capturing left parentheses in the  expression,  the
+     entire  sequence is taken as a back reference. A description
+     of how this works is given later, following  the  discussion
+     of parenthesized subpatterns.
+
+     Inside a character  class,  or  if  the  decimal  number  is
+     greater  than  9 and there have not been that many capturing
+     subpatterns, PCRE re-reads up to three octal digits  follow-
+     ing  the  backslash,  and  generates  a single byte from the
+     least significant 8 bits of the value. Any subsequent digits
+     stand for themselves.  For example:
+
+       \040   is another way of writing a space
+       \40    is the same, provided there are fewer than 40
+                 previous capturing subpatterns
+       \7     is always a back reference
+       \11    might be a back reference, or another way of
+                 writing a tab
+       \011   is always a tab
+       \0113  is a tab followed by the character "3"
+       \113   is the character with octal code 113 (since there
+                 can be no more than 99 back references)
+       \377   is a byte consisting entirely of 1 bits
+       \81    is either a back reference, or a binary zero
+                 followed by the two characters "8" and "1"
+
+     Note that octal values of 100 or greater must not be  intro-
+     duced  by  a  leading zero, because no more than three octal
+     digits are ever read.
+
+     All the sequences that define a single  byte  value  can  be
+     used both inside and outside character classes. In addition,
+     inside a character class, the sequence "\b"  is  interpreted
+     as  the  backspace  character  (hex 08). Outside a character
+     class it has a different meaning (see below).
+
+     The third use of backslash is for specifying generic charac-
+     ter types:
+
+       \d     any decimal digit
+       \D     any character that is not a decimal digit
+       \s     any whitespace character
+       \S     any character that is not a whitespace character
+       \w     any "word" character
+       \W     any "non-word" character
+
+     Each pair of escape sequences partitions the complete set of
+     characters  into  two  disjoint  sets.  Any  given character
+     matches one, and only one, of each pair.
+
+     A "word" character is any letter or digit or the  underscore
+     character,  that  is,  any  character which can be part of a
+     Perl "word". The definition of letters and  digits  is  con-
+     trolled  by PCRE's character tables, and may vary if locale-
+     specific matching is  taking  place  (see  "Locale  support"
+     above). For example, in the "fr" (French) locale, some char-
+     acter codes greater than 128 are used for accented  letters,
+     and these are matched by \w.
+
+     These character type sequences can appear  both  inside  and
+     outside  character classes. They each match one character of
+     the appropriate type. If the current matching  point  is  at
+     the end of the subject string, all of them fail, since there
+     is no character to match.
+
+     The fourth use of backslash is  for  certain  simple  asser-
+     tions. An assertion specifies a condition that has to be met
+     at a particular point in  a  match,  without  consuming  any
+     characters  from  the subject string. The use of subpatterns
+     for more complicated  assertions  is  described  below.  The
+     backslashed assertions are
+
+       \b     word boundary
+       \B     not a word boundary
+       \A     start of subject (independent of multiline mode)
+       \Z     end of subject or newline at  end  (independent  of
+     multiline mode)
+       \z     end of subject (independent of multiline mode)
+
+     These assertions may not appear in  character  classes  (but
+     note that "\b" has a different meaning, namely the backspace
+     character, inside a character class).
+
+     A word boundary is a position in the  subject  string  where
+     the current character and the previous character do not both
+     match \w or \W (i.e. one matches \w and  the  other  matches
+     \W),  or the start or end of the string if the first or last
+     character matches \w, respectively.
+
+     The \A, \Z, and \z assertions differ  from  the  traditional
+     circumflex  and  dollar  (described below) in that they only
+     ever match at the very start and end of the subject  string,
+     whatever  options  are  set.  They  are  not affected by the
+     PCRE_NOTBOL or PCRE_NOTEOL options. The  difference  between
+     \Z  and  \z  is that \Z matches before a newline that is the
+     last character of the string as well as at the  end  of  the
+     string, whereas \z matches only at the end.
+
+CIRCUMFLEX AND DOLLAR
+     Outside a character class, in the default matching mode, the
+     circumflex  character  is an assertion which is true only if
+     the current matching point is at the start  of  the  subject
+     string. Inside a character class, circumflex has an entirely
+     different meaning (see below).
+
+     Circumflex need not be the first character of the pattern if
+     a  number of alternatives are involved, but it should be the
+     first thing in each alternative in which it appears  if  the
+     pattern is ever to match that branch. If all possible alter-
+     natives start with a circumflex, that is, if the pattern  is
+     constrained to match only at the start of the subject, it is
+     said to be an "anchored" pattern. (There are also other con-
+     structs that can cause a pattern to be anchored.)
+
+     A dollar character is an assertion which is true only if the
+     current  matching point is at the end of the subject string,
+     or immediately before a newline character that is  the  last
+     character in the string (by default). Dollar need not be the
+     last character of the pattern if a  number  of  alternatives
+     are  involved,  but it should be the last item in any branch
+     in which it appears.  Dollar has no  special  meaning  in  a
+     character class.
+
+     The meaning of dollar can be changed so that it matches only
+     at   the   very   end   of   the   string,  by  setting  the
+     PCRE_DOLLAR_ENDONLY option at compile or matching time. This
+     does not affect the \Z assertion.
+
+     The meanings of the circumflex  and  dollar  characters  are
+     changed  if  the  PCRE_MULTILINE option is set. When this is
+     the case,  they  match  immediately  after  and  immediately
+     before an internal "\n" character, respectively, in addition
+     to matching at the start and end of the subject string.  For
+     example,  the  pattern  /^abc$/  matches  the subject string
+     "def\nabc" in multiline  mode,  but  not  otherwise.  Conse-
+     quently,  patterns  that  are  anchored  in single line mode
+     because all branches start with "^" are not anchored in mul-
+     tiline  mode.  The  PCRE_DOLLAR_ENDONLY option is ignored if
+     PCRE_MULTILINE is set.
+
+     Note that the sequences \A, \Z, and \z can be used to  match
+     the  start  and end of the subject in both modes, and if all
+     branches of a pattern start with \A is it  always  anchored,
+     whether PCRE_MULTILINE is set or not.
+
+
+
+FULL STOP (PERIOD, DOT)
+     Outside a character class, a dot in the pattern matches  any
+     one  character  in  the  subject,  including  a non-printing
+     character, but not (by default) newline.  If the PCRE_DOTALL
+     option  is  set,  then dots match newlines as well. The han-
+     dling of dot is entirely independent of the handling of cir-
+     cumflex  and  dollar,  the only relationship being that they
+     both involve newline characters.  Dot has no special meaning
+     in a character class.
+
+
+
+SQUARE BRACKETS
+     An opening square bracket introduces a character class, ter-
+     minated  by  a  closing  square  bracket.  A  closing square
+     bracket on its own is  not  special.  If  a  closing  square
+     bracket  is  required as a member of the class, it should be
+     the first data character in the class (after an initial cir-
+     cumflex, if present) or escaped with a backslash.
+
+     A character class matches a single character in the subject;
+     the  character  must  be in the set of characters defined by
+     the class, unless the first character in the class is a cir-
+     cumflex,  in which case the subject character must not be in
+     the set defined by the class. If a  circumflex  is  actually
+     required  as  a  member  of  the class, ensure it is not the
+     first character, or escape it with a backslash.
+
+     For example, the character class [aeiou] matches  any  lower
+     case vowel, while [^aeiou] matches any character that is not
+     a lower case vowel. Note that a circumflex is  just  a  con-
+     venient  notation for specifying the characters which are in
+     the class by enumerating those that are not. It  is  not  an
+     assertion:  it  still  consumes a character from the subject
+     string, and fails if the current pointer is at  the  end  of
+     the string.
+
+     When caseless matching  is  set,  any  letters  in  a  class
+     represent  both their upper case and lower case versions, so
+     for example, a caseless [aeiou] matches "A" as well as  "a",
+     and  a caseless [^aeiou] does not match "A", whereas a case-
+     ful version would.
+
+     The newline character is never treated in any special way in
+     character  classes,  whatever the setting of the PCRE_DOTALL
+     or PCRE_MULTILINE options is. A  class  such  as  [^a]  will
+     always match a newline.
+
+     The minus (hyphen) character can be used to specify a  range
+     of  characters  in  a  character  class.  For example, [d-m]
+     matches any letter between d and m, inclusive.  If  a  minus
+     character  is required in a class, it must be escaped with a
+     backslash or appear in a position where it cannot be  inter-
+     preted as indicating a range, typically as the first or last
+     character in the class.
+     It is not possible to have the literal character "]" as  the
+     end  character  of  a  range.  A  pattern such as [W-]46] is
+     interpreted as a class of two characters ("W" and "-")  fol-
+     lowed by a literal string "46]", so it would match "W46]" or
+     "-46]". However, if the "]" is escaped with a  backslash  it
+     is  interpreted  as  the end of range, so [W-\]46] is inter-
+     preted as a single class containing a range followed by  two
+     separate characters. The octal or hexadecimal representation
+     of "]" can also be used to end a range.
+
+     Ranges operate in ASCII collating sequence. They can also be
+     used  for  characters  specified  numerically,  for  example
+     [\000-\037]. If a range that includes letters is  used  when
+     caseless  matching  is set, it matches the letters in either
+     case. For example, [W-c] is equivalent  to  [][\^_`wxyzabc],
+     matched  caselessly,  and  if  character tables for the "fr"
+     locale are in use, [\xc8-\xcb] matches accented E characters
+     in both cases.
+
+     The character types \d, \D, \s, \S,  \w,  and  \W  may  also
+     appear  in  a  character  class, and add the characters that
+     they match to the class. For example, [\dABCDEF] matches any
+     hexadecimal  digit.  A  circumflex  can conveniently be used
+     with the upper case character types to specify a  more  res-
+     tricted set of characters than the matching lower case type.
+     For example, the class [^\W_] matches any letter  or  digit,
+     but not underscore.
+
+     All non-alphameric characters other than \,  -,  ^  (at  the
+     start)  and  the  terminating ] are non-special in character
+     classes, but it does no harm if they are escaped.
+
+
+
+VERTICAL BAR
+     Vertical bar characters are  used  to  separate  alternative
+     patterns. For example, the pattern
+
+       gilbert|sullivan
+
+     matches either "gilbert" or "sullivan". Any number of alter-
+     natives  may  appear,  and an empty alternative is permitted
+     (matching the empty string).   The  matching  process  tries
+     each  alternative in turn, from left to right, and the first
+     one that succeeds is used. If the alternatives are within  a
+     subpattern  (defined  below),  "succeeds" means matching the
+     rest of the main pattern as well as the alternative  in  the
+     subpattern.
+
+
+
+
+INTERNAL OPTION SETTING
+     The settings of PCRE_CASELESS, PCRE_MULTILINE,  PCRE_DOTALL,
+     and  PCRE_EXTENDED can be changed from within the pattern by
+     a sequence of Perl option letters enclosed between "(?"  and
+     ")". The option letters are
+
+       i  for PCRE_CASELESS
+       m  for PCRE_MULTILINE
+       s  for PCRE_DOTALL
+       x  for PCRE_EXTENDED
+
+     For example, (?im) sets caseless, multiline matching. It  is
+     also possible to unset these options by preceding the letter
+     with a hyphen, and a combined setting and unsetting such  as
+     (?im-sx),  which sets PCRE_CASELESS and PCRE_MULTILINE while
+     unsetting PCRE_DOTALL and PCRE_EXTENDED, is also  permitted.
+     If  a  letter  appears both before and after the hyphen, the
+     option is unset.
+
+     The scope of these option changes depends on  where  in  the
+     pattern  the  setting  occurs. For settings that are outside
+     any subpattern (defined below), the effect is the same as if
+     the  options were set or unset at the start of matching. The
+     following patterns all behave in exactly the same way:
+
+       (?i)abc
+       a(?i)bc
+       ab(?i)c
+       abc(?i)
+
+     which in turn is the same as compiling the pattern abc  with
+     PCRE_CASELESS  set.   In  other words, such "top level" set-
+     tings apply to the whole pattern  (unless  there  are  other
+     changes  inside subpatterns). If there is more than one set-
+     ting of the same option at top level, the rightmost  setting
+     is used.
+
+     If an option change occurs inside a subpattern,  the  effect
+     is  different.  This is a change of behaviour in Perl 5.005.
+     An option change inside a subpattern affects only that  part
+     of the subpattern that follows it, so
+
+       (a(?i)b)c
+
+     matches  abc  and  aBc  and  no  other   strings   (assuming
+     PCRE_CASELESS  is  not used).  By this means, options can be
+     made to have different settings in different  parts  of  the
+     pattern.  Any  changes  made  in one alternative do carry on
+     into subsequent branches within  the  same  subpattern.  For
+     example,
+
+       (a(?i)b|c)
+
+     matches "ab", "aB", "c", and "C", even though when  matching
+     "C" the first branch is abandoned before the option setting.
+     This is because the effects of  option  settings  happen  at
+     compile  time. There would be some very weird behaviour oth-
+     erwise.
+
+     The PCRE-specific options PCRE_UNGREEDY and  PCRE_EXTRA  can
+     be changed in the same way as the Perl-compatible options by
+     using the characters U and X  respectively.  The  (?X)  flag
+     setting  is  special in that it must always occur earlier in
+     the pattern than any of the additional features it turns on,
+     even when it is at top level. It is best put at the start.
+
+
+
+SUBPATTERNS
+     Subpatterns are delimited by parentheses  (round  brackets),
+     which can be nested.  Marking part of a pattern as a subpat-
+     tern does two things:
+
+     1. It localizes a set of alternatives. For example, the pat-
+     tern
+
+       cat(aract|erpillar|)
+
+     matches one of the words "cat",  "cataract",  or  "caterpil-
+     lar".  Without  the  parentheses, it would match "cataract",
+     "erpillar" or the empty string.
+
+     2. It sets up the subpattern as a capturing  subpattern  (as
+     defined  above).   When the whole pattern matches, that por-
+     tion of the subject string that matched  the  subpattern  is
+     passed  back  to  the  caller  via  the  ovector argument of
+     pcre_exec(). Opening parentheses are counted  from  left  to
+     right (starting from 1) to obtain the numbers of the captur-
+     ing subpatterns.
+
+     For example, if the string "the red king" is matched against
+     the pattern
+
+       the ((red|white) (king|queen))
+
+     the captured substrings are "red king", "red",  and  "king",
+     and are numbered 1, 2, and 3.
+
+     The fact that plain parentheses fulfil two functions is  not
+     always  helpful.  There are often times when a grouping sub-
+     pattern is required without a capturing requirement.  If  an
+     opening parenthesis is followed by "?:", the subpattern does
+     not do any capturing, and is not counted when computing  the
+     number of any subsequent capturing subpatterns. For example,
+     if the string "the  white  queen"  is  matched  against  the
+     pattern
+
+       the ((?:red|white) (king|queen))
+
+     the captured substrings are "white queen" and  "queen",  and
+     are  numbered  1  and 2. The maximum number of captured sub-
+     strings is 99, and the maximum number  of  all  subpatterns,
+     both capturing and non-capturing, is 200.
+
+     As a  convenient  shorthand,  if  any  option  settings  are
+     required  at  the  start  of a non-capturing subpattern, the
+     option letters may appear between the "?" and the ":".  Thus
+     the two patterns
+
+       (?i:saturday|sunday)
+       (?:(?i)saturday|sunday)
+
+     match exactly the same set of strings.  Because  alternative
+     branches  are  tried from left to right, and options are not
+     reset until the end of the subpattern is reached, an  option
+     setting  in  one  branch does affect subsequent branches, so
+     the above patterns match "SUNDAY" as well as "Saturday".
+
+
+
+REPETITION
+     Repetition is specified by quantifiers, which can follow any
+     of the following items:
+
+       a single character, possibly escaped
+       the . metacharacter
+       a character class
+       a back reference (see next section)
+       a parenthesized subpattern (unless it is  an  assertion  -
+     see below)
+
+     The general repetition quantifier specifies  a  minimum  and
+     maximum  number  of  permitted  matches,  by  giving the two
+     numbers in curly brackets (braces), separated  by  a  comma.
+     The  numbers  must be less than 65536, and the first must be
+     less than or equal to the second. For example:
+
+       z{2,4}
+
+     matches "zz", "zzz", or "zzzz". A closing brace on  its  own
+     is not a special character. If the second number is omitted,
+     but the comma is present, there is no upper  limit;  if  the
+     second number and the comma are both omitted, the quantifier
+     specifies an exact number of required matches. Thus
+
+       [aeiou]{3,}
+
+     matches at least 3 successive vowels,  but  may  match  many
+     more, while
+
+       \d{8}
+
+     matches exactly 8 digits.  An  opening  curly  bracket  that
+     appears  in a position where a quantifier is not allowed, or
+     one that does not match the syntax of a quantifier, is taken
+     as  a literal character. For example, {,6} is not a quantif-
+     ier, but a literal string of four characters.
+
+     The quantifier {0} is permitted, causing the  expression  to
+     behave  as  if the previous item and the quantifier were not
+     present.
+
+     For convenience (and  historical  compatibility)  the  three
+     most common quantifiers have single-character abbreviations:
+
+       *    is equivalent to {0,}
+       +    is equivalent to {1,}
+       ?    is equivalent to {0,1}
+
+     It is possible to construct infinite loops  by  following  a
+     subpattern  that  can  match no characters with a quantifier
+     that has no upper limit, for example:
+
+       (a?)*
+
+     Earlier versions of Perl and PCRE used to give an  error  at
+     compile  time  for such patterns. However, because there are
+     cases where this  can  be  useful,  such  patterns  are  now
+     accepted,  but  if  any repetition of the subpattern does in
+     fact match no characters, the loop is forcibly broken.
+
+     By default, the quantifiers  are  "greedy",  that  is,  they
+     match  as much as possible (up to the maximum number of per-
+     mitted times), without causing the rest of  the  pattern  to
+     fail. The classic example of where this gives problems is in
+     trying to match comments in C programs. These appear between
+     the  sequences /* and */ and within the sequence, individual
+     * and / characters may appear. An attempt to  match  C  com-
+     ments by applying the pattern
+
+       /\*.*\*/
+
+     to the string
+
+       /* first command */  not comment  /* second comment */
+
+     fails, because it matches  the  entire  string  due  to  the
+     greediness of the .*  item.
+
+     However, if a quantifier is followed  by  a  question  mark,
+     then it ceases to be greedy, and instead matches the minimum
+     number of times possible, so the pattern
+
+       /\*.*?\*/
+
+     does the right thing with the C comments. The meaning of the
+     various  quantifiers is not otherwise changed, just the pre-
+     ferred number of matches.  Do not confuse this use of  ques-
+     tion  mark  with  its  use as a quantifier in its own right.
+     Because it has two uses, it can sometimes appear doubled, as
+     in
+
+       \d??\d
+
+     which matches one digit by preference, but can match two  if
+     that is the only way the rest of the pattern matches.
+
+     If the PCRE_UNGREEDY option is set (an option which  is  not
+     available  in  Perl)  then the quantifiers are not greedy by
+     default, but individual ones can be made greedy by following
+     them  with  a  question mark. In other words, it inverts the
+     default behaviour.
+
+     When a parenthesized subpattern is quantified with a minimum
+     repeat  count  that is greater than 1 or with a limited max-
+     imum, more store is required for the  compiled  pattern,  in
+     proportion to the size of the minimum or maximum.
+
+     If a pattern starts with .* or  .{0,}  and  the  PCRE_DOTALL
+     option (equivalent to Perl's /s) is set, thus allowing the .
+     to match newlines, then the pattern is implicitly  anchored,
+     because whatever follows will be tried against every charac-
+     ter position in the subject string, so there is no point  in
+     retrying  the overall match at any position after the first.
+     PCRE treats such a pattern as though it were preceded by \A.
+     In  cases where it is known that the subject string contains
+     no newlines, it is worth setting PCRE_DOTALL when  the  pat-
+     tern begins with .* in order to obtain this optimization, or
+     alternatively using ^ to indicate anchoring explicitly.
+
+     When a capturing subpattern is repeated, the value  captured
+     is the substring that matched the final iteration. For exam-
+     ple, after
+
+       (tweedle[dume]{3}\s*)+
+
+     has matched "tweedledum tweedledee" the value  of  the  cap-
+     tured  substring  is  "tweedledee".  However,  if  there are
+     nested capturing  subpatterns,  the  corresponding  captured
+     values  may  have been set in previous iterations. For exam-
+     ple, after
+       /(a|(b))+/
+
+     matches "aba" the value of the second captured substring  is
+     "b".
+
+
+
+BACK REFERENCES
+     Outside a character class, a backslash followed by  a  digit
+     greater  than  0  (and  possibly  further  digits) is a back
+     reference to a capturing subpattern  earlier  (i.e.  to  its
+     left)  in  the  pattern,  provided there have been that many
+     previous capturing left parentheses.
+
+     However, if the decimal number following  the  backslash  is
+     less  than  10,  it is always taken as a back reference, and
+     causes an error only if there are not  that  many  capturing
+     left  parentheses in the entire pattern. In other words, the
+     parentheses that are referenced need not be to the  left  of
+     the  reference  for  numbers  less  than 10. See the section
+     entitled "Backslash" above for further details of  the  han-
+     dling of digits following a backslash.
+
+     A back reference matches whatever actually matched the  cap-
+     turing subpattern in the current subject string, rather than
+     anything matching the subpattern itself. So the pattern
+
+       (sens|respons)e and \1ibility
+
+     matches "sense and sensibility" and "response and  responsi-
+     bility",  but  not  "sense  and  responsibility". If caseful
+     matching is in force at the time of the back reference, then
+     the case of letters is relevant. For example,
+
+       ((?i)rah)\s+\1
+
+     matches "rah rah" and "RAH RAH", but  not  "RAH  rah",  even
+     though  the  original  capturing subpattern is matched case-
+     lessly.
+
+     There may be more than one back reference to the  same  sub-
+     pattern.  If  a  subpattern  has not actually been used in a
+     particular match, then any  back  references  to  it  always
+     fail. For example, the pattern
+
+       (a|(bc))\2
+
+     always fails if it starts to match  "a"  rather  than  "bc".
+     Because  there  may  be up to 99 back references, all digits
+     following the backslash are taken as  part  of  a  potential
+     back reference number. If the pattern continues with a digit
+     character, then some delimiter must be used to terminate the
+     back reference. If the PCRE_EXTENDED option is set, this can
+     be whitespace.  Otherwise an empty comment can be used.
+
+     A back reference that occurs inside the parentheses to which
+     it  refers  fails when the subpattern is first used, so, for
+     example, (a\1) never matches.  However, such references  can
+     be useful inside repeated subpatterns. For example, the pat-
+     tern
+
+       (a|b\1)+
+
+     matches any number of "a"s and also "aba", "ababaa" etc.  At
+     each iteration of the subpattern, the back reference matches
+     the character string corresponding to  the  previous  itera-
+     tion.  In  order  for this to work, the pattern must be such
+     that the first iteration does not need  to  match  the  back
+     reference.  This  can  be  done using alternation, as in the
+     example above, or by a quantifier with a minimum of zero.
+
+
+
+ASSERTIONS
+     An assertion is  a  test  on  the  characters  following  or
+     preceding  the current matching point that does not actually
+     consume any characters. The simple assertions coded  as  \b,
+     \B,  \A,  \Z,  \z, ^ and $ are described above. More compli-
+     cated assertions are coded as  subpatterns.  There  are  two
+     kinds:  those that look ahead of the current position in the
+     subject string, and those that look behind it.
+
+     An assertion subpattern is matched in the normal way, except
+     that  it  does not cause the current matching position to be
+     changed. Lookahead assertions start with  (?=  for  positive
+     assertions and (?! for negative assertions. For example,
+
+       \w+(?=;)
+
+     matches a word followed by a semicolon, but does not include
+     the semicolon in the match, and
+
+       foo(?!bar)
+
+     matches any occurrence of "foo"  that  is  not  followed  by
+     "bar". Note that the apparently similar pattern
+
+       (?!foo)bar
+
+     does not find an occurrence of "bar"  that  is  preceded  by
+     something other than "foo"; it finds any occurrence of "bar"
+     whatsoever, because the assertion  (?!foo)  is  always  true
+     when  the  next  three  characters  are  "bar". A lookbehind
+     assertion is needed to achieve this effect.
+     Lookbehind assertions start with (?<=  for  positive  asser-
+     tions and (?<! for negative assertions. For example,
+
+       (?<!foo)bar
+
+     does find an occurrence of "bar" that  is  not  preceded  by
+     "foo". The contents of a lookbehind assertion are restricted
+     such that all the strings  it  matches  must  have  a  fixed
+     length.  However, if there are several alternatives, they do
+     not all have to have the same fixed length. Thus
+
+       (?<=bullock|donkey)
+
+     is permitted, but
+
+       (?<!dogs?|cats?)
+
+     causes an error at compile time. Branches  that  match  dif-
+     ferent length strings are permitted only at the top level of
+     a lookbehind assertion. This is an extension  compared  with
+     Perl  5.005,  which  requires all branches to match the same
+     length of string. An assertion such as
+
+       (?<=ab(c|de))
+
+     is not permitted, because its single  top-level  branch  can
+     match two different lengths, but it is acceptable if rewrit-
+     ten to use two top-level branches:
+
+       (?<=abc|abde)
+
+     The implementation of lookbehind  assertions  is,  for  each
+     alternative,  to  temporarily move the current position back
+     by the fixed width and then  try  to  match.  If  there  are
+     insufficient  characters  before  the  current position, the
+     match is deemed to fail.  Lookbehinds  in  conjunction  with
+     once-only  subpatterns can be particularly useful for match-
+     ing at the ends of strings; an example is given at  the  end
+     of the section on once-only subpatterns.
+
+     Several assertions (of any sort) may  occur  in  succession.
+     For example,
+
+       (?<=\d{3})(?<!999)foo
+
+     matches "foo" preceded by three digits that are  not  "999".
+     Furthermore,  assertions  can  be nested in any combination.
+     For example,
+
+       (?<=(?<!foo)bar)baz
+
+     matches an occurrence of "baz" that  is  preceded  by  "bar"
+     which in turn is not preceded by "foo".
+
+     Assertion subpatterns are not capturing subpatterns, and may
+     not  be  repeated,  because  it makes no sense to assert the
+     same thing several times. If an assertion contains capturing
+     subpatterns within it, these are always counted for the pur-
+     poses of numbering the capturing subpatterns  in  the  whole
+     pattern.   Substring  capturing  is carried out for positive
+     assertions, but it does not make sense for  negative  asser-
+     tions.
+
+     Assertions count towards the maximum  of  200  parenthesized
+     subpatterns.
+
+
+
+ONCE-ONLY SUBPATTERNS
+     With both maximizing and minimizing repetition,  failure  of
+     what  follows  normally  causes  the repeated item to be re-
+     evaluated to see if a different number of repeats allows the
+     rest  of  the  pattern  to  match. Sometimes it is useful to
+     prevent this, either to change the nature of the  match,  or
+     to  cause  it fail earlier than it otherwise might, when the
+     author of the pattern knows there is no  point  in  carrying
+     on.
+
+     Consider, for example, the pattern \d+foo  when  applied  to
+     the subject line
+
+       123456bar
+
+     After matching all 6 digits and then failing to match "foo",
+     the normal action of the matcher is to try again with only 5
+     digits matching the \d+ item, and then with 4,  and  so  on,
+     before ultimately failing. Once-only subpatterns provide the
+     means for specifying that once a portion of the pattern  has
+     matched,  it  is  not to be re-evaluated in this way, so the
+     matcher would give up immediately on failing to match  "foo"
+     the  first  time.  The  notation  is another kind of special
+     parenthesis, starting with (?> as in this example:
+
+       (?>\d+)bar
+
+     This kind of parenthesis "locks up" the  part of the pattern
+     it  contains once it has matched, and a failure further into
+     the pattern is prevented from backtracking  into  it.  Back-
+     tracking  past  it to previous items, however, works as nor-
+     mal.
+
+     An alternative description is that a subpattern of this type
+     matches  the  string  of  characters that an identical stan-
+     dalone pattern would match, if anchored at the current point
+     in the subject string.
+
+     Once-only subpatterns are not capturing subpatterns.  Simple
+     cases  such as the above example can be thought of as a max-
+     imizing repeat that must  swallow  everything  it  can.  So,
+     while both \d+ and \d+? are prepared to adjust the number of
+     digits they match in order to make the rest of  the  pattern
+     match, (?>\d+) can only match an entire sequence of digits.
+
+     This construction can of course contain arbitrarily  compli-
+     cated subpatterns, and it can be nested.
+
+     Once-only subpatterns can be used in conjunction with  look-
+     behind  assertions  to specify efficient matching at the end
+     of the subject string. Consider a simple pattern such as
+
+       abcd$
+
+     when applied to a long  string  which  does  not  match  it.
+     Because matching proceeds from left to right, PCRE will look
+     for each "a" in the subject and then  see  if  what  follows
+     matches the rest of the pattern. If the pattern is specified
+     as
+
+       ^.*abcd$
+
+     then the initial .* matches the entire string at first,  but
+     when  this  fails,  it  backtracks to match all but the last
+     character, then all but the last two characters, and so  on.
+     Once again the search for "a" covers the entire string, from
+     right to left, so we are no better off. However, if the pat-
+     tern is written as
+
+       ^(?>.*)(?<=abcd)
+
+     then there can be no backtracking for the .*  item;  it  can
+     match  only  the  entire  string.  The subsequent lookbehind
+     assertion does a single test on the last four characters. If
+     it  fails,  the  match  fails immediately. For long strings,
+     this approach makes a significant difference to the process-
+     ing time.
+
+
+
+CONDITIONAL SUBPATTERNS
+     It is possible to cause the matching process to obey a  sub-
+     pattern  conditionally  or to choose between two alternative
+     subpatterns, depending on the result  of  an  assertion,  or
+     whether  a previous capturing subpattern matched or not. The
+     two possible forms of conditional subpattern are
+
+       (?(condition)yes-pattern)
+       (?(condition)yes-pattern|no-pattern)
+
+     If the condition is satisfied, the yes-pattern is used; oth-
+     erwise  the  no-pattern  (if  present) is used. If there are
+     more than two alternatives in the subpattern, a compile-time
+     error occurs.
+
+     There are two kinds of condition. If the  text  between  the
+     parentheses  consists of a sequence of digits, then the con-
+     dition is satisfied if  the  capturing  subpattern  of  that
+     number  has  previously matched. Consider the following pat-
+     tern, which contains non-significant white space to make  it
+     more  readable  (assume  the  PCRE_EXTENDED  option)  and to
+     divide it into three parts for ease of discussion:
+
+       ( \( )?    [^()]+    (?(1) \) )
+
+     The first part matches an optional opening parenthesis,  and
+     if  that character is present, sets it as the first captured
+     substring. The second part matches one  or  more  characters
+     that  are  not  parentheses. The third part is a conditional
+     subpattern that tests whether the first set  of  parentheses
+     matched  or  not.  If  they did, that is, if subject started
+     with an opening parenthesis, the condition is true,  and  so
+     the  yes-pattern  is  executed  and a closing parenthesis is
+     required. Otherwise, since no-pattern is  not  present,  the
+     subpattern  matches  nothing.  In  other words, this pattern
+     matches a sequence of non-parentheses,  optionally  enclosed
+     in parentheses.
+
+     If the condition is not a sequence of digits, it must be  an
+     assertion.  This  may be a positive or negative lookahead or
+     lookbehind assertion. Consider this pattern, again  contain-
+     ing  non-significant  white space, and with the two alterna-
+     tives on the second line:
+
+       (?(?=[^a-z]*[a-z])
+       \d{2}[a-z]{3}-\d{2}  |  \d{2}-\d{2}-\d{2} )
+
+     The condition is a positive lookahead assertion that matches
+     an optional sequence of non-letters followed by a letter. In
+     other words, it tests for  the  presence  of  at  least  one
+     letter  in the subject. If a letter is found, the subject is
+     matched against  the  first  alternative;  otherwise  it  is
+     matched  against the second. This pattern matches strings in
+     one of the two forms dd-aaa-dd or dd-dd-dd,  where  aaa  are
+     letters and dd are digits.
+
+
+
+COMMENTS
+     The  sequence  (?#  marks  the  start  of  a  comment  which
+     continues   up  to  the  next  closing  parenthesis.  Nested
+     parentheses are not permitted. The characters that make up a
+     comment play no part in the pattern matching at all.
+
+     If the PCRE_EXTENDED option is set, an unescaped # character
+     outside  a character class introduces a comment that contin-
+     ues up to the next newline character in the pattern.
+
+
+
+PERFORMANCE
+     Certain items that may appear in patterns are more efficient
+     than  others.  It is more efficient to use a character class
+     like [aeiou] than a set of alternatives such as (a|e|i|o|u).
+     In  general,  the  simplest  construction  that provides the
+     required behaviour is usually the  most  efficient.  Jeffrey
+     Friedl's  book contains a lot of discussion about optimizing
+     regular expressions for efficient performance.
+
+     When a pattern begins with .* and the PCRE_DOTALL option  is
+     set,  the  pattern  is implicitly anchored by PCRE, since it
+     can match only at the start of a subject string. However, if
+     PCRE_DOTALL  is not set, PCRE cannot make this optimization,
+     because the . metacharacter does not then match  a  newline,
+     and if the subject string contains newlines, the pattern may
+     match from the character immediately following one  of  them
+     instead of from the very start. For example, the pattern
+
+        (.*) second
+
+     matches the subject "first\nand second" (where \n stands for
+     a newline character) with the first captured substring being
+     "and". In order to do this, PCRE  has  to  retry  the  match
+     starting after every newline in the subject.
+
+     If you are using such a pattern with subject strings that do
+     not  contain  newlines,  the best performance is obtained by
+     setting PCRE_DOTALL, or starting the  pattern  with  ^.*  to
+     indicate  explicit anchoring. That saves PCRE from having to
+     scan along the subject looking for a newline to restart at.
+    


PrevHomeNext
Pattern ModifiersUpRegular Expression Functions (POSIX Extended)
\ No newline at end of file diff --git a/phpdevel-errors.html b/phpdevel-errors.html new file mode 100644 index 0000000..8ae8fe8 --- /dev/null +++ b/phpdevel-errors.html @@ -0,0 +1,336 @@ +Reporting Errors
PHP Manual
PrevAppendix B. PHP developmentNext

Reporting Errors

To report errors from an internal function, you should call the + php3_error() function. This takes at least two + parameters -- the first is the level of the error, the second is + the format string for the error message (as in a standard + printf() call), and any following arguments + are the parameters for the format string. The error levels are: +

E_NOTICE

Notices are not printed by default, and indicate that the script + encountered something that could indicate an error, but could also + happen in the normal course of running a script. For example, + trying to access the value of a variable which has not been set, + or calling stat() on a file that doesn't exist. +

E_WARNING

Warnings are printed by default, but do not interrupt script + execution. These indicate a problem that should have been trapped + by the script before the call was made. For example, calling + ereg() with an invalid regular expression. +

E_ERROR

Errors are also printed by default, and execution of the script is + halted after the function returns. These indicate errors that can + not be recovered from, such as a memory allocation problem. +

E_PARSE

Parse errors should only be generated by the parser. The code is + listed here only for the sake of completeness. +

E_CORE_ERROR

This is like an E_ERROR, except it is generated by the core + of PHP. Functions should not generate this type of error. +

E_CORE_WARNING

This is like an E_WARNING, except it is generated by the core + of PHP. Functions should not generate this type of error. +

E_COMPILE_ERROR

This is like an E_ERROR, except it is generated by the Zend Scripting + Engine. Functions should not generate this type of error. +

E_COMPILE_WARNING

This is like an E_WARNING, except it is generated by the Zend Scripting + Engine. Functions should not generate this type of error. +

E_USER_ERROR

This is like an E_ERROR, except it is generated in PHP code by using + the PHP function trigger_error(). Functions should + not generate this type of error. +

E_USER_WARNING

This is like an E_WARNING, except it is generated by using the PHP + function trigger_error(). Functions should not + generate this type of error. +

E_USER_NOTICE

This is like an E_NOTICE, except it is generated by using the PHP + function trigger_error(). Functions should not + generate this type of error. +


PrevHomeNext
Calling User FunctionsUpThe PHP Debugger
\ No newline at end of file diff --git a/phpdevel-hhgtpi.html b/phpdevel-hhgtpi.html new file mode 100644 index 0000000..cfb6f09 --- /dev/null +++ b/phpdevel-hhgtpi.html @@ -0,0 +1,136 @@ +Hitchhiker's guide to PHP internals
PHP3 Manual
PrevAppendix B. PHP developmentNext

Hitchhiker's guide to PHP internals


PrevHomeNext
Reporting ErrorsUpThe PHP Debugger
\ No newline at end of file diff --git a/phpdevel.html b/phpdevel.html new file mode 100644 index 0000000..3f8093e --- /dev/null +++ b/phpdevel.html @@ -0,0 +1,1473 @@ +PHP development
PHP Manual
PrevNext

Appendix B. PHP development

Table of Contents
Adding functions to PHP 3
Calling User Functions
Reporting Errors

Adding functions to PHP 3

Function Prototype

All functions look like this: +
       
+void php3_foo(INTERNAL_FUNCTION_PARAMETERS) {
+     
+}
+    
+ Even if your function doesn't take any arguments, this is how it is + called.

Function Arguments

Arguments are always of type pval. This type contains a union + which has the actual type of the argument. So, if your function + takes two arguments, you would do something like the following at + the top of your function:

Example B-1. Fetching function arguments


pval *arg1, *arg2;
+if (ARG_COUNT(ht) != 2 || getParameters(ht,2,&arg1,&arg2)==FAILURE) {
+   WRONG_PARAM_COUNT;
+}
+     
+ + NOTE: Arguments can be passed either by value or by reference. In + both cases you will need to pass &(pval *) to getParameters. If + you want to check if the n'th parameter was sent to you by + reference or not, you can use the function, + ParameterPassedByReference(ht,n). It will return either 1 or 0.

When you change any of the passed parameters, whether they are + sent by reference or by value, you can either start over with the + parameter by calling pval_destructor on it, or if it's an ARRAY + you want to add to, you can use functions similar to the ones in + internal_functions.h which manipulate return_value as an ARRAY.

Also if you change a parameter to IS_STRING make sure you first + assign the new estrdup()'ed string and the string length, and only + later change the type to IS_STRING. If you change the string of a + parameter which already IS_STRING or IS_ARRAY you should run + pval_destructor on it first.

Variable Function Arguments

A function can take a variable number of arguments. If your function can + take either 2 or 3 arguments, use the following:

Example B-2. Variable function arguments


pval *arg1, *arg2, *arg3;
+int arg_count = ARG_COUNT(ht);
+
+if (arg_count < 2 || arg_count > 3 ||
+    getParameters(ht,arg_count,&arg1,&arg2,&arg3)==FAILURE) {
+    WRONG_PARAM_COUNT;
+}
+    

Using the Function Arguments

The type of each argument is stored in the pval type field. This + type can be any of the following: + +

Table B-1. PHP Internal Types

IS_STRINGString
IS_DOUBLEDouble-precision floating point
IS_LONGLong integer
IS_ARRAYArray
IS_EMPTYNone
IS_USER_FUNCTION??
IS_INTERNAL_FUNCTION?? (if some of these cannot be passed to a function - delete)
IS_CLASS??
IS_OBJECT??

If you get an argument of one type and would like to use it as + another, or if you just want to force the argument to be of a + certain type, you can use one of the following conversion + functions: + +

convert_to_long(arg1);
+convert_to_double(arg1);
+convert_to_string(arg1); 
+convert_to_boolean_long(arg1); /* If the string is "" or "0" it becomes 0, 1 otherwise */
+convert_string_to_number(arg1);  /* Converts string to either LONG or DOUBLE depending on string */
+     

These function all do in-place conversion. They do not return anything.

The actual argument is stored in a union; the members are: +

  • IS_STRING: arg1->value.str.val

  • IS_LONG: arg1->value.lval

  • IS_DOUBLE: arg1->value.dval

Memory Management in Functions

Any memory needed by a function should be allocated with either + emalloc() or estrdup(). These are memory handling abstraction + functions that look and smell like the normal malloc() and + strdup() functions. Memory should be freed with efree().

There are two kinds of memory in this program: memory which is + returned to the parser in a variable, and memory which you need for + temporary storage in your internal function. When you assign a + string to a variable which is returned to the parser you need to + make sure you first allocate the memory with either emalloc() or + estrdup(). This memory should NEVER be freed by you, unless you + later in the same function overwrite your original assignment + (this kind of programming practice is not good though).

For any temporary/permanent memory you need in your + functions/library you should use the three emalloc(), estrdup(), + and efree() functions. They behave EXACTLY like their counterpart + functions. Anything you emalloc() or estrdup() you have to efree() + at some point or another, unless it's supposed to stick around + until the end of the program; otherwise, there will be a memory + leak. The meaning of "the functions behave exactly like their + counterparts" is: if you efree() something which was not + emalloc()'ed nor estrdup()'ed you might get a segmentation + fault. So please take care and free all of your wasted memory.

If you compile with "-DDEBUG", PHP 3 will print out a list of all + memory that was allocated using emalloc() and estrdup() but never + freed with efree() when it is done running the specified script.

Setting Variables in the Symbol Table

A number of macros are available which make it easier to set a + variable in the symbol table: + +

  • SET_VAR_STRING(name,value) [1]

  • SET_VAR_DOUBLE(name,value)

  • SET_VAR_LONG(name,value)

[1]

Symbol tables in PHP 3.0 are implemented as hash tables. At any + given time, &symbol_table is a pointer to the 'main' symbol + table, and active_symbol_table points to the currently active + symbol table (these may be identical like in startup, or + different, if you're inside a function).

The following examples use 'active_symbol_table'. You should + replace it with &symbol_table if you specifically want to work + with the 'main' symbol table. Also, the same functions may be + applied to arrays, as explained below.

Example B-3. Checking whether $foo exists in a symbol table


if (hash_exists(active_symbol_table,"foo",sizeof("foo"))) { exists... }
+else { doesn't exist }
+     
+ +

Example B-4. Finding a variable's size in a symbol table


hash_find(active_symbol_table,"foo",sizeof("foo"),&pvalue);
+check(pvalue.type);
+     
+ + Arrays in PHP 3.0 are implemented using the same hashtables as + symbol tables. This means the two above functions can also be + used to check variables inside arrays.

If you want to define a new array in a symbol table, you should do + the following.

First, you may want to check whether it exists and abort + appropiately, using hash_exists() or hash_find().

Next, initialize the array:

Example B-5. Initializing a new array


pval arr;
+  
+if (array_init(&arr) == FAILURE) { failed... };
+hash_update(active_symbol_table,"foo",sizeof("foo"),&arr,sizeof(pval),NULL);
+     
+ + This code declares a new array, named $foo, in the active symbol + table. This array is empty.

Here's how to add new entries to it:

Example B-6. Adding entries to a new array


pval entry;
+  
+entry.type = IS_LONG;
+entry.value.lval = 5;
+  
+/* defines $foo["bar"] = 5 */
+hash_update(arr.value.ht,"bar",sizeof("bar"),&entry,sizeof(pval),NULL); 
+
+/* defines $foo[7] = 5 */
+hash_index_update(arr.value.ht,7,&entry,sizeof(pval),NULL); 
+
+/* defines the next free place in $foo[],
+ * $foo[8], to be 5 (works like php2)
+ */
+hash_next_index_insert(arr.value.ht,&entry,sizeof(pval),NULL); 
+     
+ + If you'd like to modify a value that you inserted to a hash, you + must first retrieve it from the hash. To prevent that overhead, + you can supply a pval ** to the hash add function, and it'll be + updated with the pval * address of the inserted element inside the + hash. If that value is NULL (like in all of the above examples) - + that parameter is ignored.

hash_next_index_insert() uses more or less the same logic as + "$foo[] = bar;" in PHP 2.0.

If you are building an array to return from a function, you can + initialize the array just like above by doing:


if (array_init(return_value) == FAILURE) { failed...; }
+   

...and then adding values with the helper functions:


add_next_index_long(return_value,long_value);
+add_next_index_double(return_value,double_value);
+add_next_index_string(return_value,estrdup(string_value));
+   

Of course, if the adding isn't done right after the array + initialization, you'd probably have to look for the array first: + +

pval *arr;
+  
+if (hash_find(active_symbol_table,"foo",sizeof("foo"),(void **)&arr)==FAILURE) { can't find... }
+else { use arr->value.ht... }
+    

Note that hash_find receives a pointer to a pval pointer, and not + a pval pointer.

Just about any hash function returns SUCCESS or FAILURE (except + for hash_exists(), which returns a boolean truth value).

Returning simple values

A number of macros are available to make returning values from a + function easier.

The RETURN_* macros all set the return value and return from the + function: +

  • RETURN

  • RETURN_FALSE

  • RETURN_TRUE

  • RETURN_LONG(l)

  • RETURN_STRING(s,dup) If dup is true, duplicates the string

  • RETURN_STRINGL(s,l,dup) Return string (s) specifying length (l).

  • RETURN_DOUBLE(d)

The RETVAL_* macros set the return value, but do not return. +

  • RETVAL_FALSE

  • RETVAL_TRUE

  • RETVAL_LONG(l)

  • RETVAL_STRING(s,dup) If dup is true, duplicates the string

  • RETVAL_STRINGL(s,l,dup) Return string (s) specifying length (l).

  • RETVAL_DOUBLE(d)

The string macros above will all estrdup() the passed 's' + argument, so you can safely free the argument after calling the + macro, or alternatively use statically allocated memory.

If your function returns boolean success/error responses, always + use RETURN_TRUE and RETURN_FALSE respectively.

Returning complex values

Your function can also return a complex data type such as an + object or an array.

Returning an object: + +

  1. Call object_init(return_value).

  2. Fill it up with values. The functions available + for this purpose are listed below.

  3. Possibly, register functions for this object. + In order to obtain values from the object, the function would + have to fetch "this" from the active_symbol_table. Its type + should be IS_OBJECT, and it's basically a regular hash table + (i.e., you can use regular hash functions on .value.ht). The + actual registration of the function can be done using: +
    
add_method( return_value, function_name, function_ptr );
    +       

The functions used to populate an object are: +

  • add_property_long( return_value, + property_name, l ) - Add a property named 'property_name', of + type long, equal to 'l'

  • add_property_double( return_value, + property_name, d ) - Same, only adds a double

  • add_property_string( return_value, + property_name, str ) - Same, only adds a string

  • add_property_stringl( return_value, + property_name, str, l ) - Same, only adds a string of length 'l'

Returning an array: + +

  1. Call array_init(return_value).

  2. Fill it up with values. The functions available + for this purpose are listed below.

The functions used to populate an array are: +

  • add_assoc_long(return_value,key,l) - add + associative entry with key 'key' and long value 'l'

  • add_assoc_double(return_value,key,d)

  • add_assoc_string(return_value,key,str,duplicate)

  • add_assoc_stringl(return_value,key,str,length,duplicate) + specify the string length

  • add_index_long(return_value,index,l) - add + entry in index 'index' with long value 'l'

  • add_index_double(return_value,index,d)

  • add_index_string(return_value,index,str)

  • add_index_stringl(return_value,index,str,length) + - specify the string length

  • add_next_index_long(return_value,l) - add an + array entry in the next free offset with long value 'l'

  • add_next_index_double(return_value,d)

  • add_next_index_string(return_value,str)

  • add_next_index_stringl(return_value,str,length) + - specify the string length

Using the resource list

PHP 3.0 has a standard way of dealing with various types of + resources. This replaces all of the local linked lists in PHP 2.0.

Available functions: + +

  • php3_list_insert(ptr, type) - returns the 'id' + of the newly inserted resource

  • php3_list_delete(id) - delete the resource + with the specified id

  • php3_list_find(id,*type) + - returns the pointer of the resource with the specified id, + updates 'type' to the resource's type

+ + Typically, these functions are used for SQL drivers but they can + be used for anything else; for instance, maintaining file + descriptors.

Typical list code would look like this:

Example B-7. Adding a new resource


RESOURCE *resource;
+
+/* ...allocate memory for resource and acquire resource... */
+/* add a new resource to the list */
+return_value->value.lval = php3_list_insert((void *) resource, LE_RESOURCE_TYPE);
+return_value->type = IS_LONG;
+     
+ +

Example B-8. Using an existing resource


pval *resource_id;
+RESOURCE *resource;
+int type;
+
+convert_to_long(resource_id);
+resource = php3_list_find(resource_id->value.lval, &type);
+if (type != LE_RESOURCE_TYPE) {
+	php3_error(E_WARNING,"resource index %d has the wrong type",resource_id->value.lval);
+	RETURN_FALSE;
+}
+/* ...use resource... */
+     
+ +

Example B-9. Deleting an existing resource


pval *resource_id;
+RESOURCE *resource;
+int type;
+
+convert_to_long(resource_id);
+php3_list_delete(resource_id->value.lval);
+     
+ + The resource types should be registered in php3_list.h, in enum + list_entry_type. In addition, one should add shutdown code for + any new resource type defined, in list.c's list_entry_destructor() + (even if you don't have anything to do on shutdown, you must add + an empty case).

Using the persistent resource table

PHP 3.0 has a standard way of storing persistent resources (i.e., + resources that are kept in between hits). The first module to use + this feature was the MySQL module, and mSQL followed it, so one + can get the general impression of how a persistent resource should + be used by reading mysql.c. The functions you should look at are: + +

php3_mysql_do_connect
php3_mysql_connect()
php3_mysql_pconnect()

The general idea of persistence modules is this: +

  1. Code all of your module to work with the + regular resource list mentioned in section (9).

  2. Code extra connect functions that check if the + resource already exists in the persistent resource list. If it + does, register it as in the regular resource list as a pointer to + the persistent resource list (because of 1., the rest of the code + should work immediately). If it doesn't, then create it, add it + to the persistent resource list AND add a pointer to it from the + regular resource list, so all of the code would work since it's + in the regular resource list, but on the next connect, the + resource would be found in the persistent resource list and be + used without having to recreate it. You should register these + resources with a different type (e.g. LE_MYSQL_LINK for + non-persistent link and LE_MYSQL_PLINK for a persistent link).

If you read mysql.c, you'll notice that except for the more + complex connect function, nothing in the rest of the module has to + be changed.

The very same interface exists for the regular resource list and + the persistent resource list, only 'list' is replaced with + 'plist':

  • php3_plist_insert(ptr, type) - returns the 'id' + of the newly inserted resource

  • php3_plist_delete(id) - delete the resource + with the specified id

  • php3_plist_find(id,*type) + - returns the pointer of the resource with the specified id, + updates 'type' to the resource's type

However, it's more than likely that these functions would prove to + be useless for you when trying to implement a persistent module. + Typically, one would want to use the fact that the persistent + resource list is really a hash table. For instance, in the + MySQL/mSQL modules, when there's a pconnect() call (persistent + connect), the function builds a string out of the host/user/passwd + that were passed to the function, and hashes the SQL link with + this string as a key. The next time someone calls a pconnect() + with the same host/user/passwd, the same key would be generated, + and the function would find the SQL link in the persistent list.

Until further documented, you should look at mysql.c or msql.c to + see how one should use the plist's hash table abilities.

One important thing to note: resources going into the persistent + resource list must *NOT* be allocated with PHP's memory manager, + i.e., they should NOT be created with emalloc(), estrdup(), etc. + Rather, one should use the regular malloc(), strdup(), etc. The + reason for this is simple - at the end of the request (end of the + hit), every memory chunk that was allocated using PHP's memory + manager is deleted. Since the persistent list isn't supposed to + be erased at the end of a request, one mustn't use PHP's memory + manager for allocating resources that go to it.

When you register a resource that's going to be in the persistent + list, you should add destructors to it both in the non-persistent + list and in the persistent list. The destructor in the + non-persistent list destructor shouldn't do anything. The one in + the persistent list destructor should properly free any resources + obtained by that type (e.g. memory, SQL links, etc). Just like + with the non-persistent resources, you *MUST* add destructors for + every resource, even it requires no destructotion and the + destructor would be empty. Remember, since emalloc() and friends + aren't to be used in conjunction with the persistent list, you + mustn't use efree() here either.

Adding runtime configuration directives

Many of the features of PHP 3 can be configured at runtime. These + configuration directives can appear in either the designated + php3.ini file, or in the case of the Apache module version in the + Apache .conf files. The advantage of having them in the Apache + .conf files is that they can be configured on a per-directory + basis. This means that one directory may have a certain + safemodeexecdir for example, while another directory may have + another. This configuration granularity is especially handy when + a server supports multiple virtual hosts.

The steps required to add a new directive: + +

  1. Add directive to php3_ini_structure struct in mod_php3.h.

  2. In main.c, edit the php3_module_startup + function and add the appropriate cfg_get_string() or + cfg_get_long() call.

  3. Add the directive, restrictions and a comment + to the php3_commands structure in mod_php3.c. Note the + restrictions part. RSRC_CONF are directives that can only be + present in the actual Apache .conf files. Any OR_OPTIONS + directives can be present anywhere, include normal .htaccess + files.

  4. In either php3take1handler() or + php3flaghandler() add the appropriate entry for your directive.

  5. In the configuration section of the + _php3_info() function in functions/info.c you need to add your + new directive.

  6. And last, you of course have to use your new + directive somewhere. It will be addressable as + php3_ini.directive.

Notes

[1]

Be careful here. The value part must be malloc'ed manually because + the memory management code will try to free this pointer later. Do + not pass statically allocated memory into a SET_VAR_STRING.


PrevHomeNext
Other incompatibilitiesUpCalling User Functions
\ No newline at end of file diff --git a/preface.html b/preface.html new file mode 100644 index 0000000..cc333f5 --- /dev/null +++ b/preface.html @@ -0,0 +1,237 @@ +Preface
PHP Manual
PrevNext

Preface

Table of Contents
About this Manual

PHP, which stands for "PHP: Hypertext + Preprocessor", is an HTML-embedded scripting language. Much + of its syntax is borrowed from C, Java and Perl with a couple of + unique PHP-specific features thrown in. The goal of the language + is to allow web developers to write dynamically generated pages + quickly. +

About this Manual

This manual is written in XML using the DocBook XML DTD, using DSSSL (Document + Style and Semantics Specification Language) for formatting. The + tools used for formatting HTML, + TeX and RTF versions are + Jade, written by James Clark and The Modular DocBook Stylesheets + written by Norman Walsh. + PHP's documentation framework is maintained by Stig Sæther Bakken. +

Daily HTML snapshots of the manual, including translations, can be + found at http://snaps.php.net/manual/. +


PrevHomeNext
PHP Manual Getting Started
\ No newline at end of file diff --git a/r5601.html b/r5601.html new file mode 100644 index 0000000..486b960 --- /dev/null +++ b/r5601.html @@ -0,0 +1,166 @@ +
PHP Manual
PrevNext

(unknown)

 -- 

()


PrevHomeNext
CCVS API FunctionsUpCOM support functions for Windows
\ No newline at end of file diff --git a/r5607.html b/r5607.html new file mode 100644 index 0000000..386d829 --- /dev/null +++ b/r5607.html @@ -0,0 +1,166 @@ +
PHP Manual
PrevNext

(unknown)

 -- 

()


PrevHomeNext
CCVS API FunctionsUpCOM support functions for Windows
\ No newline at end of file diff --git a/r5686.html b/r5686.html new file mode 100644 index 0000000..3e7fbc3 --- /dev/null +++ b/r5686.html @@ -0,0 +1,166 @@ +
PHP Manual
PrevNext

(unknown)

 -- 

()


PrevHomeNext
CCVS API FunctionsUpCOM support functions for Windows
\ No newline at end of file diff --git a/r5819.html b/r5819.html new file mode 100644 index 0000000..ec4c207 --- /dev/null +++ b/r5819.html @@ -0,0 +1,166 @@ +
PHP Manual
PrevNext

(unknown)

 -- 

()


PrevHomeNext
CCVS API FunctionsUpCOM support functions for Windows
\ No newline at end of file diff --git a/r6529.html b/r6529.html new file mode 100644 index 0000000..fb217fa --- /dev/null +++ b/r6529.html @@ -0,0 +1,169 @@ +
PHP Manual
PrevNext

(unknown)

 -- 

()


PrevHomeNext
CCVS API FunctionsUpCOM support functions for Windows
\ No newline at end of file diff --git a/r6628.html b/r6628.html new file mode 100644 index 0000000..0bab02c --- /dev/null +++ b/r6628.html @@ -0,0 +1,394 @@ +Database (dbm-style) abstraction layer functions
PHP Manual
PrevNext

IX. Database (dbm-style) abstraction layer functions

These functions build the foundation for accessing Berkeley DB style + databases.

This is a general abstraction layer for several file-based databases. As + such, functionality is limited to a subset of features modern databases + such as Sleepycat Software's DB2 + support. (This is not to be confused with IBM's DB2 software, which is + supported through the ODBC functions.)

The behaviour of various aspects depend on the implementation of the + underlying database. Functions such as dba_optimize() + and dba_sync() will do what they promise for one + database and will do nothing for others.

The following handlers are supported: + +

  • dbm is the oldest (original) type of Berkeley DB style databases. You + should avoid it, if possible. We do not support the compatibility + functions built into DB2 and gdbm, because they are only compatible on + the source code level, but cannot handle the original dbm format.

  • ndbm is a newer type and more flexible than dbm. It still has most of the + arbitrary limits of dbm (therefore it is deprecated).

  • gdbm is the GNU database manager.

  • db2 is Sleepycat Software's DB2. It + is described as "a programmatic toolkit that provides high-performance + built-in database support for both standalone and client/server + applications."

  • cdb is "a fast, reliable, lightweight package for creating and reading + constant databases." It is from the author of qmail and can be found + here. Since it is constant, we support + only reading operations.

Example 1. DBA example

<?php
+
+$id = dba_open("/tmp/test.db", "n", "db2");
+
+if(!$id) {
+    echo "dba_open failed\n";
+    exit;
+}
+
+dba_replace("key", "This is an example!", $id);
+
+if(dba_exists("key", $id)) {
+    echo dba_fetch("key", $id);
+    dba_delete("key", $id);
+}
+
+dba_close($id);
+?>

DBA is binary safe and does not have any arbitrary limits. It inherits all + limits set by the underlying database implementation.

All file-based databases must provide a way of setting the file mode of a + new created database, if that is possible at all. The file mode is commonly + passed as the fourth argument to dba_open() or + dba_popen().

You can access all entries of a database in a linear way by using the + dba_firstkey() and dba_nextkey() + functions. You may not change the database while traversing it.

Example 2. Traversing a database

<?php
+
+# ...open database...
+
+$key = dba_firstkey($id);
+
+while($key != false) {
+    if(...) { # remember the key to perform some action later
+        $handle_later[] = $key;
+    }
+    $key = dba_nextkey($id);
+}
+
+for($i = 0; $i < count($handle_later); $i++)
+    dba_delete($handle_later[$i], $id);
+
+?>
+	 
+

Table of Contents
dba_close — Close database
dba_delete — Delete entry specified by key
dba_exists — Check whether key exists
dba_fetch — Fetch data specified by key
dba_firstkey — Fetch first key
dba_insert — Insert entry
dba_nextkey — Fetch next key
dba_popen — Open database persistently
dba_open — Open database
dba_optimize — Optimize database
dba_replace — Replace or insert entry
dba_sync — Synchronize database

PrevHomeNext
readgzfileUpdba_close
\ No newline at end of file diff --git a/r6669.html b/r6669.html new file mode 100644 index 0000000..2091d29 --- /dev/null +++ b/r6669.html @@ -0,0 +1,192 @@ +dba_close
PHP Manual
PrevNext

dba_close

dba_close -- Close database

Description

void dba_close(int handle);

dba_close() closes the established database and frees + all resources specified by handle.

handle is a database handle returned by + dba_open().

dba_close() does not return any value.

See also: + dba_open() + dba_popen() +


PrevHomeNext
Database (dbm-style) abstraction layer functionsUpdba_delete
\ No newline at end of file diff --git a/r6691.html b/r6691.html new file mode 100644 index 0000000..25d84e4 --- /dev/null +++ b/r6691.html @@ -0,0 +1,214 @@ +dba_delete
PHP Manual
PrevNext

dba_delete

dba_delete -- Delete entry specified by key

Description

string dba_delete(string key, int handle);

dba_delete() deletes the entry specified by + key from the database specified with + handle.

key is the key of the entry which is deleted.

handle is a database handle returned by + dba_open().

dba_delete() returns true or false, if the entry is + deleted or not deleted, respectively.

See also: + dba_exists() + dba_fetch() + dba_insert() + dba_replace() +


PrevHomeNext
dba_closeUpdba_exists
\ No newline at end of file diff --git a/r6720.html b/r6720.html new file mode 100644 index 0000000..2f9755f --- /dev/null +++ b/r6720.html @@ -0,0 +1,214 @@ +dba_exists
PHP Manual
PrevNext

dba_exists

dba_exists -- Check whether key exists

Description

bool dba_exists(string key, int handle);

dba_exists() checks whether the specified + key exists in the database specified by + handle.

key is the key the check is performed for.

handle is a database handle returned by + dba_open().

dba_exists() returns true or false, if the key is found + or not found, respectively.

See also: + dba_fetch() + dba_delete() + dba_insert() + dba_replace() +


PrevHomeNext
dba_deleteUpdba_fetch
\ No newline at end of file diff --git a/r6749.html b/r6749.html new file mode 100644 index 0000000..774c7a5 --- /dev/null +++ b/r6749.html @@ -0,0 +1,214 @@ +dba_fetch
PHP Manual
PrevNext

dba_fetch

dba_fetch -- Fetch data specified by key

Description

string dba_fetch(string key, int handle);

dba_fetch() fetches the data specified by + key from the database specified with + handle.

key is the key the data is specified by.

handle is a database handle returned by + dba_open().

dba_fetch() returns the associated string or false, if + the key/data pair is found or not found, respectively.

See also: + dba_exists() + dba_delete() + dba_insert() + dba_replace() +


PrevHomeNext
dba_existsUpdba_firstkey
\ No newline at end of file diff --git a/r6778.html b/r6778.html new file mode 100644 index 0000000..c870a3b --- /dev/null +++ b/r6778.html @@ -0,0 +1,190 @@ +dba_firstkey
PHP Manual
PrevNext

dba_firstkey

dba_firstkey -- Fetch first key

Description

string dba_firstkey(int handle);

dba_firstkey() returns the first key of the database + specified by handle and resets the internal key + pointer. This permits a linear search through the whole database.

handle is a database handle returned by + dba_open().

dba_firstkey() returns the key or false depending on + whether it succeeds or fails, respectively.

See also: + dba_nextkey() +


PrevHomeNext
dba_fetchUpdba_insert
\ No newline at end of file diff --git a/r6799.html b/r6799.html new file mode 100644 index 0000000..5042265 --- /dev/null +++ b/r6799.html @@ -0,0 +1,232 @@ +dba_insert
PHP Manual
PrevNext

dba_insert

dba_insert -- Insert entry

Description

bool dba_insert(string key, string value, int handle);

dba_insert() inserts the entry described with + key and value into the + database specified by handle. It fails, if an entry + with the same key already exists.

key is the key of the entry to be inserted.

value is the value to be inserted.

handle is a database handle returned by + dba_open().

dba_insert() returns true or false, depending on + whether it succeeds of fails, respectively.

See also: + dba_exists() + dba_delete() + dba_fetch() + dba_replace() +


PrevHomeNext
dba_firstkeyUpdba_nextkey
\ No newline at end of file diff --git a/r6834.html b/r6834.html new file mode 100644 index 0000000..de5b78f --- /dev/null +++ b/r6834.html @@ -0,0 +1,190 @@ +dba_nextkey
PHP Manual
PrevNext

dba_nextkey

dba_nextkey -- Fetch next key

Description

string dba_nextkey(int handle);

dba_nextkey() returns the next key of the database + specified by handle and increments the internal + key pointer.

handle is a database handle returned by + dba_open().

dba_nextkey() returns the key or false depending on + whether it succeeds or fails, respectively.

See also: + dba_firstkey() +


PrevHomeNext
dba_insertUpdba_popen
\ No newline at end of file diff --git a/r6855.html b/r6855.html new file mode 100644 index 0000000..ab6d3de --- /dev/null +++ b/r6855.html @@ -0,0 +1,231 @@ +dba_popen
PHP Manual
PrevNext

dba_popen

dba_popen -- Open database persistently

Description

int dba_popen(string path, string mode, string handler, [...]);

dba_popen() establishes a persistent database instance + for path with mode using + handler.

path is commonly a regular path in your filesystem.

mode is "r" for read access, "w" for read/write + access to an already existing database, "c" for read/write access + and database creation if it doesn't currently exist, and "n" for + create, truncate and read/write access.

handler is the name of the handler which shall be + used for accessing path. It is passed all optional + parameters given to dba_popen() and can act on behalf + of them.

dba_popen() returns a positive handler id or false, in + the case the open is successful or fails, respectively.

See also: + dba_open() + dba_close() +


PrevHomeNext
dba_nextkeyUpdba_open
\ No newline at end of file diff --git a/r6891.html b/r6891.html new file mode 100644 index 0000000..3a5d441 --- /dev/null +++ b/r6891.html @@ -0,0 +1,231 @@ +dba_open
PHP Manual
PrevNext

dba_open

dba_open -- Open database

Description

int dba_open(string path, string mode, string handler, [...]);

dba_open() establishes a database instance for + path with mode using + handler.

path is commonly a regular path in your filesystem.

mode is "r" for read access, "w" for read/write + access to an already existing database, "c" for read/write access + and database creation if it doesn't currently exist, and "n" for + create, truncate and read/write access.

handler is the name of the handler which shall be + used for accessing path. It is passed all optional + parameters given to dba_open() and can act on behalf of + them.

dba_open() returns a positive handler id or false, in + the case the open is successful or fails, respectively.

See also: + dba_popen() + dba_close() +


PrevHomeNext
dba_popenUpdba_optimize
\ No newline at end of file diff --git a/r6927.html b/r6927.html new file mode 100644 index 0000000..841cd03 --- /dev/null +++ b/r6927.html @@ -0,0 +1,189 @@ +dba_optimize
PHP Manual
PrevNext

dba_optimize

dba_optimize -- Optimize database

Description

bool dba_optimize(int handle);

dba_optimize() optimizes the underlying database + specified by handle.

handle is a database handle returned by + dba_open().

dba_optimize() returns true or false, if the + optimization succeeds or fails, respectively.

See also: + dba_sync() +


PrevHomeNext
dba_openUpdba_replace
\ No newline at end of file diff --git a/r6948.html b/r6948.html new file mode 100644 index 0000000..5c968f0 --- /dev/null +++ b/r6948.html @@ -0,0 +1,226 @@ +dba_replace
PHP Manual
PrevNext

dba_replace

dba_replace -- Replace or insert entry

Description

bool dba_replace(string key, string value, int handle);

dba_replace() replaces or inserts the entry described + with key and value into the + database specified by handle.

key is the key of the entry to be inserted.

value is the value to be inserted.

handle is a database handle returned by + dba_open().

dba_replace() returns true or false, depending on + whether it succeeds of fails, respectively.

See also: + dba_exists() + dba_delete() + dba_fetch() + dba_insert() +


PrevHomeNext
dba_optimizeUpdba_sync
\ No newline at end of file diff --git a/r6982.html b/r6982.html new file mode 100644 index 0000000..b46627b --- /dev/null +++ b/r6982.html @@ -0,0 +1,190 @@ +dba_sync
PHP Manual
PrevNext

dba_sync

dba_sync -- Synchronize database

Description

bool dba_sync(int handle);

dba_sync() synchronizes the database specified by + handle. This will probably trigger a physical write + to disk, if supported.

handle is a database handle returned by + dba_open().

dba_sync() returns true or false, if the + synchronization succeeds or fails, respectively.

See also: + dba_optimize() +


PrevHomeNext
dba_replaceUpDate and Time functions
\ No newline at end of file diff --git a/ref.adabas.html b/ref.adabas.html new file mode 100644 index 0000000..85dd4e9 --- /dev/null +++ b/ref.adabas.html @@ -0,0 +1,238 @@ +Adabas D functions
PHP Manual
PrevNext

I. Adabas D functions

The Adabas D functions are deprecated, you probably want to use the + Unified ODBC functions instead.

Table of Contents
ada_afetch — fetch a result row into an array
ada_autocommit — toggle autocommit behaviour
ada_close — close a connection to an Adabas D server
ada_commit — commit a transaction
ada_connect — connect to an Adabas D datasource
ada_exec — prepare and execute a SQL statement
ada_fetchrow — fetch a row from a result
ada_fieldname — get the columnname
ada_fieldnum — get column number
ada_fieldtype — get the datatype of a field
ada_freeresult — >free resources associated with a result
ada_numfields — get the number of columns in a result
ada_numrows — number of rows in a result
ada_result — get data from results
ada_resultall — print result as HTML table
ada_rollback — rollback a transaction

PrevHomeNext
Function ReferenceUpada_afetch
\ No newline at end of file diff --git a/ref.apache.html b/ref.apache.html new file mode 100644 index 0000000..a66e06e --- /dev/null +++ b/ref.apache.html @@ -0,0 +1,172 @@ +Apache-specific Functions
PHP Manual
PrevNext

I. Apache-specific Functions

Table of Contents
apache_lookup_uri — + Perform a partial request for the specified URI and return all + info about it +
apache_note — Get and set apache request notes
getallheaders — Fetch all HTTP request headers
virtual — Perform an Apache sub-request

PrevHomeNext
Function ReferenceUpapache_lookup_uri
\ No newline at end of file diff --git a/ref.array.html b/ref.array.html new file mode 100644 index 0000000..abac12f --- /dev/null +++ b/ref.array.html @@ -0,0 +1,454 @@ +Array Functions
PHP Manual
PrevNext

II. Array Functions

These functions allow you to interact with and manipulate + arrays in various ways. Arrays are essential for storing, + managing, and operating on sets of variables. +

Simple and multi-dimensional arrays are supported, and may be + either user created or created by another function. + There are specific database handling functions for populating + arrays from database queries, and several functions return arrays. +

Table of Contents
array — + Create an array +
array_count_values — Counts all the values of an array
array_diff — Computes the difference of arrays
array_flip — Flip all the values of an array
array_intersect — Computes the intersection of arrays
array_keys — Return all the keys of an array
array_merge — Merge two or more arrays
array_merge_recursive — Merge two or more arrays recursively
array_multisort — Sort multiple or multi-dimensional arrays
array_pad — + Pad array to the specified length with a value +
array_pop — Pop the element off the end of array
array_push — + Push one or more elements onto the end of array +
array_rand — + Pick one or more random entries out of an array +
array_reverse — + Return an array with elements in reverse order +
array_shift — + Pop an element off the beginning of array +
array_slice — Extract a slice of the array
array_splice — + Remove a portion of the array and replace it with something + else +
array_unique — Removes duplicate values from an array
array_unshift — + Push one or more elements onto the beginning of array +
array_values — Return all the values of an array
array_walk — + Apply a user function to every member of an array +
arsort — + Sort an array in reverse order and maintain index association +
asort — Sort an array and maintain index association
compact — + Create array containing variables and their values +
count — Count elements in a variable
current — Return the current element in an array
each — + Return the next key and value pair from an array +
end — + Set the internal pointer of an array to its last element +
extract — + Import variables into the symbol table from an array +
in_array — Return true if a value exists in an array
key — Fetch a key from an associative array
krsort — Sort an array by key in reverse order
ksort — Sort an array by key
list — + Assign variables as if they were an array +
natsort — + Sort an array using a "natural order" algorithm +
natcasesort — + Sort an array using a case insensitive "natural order" algorithm +
next — + Advance the internal array pointer of an array +
pos — Get the current element from an array
prev — Rewind the internal array pointer
range — + Create an array containing a range of integers +
reset — + Set the internal pointer of an array to its first element +
rsort — Sort an array in reverse order
shuffle — Shuffle an array
sizeof — Get the number of elements in an array
sort — Sort an array
uasort — + Sort an array with a user-defined comparison function and + maintain index association +
uksort — + Sort an array by keys using a user-defined comparison function +
usort — + Sort an array by values using a user-defined comparison function +

PrevHomeNext
virtualUparray
\ No newline at end of file diff --git a/ref.aspell.html b/ref.aspell.html new file mode 100644 index 0000000..b09d708 --- /dev/null +++ b/ref.aspell.html @@ -0,0 +1,210 @@ +Aspell functions
PHP Manual
PrevNext

III. Aspell functions

The aspell() functions allows you to check the + spelling on a word and offer suggestions. +

Note: + aspell works only with very old (up to .27.* or so) versions of + aspell library. Neither this module, nor those versions of aspell + library are supported any longer. If you want to use + spell-checking capabilities in php, use pspell instead. It uses pspell + library and works with newer versions of aspell. +

You need the aspell library, available from: http://aspell.sourceforge.net/. +

Table of Contents
aspell_new — Load a new dictionary
aspell_check — Check a word
aspell_check_raw — + Check a word without changing its case or trying to trim it +
aspell_suggest — Suggest spellings of a word

PrevHomeNext
usortUpaspell_new
\ No newline at end of file diff --git a/ref.bc.html b/ref.bc.html new file mode 100644 index 0000000..45d4f45 --- /dev/null +++ b/ref.bc.html @@ -0,0 +1,241 @@ +BCMath Arbitrary Precision Mathematics Functions
PHP Manual
PrevNext

IV. BCMath Arbitrary Precision Mathematics Functions

These functions are only available if PHP was configured with + --enable-bcmath. +

Note: + Due to changes in the licensing, the BCMATH library is distributed + separate from the standard PHP source distribution. + You can download the tar-gzipped archive at the url: + http://www.php.net/extra/number4.tar.gz. Read the + file README.BCMATH in the PHP distribution + for more information. +

Table of Contents
bcadd — Add two arbitrary precision numbers
bccomp — Compare two arbitrary precision numbers
bcdiv — Divide two arbitrary precision numbers
bcmod — + Get modulus of an arbitrary precision number +
bcmul — Multiply two arbitrary precision number
bcpow — + Raise an arbitrary precision number to another +
bcscale — + Set default scale parameter for all bc math functions +
bcsqrt — + Get the square root of an arbitray precision number +
bcsub — + Subtract one arbitrary precision number from another +

PrevHomeNext
aspell_suggestUpbcadd
\ No newline at end of file diff --git a/ref.calendar.html b/ref.calendar.html new file mode 100644 index 0000000..4533af0 --- /dev/null +++ b/ref.calendar.html @@ -0,0 +1,267 @@ +Calendar functions
PHP Manual
PrevNext

V. Calendar functions

The calendar functions are only available if you have compiled + the calendar extension, found in either the "dl" or "ext" + subdirectories of your PHP source code. + Please see the README file before using it. +

The calendar extension presents a series of functions to simplify + converting between different calendar formats. The intermediary + or standard it is based on is the Julian Day Count. The Julian + Day Count is a count of days starting way earlier than any date + most people would need to track (somewhere around 4000bc). To + convert between calendar systems, you must first convert to Julian + Day Count, then to the calendar system of your choice. Julian Day + Count is very different from the Julian Calendar! For more + information on calendar systems visit http://genealogy.org/~scottlee/cal-overview.html. Excerpts from this + page are included in these instructions, and are in quotes. +

Table of Contents
JDToGregorian — Converts Julian Day Count to Gregorian date
GregorianToJD — + Converts a Gregorian date to Julian Day Count +
JDToJulian — + Converts a Julian Day Count to a Julian Calendar Date +
JulianToJD — + Converts a Julian Calendar date to Julian Day Count +
JDToJewish — + Converts a Julian Day Count to the Jewish Calendar +
JewishToJD — + Converts a date in the Jewish Calendar to Julian Day Count +
JDToFrench — + Converts a Julian Day Count to the French Republican Calendar +
FrenchToJD — + Converts a date from the French Republican Calendar to a Julian + Day Count +
JDMonthName — Returns a month name
JDDayOfWeek — Returns the day of the week
easter_date — + Get UNIX timestamp for midnight on Easter of a given year +
easter_days — + Get number of days after March 21 on which Easter falls for a + given year +
unixtojd — Convert UNIX timestamp to Julian Day
jdtounix — Convert Julian Day to UNIX timestamp

PrevHomeNext
bcsubUpJDToGregorian
\ No newline at end of file diff --git a/ref.ccvs.html b/ref.ccvs.html new file mode 100644 index 0000000..bd530cc --- /dev/null +++ b/ref.ccvs.html @@ -0,0 +1,214 @@ +CCVS API Functions
PHP Manual
PrevNext

VI. CCVS API Functions

These functions interface the CCVS API, allowing you to directly + work with CCVS from your PHP scripts. CCVS is RedHat's solution to the "middle-man" + in credit card processing. It lets you directly address the + credit card clearing houses via your *nix box and a modem. Using + the CCVS module for PHP, you can process credit cards directly + through CCVS via your PHP Scripts. The following references will + outline the process. +

To enable CCVS Support in PHP, first verify your CCVS installation + directory. You will then need to configure PHP with the --with-ccvs option. If you use this + option without specifying the path to your CCVS installation, PHP + Will attempt to look in the default CCVS Install location + (/usr/local/ccvs). If CCVS is in a non-standard location, run + configure with: --with-ccvs=$ccvs_path, where $ccvs_path + is the path to your CCVS installation. Please note that CCVS + support requires that $ccvs_path/lib and $ccvs_path/include exist, + and include cv_api.h under the include directory and libccvs.a + under the lib directory. +

Additionally, a ccvsd process will need to be running for the + configurations you intend to use in your PHP scripts. You will + also need to make sure the PHP Processes are running under the + same user as your CCVS was installed as (e.g. if you installed + CCVS as user 'ccvs', your PHP processes must run as 'ccvs' as + well.) +

Additional information about CCVS can be found at http://www.redhat.com/products/ccvs. +

This documentation section is being worked on. Until then, RedHat + maintains slightly outdated but still useful documentation at + http://www.redhat.com/products/ccvs/support/CCVS3.3docs/ProgPHP.html. +

Table of Contents

PrevHomeNext
jdtounixUp
\ No newline at end of file diff --git a/ref.classobj.html b/ref.classobj.html new file mode 100644 index 0000000..19ec928 --- /dev/null +++ b/ref.classobj.html @@ -0,0 +1,476 @@ +Class/Object Functions
PHP Manual
PrevNext

VIII. Class/Object Functions

Introduction

About

These functions allow you to obtain information about classes + and instance objects. You can obtain the name of the class to + which a object belongs, as well as its member properties and + methods. Using these functions, you can find out not only the + class membership of an object, but also its parentage (i.e. + what class is the object class extending). +

An example of use

In this example, we first define a base class and an extension + of the class. The base class describes a general vegetable, + whether it is edible or not and what is its color. The subclass + Spinach adds a method to cook it and another to + find out if it is cooked. +

Example 1. classes.inc


<?php
+
+// base class with member properties and methods
+class Vegetable {
+
+    var $edible;
+    var $color;
+
+    function Vegetable( $edible, $color="green" ) {
+        $this->edible = $edible;
+        $this->color = $color;
+    }
+
+    function is_edible() {
+        return $this->edible;
+    }
+
+    function what_color() {
+        return $this->color;
+    }
+    
+} // end of class Vegetable
+
+
+// extends the base class
+class Spinach extends Vegetable {
+
+    var $cooked = false;
+
+    function Spinach() {
+        $this->Vegetable( true, "green" );
+    }
+
+    function cook_it() {
+        $this->cooked = true;
+    }
+
+    function is_cooked() {
+        return $this->cooked;
+    }
+    
+} // end of class Spinach
+
+?>
+       
+

We then instantiate 2 objects from these classes and print out + information about them, including their class parentage. + We also define some utility functions, mainly to have a nice printout + of the variables. +

Example 2. test_script.php


<pre>
+<?php
+
+include "classes.inc";
+
+// utility functions
+
+function print_vars($obj) {
+    $arr = get_object_vars($obj);
+    while (list($prop, $val) = each($arr))
+        echo "\t$prop = $val\n";
+}
+
+function print_methods($obj) {
+    $arr = get_class_methods(get_class($obj));
+    foreach ($arr as $method)
+        echo "\tfunction $method()\n";
+}
+
+function class_parentage($obj, $class) {
+    global $$obj;
+    if (is_subclass_of($$obj, $class)) {
+        echo "Object $obj belongs to class ".get_class($$obj);
+        echo " a subclass of $class\n";
+    } else {
+        echo "Object $obj does not belong to a subclass of $class\n";
+    }
+}
+
+// instantiate 2 objects
+
+$veggie = new Vegetable(true,"blue");
+$leafy = new Spinach();
+
+// print out information about objects
+echo "veggie: CLASS ".get_class($veggie)."\n";
+echo "leafy: CLASS ".get_class($leafy);
+echo ", PARENT ".get_parent_class($leafy)."\n";
+
+// show veggie properties
+echo "\nveggie: Properties\n";
+print_vars($veggie);
+
+// and leafy methods
+echo "\nleafy: Methods\n";
+print_methods($leafy);
+
+echo "\nParentage:\n";
+class_parentage("leafy", "Spinach");
+class_parentage("leafy", "Vegetable");
+?>
+</pre>
+       
+

One important thing to note in the example above is that + the object $leafy is an instance of the class + Spinach which is a subclass of + Vegetable, + therefore the last part of the script above will output: +


       [...]
+Parentage:
+Object leafy does not belong to a subclass of Spinach
+Object leafy belongs to class spinach a subclass of Vegetable
+       

+

Table of Contents
call_user_method — + Call a user method on an specific object +
class_exists — Checks if the class has been defined
get_class — Returns the name of the class of an object
get_class_methods — Returns an array of class methods' names
get_class_vars — + Returns an array of default properties of the class +
get_declared_classes — Returns an array with the name of the defined classes
get_object_vars — Returns an associative array of object properties
get_parent_class — Returns the name of the parent class of an object
is_subclass_of — + Determines if an object belongs to a subclass + of the specified class +
method_exists — Checks if the class method exists

PrevHomeNext
com_setUpcall_user_method
\ No newline at end of file diff --git a/ref.com.html b/ref.com.html new file mode 100644 index 0000000..4ec3452 --- /dev/null +++ b/ref.com.html @@ -0,0 +1,207 @@ +COM support functions for Windows
PHP Manual
PrevNext

VII. COM support functions for Windows

These functions are only available on the Windows version of + PHP. These functions have been added in PHP 4. +

Table of Contents
com_load — + Creates a new reference to a COM component +
com_invoke — + Calls a COM component's method. +
com_propget — + Gets the value of a COM Component's property +
com_get — + Gets the value of a COM Component's property +
com_propput — + Assigns a value to a COM component's property +
com_propset — + Assigns a value to a COM component's property +
com_set — + Assigns a value to a COM component's property +

PrevHomeNext
Upcom_load
\ No newline at end of file diff --git a/ref.cpdf.html b/ref.cpdf.html new file mode 100644 index 0000000..89365d7 --- /dev/null +++ b/ref.cpdf.html @@ -0,0 +1,761 @@ +ClibPDF functions
PHP Manual
PrevNext

IX. ClibPDF functions

ClibPDF lets you create PDF documents with PHP. It is available at + FastIO but it isn't free + software. You should definitely read the licence before you start + playing with ClibPDF. If you cannot fullfil the licence agreement + consider using pdflib by Thomas Merz, which is also very powerful. + ClibPDF functionality and API is similar to Thomas Merz's pdflib but, + according to FastIO, ClibPDF is faster and creates smaller documents. + This may have changed with the new version 2.0 of pdflib. A simple + benchmark (the pdfclock.c example from pdflib 2.0 turned into a php + script) actually shows no difference in speed at all. The file size + is also similar if compression is turned off. So, try them both + and see which one does the job for you. +

This documentation should be read alongside the ClibPDF manual since it + explains the library in much greater detail. +

Many functions in the native ClibPDF and the PHP module, as + well as in pdflib, have the same name. All functions except for + cpdf_open() take the handle for the document as + their first parameter. +

Currently this handle is not used internally since ClibPDF does + not support the creation of several PDF documents at the same time. + Actually, you should not even try it, the results are unpredictable. I + can't oversee what the consequences in a multi threaded environment + are. According to the author of ClibPDF this will change in one of + the next releases (current version when this was written is 1.10). + If you need this functionality use the pdflib module. +

Note: + The function cpdf_set_font() has changed since PHP 3 + to support asian fonts. The encoding parameter is no longer an integer + but a string. +

One big advantage of ClibPDF over pdflib used to be the possibility + to create + the pdf document completely in memory without using temporary files. + It also provides the ability to pass coordinates in a predefined + unit length. This is a handy feature but can be simulated with + pdf_translate(). +

Another nice feature of ClibPDF is the fact that any page can be modified + at any time even if a new page has been already opened. The function + cpdf_set_current_page() allows to leave the current + page and presume modifying an other page. +

Most of the functions are fairly easy to use. The most difficult part + is probably creating a very simple PDF document at all. The following + example should help you to get started. It creates a document + with one page. The page contains the text "Times-Roman" in an + outlined 30pt font. The text is underlined. +

Example 1. Simple ClibPDF Example


<?php
+$cpdf = cpdf_open(0);
+cpdf_page_init($cpdf, 1, 0, 595, 842);
+cpdf_add_outline($cpdf, 0, 0, 0, 1, "Page 1");
+cpdf_begin_text($cpdf);
+cpdf_set_font($cpdf, "Times-Roman", 30, "WinAnsiEncoding");
+cpdf_set_text_rendering($cpdf, 1);
+cpdf_text($cpdf, "Times Roman outlined", 50, 750);
+cpdf_end_text($cpdf);	
+cpdf_moveto($cpdf, 50, 740);
+cpdf_lineto($cpdf, 330, 740);
+cpdf_stroke($cpdf);
+cpdf_finalize($cpdf);
+Header("Content-type: application/pdf");
+cpdf_output_buffer($cpdf);
+cpdf_close($cpdf);
+?>
+    

The pdflib distribution contains a more complex example which creates a + series of pages with an analog clock. Here is that example converted + into PHP using the ClibPDF extension: +

Example 2. pdfclock example from pdflib 2.0 distribution


<?php
+$radius = 200;
+$margin = 20;
+$pagecount = 40;
+
+$pdf = cpdf_open(0);
+cpdf_set_creator($pdf, "pdf_clock.php3");
+cpdf_set_title($pdf, "Analog Clock");
+  
+while($pagecount-- > 0) {
+  cpdf_page_init($pdf, $pagecount+1, 0, 2 * ($radius + $margin), 2 * ($radius + $margin), 1.0);
+  
+  cpdf_set_page_animation($pdf, 4, 0.5, 0, 0, 0);  /* wipe */
+  
+  cpdf_translate($pdf, $radius + $margin, $radius + $margin);
+  cpdf_save($pdf);
+  cpdf_setrgbcolor($pdf, 0.0, 0.0, 1.0);
+  
+  /* minute strokes */
+  cpdf_setlinewidth($pdf, 2.0);
+  for ($alpha = 0; $alpha < 360; $alpha += 6)
+    {
+    cpdf_rotate($pdf, 6.0);
+    cpdf_moveto($pdf, $radius, 0.0);
+    cpdf_lineto($pdf, $radius-$margin/3, 0.0);
+    cpdf_stroke($pdf);
+    }
+  
+  cpdf_restore($pdf);
+  cpdf_save($pdf);
+ 
+  /* 5 minute strokes */
+  cpdf_setlinewidth($pdf, 3.0);
+  for ($alpha = 0; $alpha < 360; $alpha += 30)
+  {
+    cpdf_rotate($pdf, 30.0);
+    cpdf_moveto($pdf, $radius, 0.0);
+    cpdf_lineto($pdf, $radius-$margin, 0.0);
+    cpdf_stroke($pdf);
+  }
+
+  $ltime = getdate();
+
+  /* draw hour hand */
+  cpdf_save($pdf);
+  cpdf_rotate($pdf, -(($ltime['minutes']/60.0) + $ltime['hours'] - 3.0) * 30.0);
+  cpdf_moveto($pdf, -$radius/10, -$radius/20);
+  cpdf_lineto($pdf, $radius/2, 0.0);
+  cpdf_lineto($pdf, -$radius/10, $radius/20);
+  cpdf_closepath($pdf);
+  cpdf_fill($pdf);
+  cpdf_restore($pdf);
+
+  /* draw minute hand */
+  cpdf_save($pdf);
+  cpdf_rotate($pdf, -(($ltime['seconds']/60.0) + $ltime['minutes'] - 15.0) * 6.0);
+  cpdf_moveto($pdf, -$radius/10, -$radius/20);
+  cpdf_lineto($pdf, $radius * 0.8, 0.0);
+  cpdf_lineto($pdf, -$radius/10, $radius/20);
+  cpdf_closepath($pdf);
+  cpdf_fill($pdf);
+  cpdf_restore($pdf);
+
+  /* draw second hand */
+  cpdf_setrgbcolor($pdf, 1.0, 0.0, 0.0);
+  cpdf_setlinewidth($pdf, 2);
+  cpdf_save($pdf);
+  cpdf_rotate($pdf, -(($ltime['seconds'] - 15.0) * 6.0));
+  cpdf_moveto($pdf, -$radius/5, 0.0);
+  cpdf_lineto($pdf, $radius, 0.0);
+  cpdf_stroke($pdf);
+  cpdf_restore($pdf);
+
+  /* draw little circle at center */
+  cpdf_circle($pdf, 0, 0, $radius/30);
+  cpdf_fill($pdf);
+
+  cpdf_restore($pdf);
+
+  cpdf_finalize_page($pdf, $pagecount+1);
+}
+
+cpdf_finalize($pdf);
+Header("Content-type: application/pdf");
+cpdf_output_buffer($pdf);
+cpdf_close($pdf);
+?>
+    
Table of Contents
cpdf_global_set_document_limits — Sets document limits for any pdf document
cpdf_set_creator — Sets the creator field in the pdf document
cpdf_set_title — Sets the title field of the pdf document
cpdf_set_subject — Sets the subject field of the pdf document
cpdf_set_keywords — Sets the keywords field of the pdf document
cpdf_open — Opens a new pdf document
cpdf_close — Closes the pdf document
cpdf_page_init — Starts new page
cpdf_finalize_page — Ends page
cpdf_finalize — Ends document
cpdf_output_buffer — Outputs the pdf document in memory buffer
cpdf_save_to_file — Writes the pdf document into a file
cpdf_set_current_page — Sets current page
cpdf_begin_text — Starts text section
cpdf_end_text — Ends text section
cpdf_show — Output text at current position
cpdf_show_xy — Output text at position
cpdf_text — Output text with parameters
cpdf_set_font — Select the current font face and size
cpdf_set_leading — Sets distance between text lines
cpdf_set_text_rendering — Determines how text is rendered
cpdf_set_horiz_scaling — Sets horizontal scaling of text
cpdf_set_text_rise — Sets the text rise
cpdf_set_text_matrix — Sets the text matrix
cpdf_set_text_pos — Sets text position
cpdf_set_char_spacing — Sets character spacing
cpdf_set_word_spacing — Sets spacing between words
cpdf_continue_text — Output text in next line
cpdf_stringwidth — Returns width of text in current font
cpdf_save — Saves current enviroment
cpdf_restore — Restores formerly saved enviroment
cpdf_translate — Sets origin of coordinate system
cpdf_scale — Sets scaling
cpdf_rotate — Sets rotation
cpdf_setflat — Sets flatness
cpdf_setlinejoin — Sets linejoin parameter
cpdf_setlinecap — Sets linecap parameter
cpdf_setmiterlimit — Sets miter limit
cpdf_setlinewidth — Sets line width
cpdf_setdash — Sets dash pattern
cpdf_newpath — Starts a new path
cpdf_moveto — Sets current point
cpdf_rmoveto — Sets current point
cpdf_curveto — Draws a curve
cpdf_lineto — Draws a line
cpdf_rlineto — Draws a line
cpdf_circle — Draw a circle
cpdf_arc — Draws an arc
cpdf_rect — Draw a rectangle
cpdf_closepath — Close path
cpdf_stroke — Draw line along path
cpdf_closepath_stroke — Close path and draw line along path
cpdf_fill — Fill current path
cpdf_fill_stroke — Fill and stroke current path
cpdf_closepath_fill_stroke — Close, fill and stroke current path
cpdf_clip — Clips to current path
cpdf_setgray_fill — Sets filling color to gray value
cpdf_setgray_stroke — Sets drawing color to gray value
cpdf_setgray — Sets drawing and filling color to gray value
cpdf_setrgbcolor_fill — Sets filling color to rgb color value
cpdf_setrgbcolor_stroke — Sets drawing color to rgb color value
cpdf_setrgbcolor — Sets drawing and filling color to rgb color value
cpdf_add_outline — Adds bookmark for current page
cpdf_set_page_animation — Sets duration between pages
cpdf_import_jpeg — Opens a JPEG image
cpdf_place_inline_image — Places an image on the page
cpdf_add_annotation — Adds annotation

PrevHomeNext
method_existsUpcpdf_global_set_document_limits
\ No newline at end of file diff --git a/ref.curl.html b/ref.curl.html new file mode 100644 index 0000000..e6fec4f --- /dev/null +++ b/ref.curl.html @@ -0,0 +1,287 @@ +CURL, Client URL Library Functions
PHP Manual
PrevNext

X. CURL, Client URL Library Functions

PHP supports libcurl, a library, created by Daniel Stenberg, that + allows you to connect and communicate to many different types of + servers with many different types of protocols. libcurl currently + supports the http, https, ftp, gopher, telnet, dict, file, and + ldap protocols. libcurl also supports HTTPS certificates, HTTP + POST, HTTP PUT, FTP uploading (this can also be done with PHP's + ftp extension), HTTP form based upload, proxies, cookies and + user+password authentication. +

In order to use the CURL functions you need to install the CURL package. PHP requires that you use + CURL 7.0.2-beta or higher. PHP will not work with any version of + CURL below version 7.0.2-beta. +

To use PHP's CURL support you must also compile PHP --with-curl[=DIR] where DIR is the + location of the directory containing the lib and include + directories. In the "include" directory there should be a folder + named "curl" which should contain the easy.h and curl.h files. + There should be a file named "libcurl.a" located in the "lib" + directory. +

These functions have been added in PHP 4.0.2. +

Once you've compiled PHP with CURL support, you can begin using + the curl functions. The basic idea behind the CURL functions is + that you initialize a CURL session using the + curl_init(), then you can set all your + options for the transfer via the curl_exec() + and then you finish off your session using the + curl_close(). Here is an example that uses + the CURL functions to fetch the PHP homepage into a file: +

Example 1. Using PHP's CURL module to fetch the PHP homepage


<?php
+
+$ch = curl_init ("http://www.php.net/");
+$fp = fopen ("php_homepage.txt", "w");
+
+curl_setopt ($ch, CURLOPT_INFILE, $fp);
+curl_setopt ($ch, CURLOPT_HEADER, 0);
+
+curl_exec ($ch);
+curl_close ($ch);
+fclose ($fp);
+?>
+     
+

Table of Contents
curl_init — Initialize a CURL session
curl_setopt — Set an option for a CURL transfer
curl_exec — Perform a CURL session
curl_close — Close a CURL session
curl_version — Return the current CURL version

PrevHomeNext
cpdf_add_annotationUpcurl_init
\ No newline at end of file diff --git a/ref.cybercash.html b/ref.cybercash.html new file mode 100644 index 0000000..9bd2760 --- /dev/null +++ b/ref.cybercash.html @@ -0,0 +1,183 @@ +Cybercash payment functions
PHP Manual
PrevNext

XI. Cybercash payment functions

These functions are only available if the interpreter has been + compiled with the --with-cybercash=[DIR]. These functions + have been added in PHP 4. +

Table of Contents
cybercash_encr — ???
cybercash_decr — ???
cybercash_base64_encode — ???
cybercash_base64_decode

PrevHomeNext
curl_versionUpcybercash_encr
\ No newline at end of file diff --git a/ref.datetime.html b/ref.datetime.html new file mode 100644 index 0000000..db7ff56 --- /dev/null +++ b/ref.datetime.html @@ -0,0 +1,222 @@ +Date and Time functions
PHP Manual
PrevNext

XIII. Date and Time functions

Table of Contents
checkdate — Validate a gregorian date/time
date — Format a local time/date
getdate — Get date/time information
gettimeofday — Get current time
gmdate — Format a GMT/CUT date/time
gmmktime — Get UNIX timestamp for a GMT date
gmstrftime — + Format a GMT/CUT time/date according to locale settings +
localtime — Get the local time
microtime — + Return current UNIX timestamp with microseconds
mktime — Get UNIX timestamp for a date
strftime — + Format a local time/date according to locale settings +
time — Return current UNIX timestamp
strtotime — + Parse about any english textual datetime description into a UNIX + timestamp +

PrevHomeNext
dba_syncUpcheckdate
\ No newline at end of file diff --git a/ref.dba.html b/ref.dba.html new file mode 100644 index 0000000..14ee2b2 --- /dev/null +++ b/ref.dba.html @@ -0,0 +1,466 @@ +Database (dbm-style) abstraction layer functions
PHP Manual
PrevNext

XII. Database (dbm-style) abstraction layer functions

These functions build the foundation for accessing Berkeley DB + style databases. +

This is a general abstraction layer for several file-based databases. As + such, functionality is limited to a subset of features modern databases + such as Sleepycat Software's DB2 + support. (This is not to be confused with IBM's DB2 software, which is + supported through the ODBC functions.) +

The behaviour of various aspects depend on the implementation of the + underlying database. Functions such as dba_optimize() + and dba_sync() will do what they promise for one + database and will do nothing for others. +

To add support for any of the following handlers, add the + specified --with configure switch to your PHP configure line: +

  • Dbm is the oldest (original) type of Berkeley DB style + databases. You should avoid it, if possible. We do not support + the compatibility functions built into DB2 and gdbm, because + they are only compatible on the source code level, but cannot + handle the original dbm format. (--with-dbm) +

  • Ndbm is a newer type and more flexible than dbm. It still has + most of the arbitrary limits of dbm (therefore it is + deprecated). (--with-ndbm) +

  • Gdbm is the GNU database + manager. (--with-gdbm) +

  • DB2 is Sleepycat Software's + DB2. It is described as "a programmatic toolkit that + provides high-performance built-in database support for both + standalone and client/server applications." (--with-db2) +

  • DB3 is Sleepycat Software's + DB3. (--with-db3) +

  • Cdb is "a fast, reliable, lightweight package for creating and + reading constant databases." It is from the author of qmail and + can be found here. Since it is + constant, we support only reading operations. (--with-cdb) +

+

Example 1. DBA example


<?php
+
+$id = dba_open ("/tmp/test.db", "n", "db2");
+
+if (!$id) {
+    echo "dba_open failed\n";
+    exit;
+}
+
+dba_replace ("key", "This is an example!", $id);
+
+if (dba_exists ("key", $id)) {
+    echo dba_fetch ("key", $id);
+    dba_delete ("key", $id);
+}
+
+dba_close ($id);
+?>
+     
+

DBA is binary safe and does not have any arbitrary limits. It inherits all + limits set by the underlying database implementation. +

All file-based databases must provide a way of setting the file + mode of a new created database, if that is possible at all. The + file mode is commonly passed as the fourth argument to + dba_open() or dba_popen(). +

You can access all entries of a database in a linear way by using the + dba_firstkey() and dba_nextkey() + functions. You may not change the database while traversing it. +

Example 2. Traversing a database


<?php
+
+# ...open database...
+
+$key = dba_firstkey ($id);
+
+while ($key != false) {
+    if (...) { # remember the key to perform some action later
+        $handle_later[] = $key;
+    }
+    $key = dba_nextkey ($id);
+}
+
+for ($i = 0; $i < count($handle_later); $i++)
+    dba_delete ($handle_later[$i], $id);
+
+?>
+     
+

Table of Contents
dba_close — Close database
dba_delete — Delete entry specified by key
dba_exists — Check whether key exists
dba_fetch — Fetch data specified by key
dba_firstkey — Fetch first key
dba_insert — Insert entry
dba_nextkey — Fetch next key
dba_popen — Open database persistently
dba_open — Open database
dba_optimize — Optimize database
dba_replace — Replace or insert entry
dba_sync — Synchronize database

PrevHomeNext
cybercash_base64_decodeUpdba_close
\ No newline at end of file diff --git a/ref.dbase.html b/ref.dbase.html new file mode 100644 index 0000000..37d63e2 --- /dev/null +++ b/ref.dbase.html @@ -0,0 +1,246 @@ +dBase functions
PHP Manual
PrevNext

XIV. dBase functions

These functions allow you to access records stored in dBase-format + (dbf) databases. +

There is no support for indexes or memo fields. There is no + support for locking, too. Two concurrent webserver processes + modifying the same dBase file will very likely ruin your database. +

Unlike SQL databases, dBase "databases" cannot change the database + definition afterwards. Once the file is created, the database + definition is fixed. There are no indexes that speed searching or + otherwise organize your data. dBase files are simple sequential + files of fixed length records. Records are appended to the end of + the file and delete records are kept until you call + dbase_pack()(). +

We recommend that you do not use dBase files as your production + database. Choose any real SQL server instead; MySQL or Postgres + are common choices with PHP. dBase support is here to allow you to + import and export data to and from your web database, since the + file format is commonly understood with Windows spreadsheets and + organizers. Import and export of data is about all that dBase + support is good for. +

Table of Contents
dbase_create — Creates a dBase database
dbase_open — Opens a dBase database
dbase_close — Close a dBase database
dbase_pack — Packs a dBase database
dbase_add_record — Add a record to a dBase database
dbase_replace_record — Replace a record in a dBase database
dbase_delete_record — Deletes a record from a dBase database
dbase_get_record — Gets a record from a dBase database
dbase_get_record_with_names — + Gets a record from a dBase database as an associative array +
dbase_numfields — + Find out how many fields are in a dBase database +
dbase_numrecords — + Find out how many records are in a dBase database +

PrevHomeNext
strtotimeUpdbase_create
\ No newline at end of file diff --git a/ref.dbm.html b/ref.dbm.html new file mode 100644 index 0000000..5e2cfa6 --- /dev/null +++ b/ref.dbm.html @@ -0,0 +1,272 @@ +DBM Functions
PHP Manual
PrevNext

XV. DBM Functions

These functions allow you to store records stored in a dbm-style + database. This type of database (supported by the Berkeley DB, + GDBM, and some system libraries, as well as a built-in flatfile + library) stores key/value pairs (as opposed to the full-blown + records supported by relational databases). +

Example 1. DBM example


$dbm = dbmopen ("lastseen", "w");
+if (dbmexists ($dbm, $userid)) {
+    $last_seen = dbmfetch ($dbm, $userid);
+} else {
+    dbminsert ($dbm, $userid, time());
+}
+do_stuff();
+dbmreplace ($dbm, $userid, time());
+dbmclose ($dbm);
+     
+

Table of Contents
dbmopen — Opens a DBM database
dbmclose — Closes a dbm database
dbmexists — + Tells if a value exists for a key in a DBM database +
dbmfetch — + Fetches a value for a key from a DBM database +
dbminsert — + Inserts a value for a key in a DBM database +
dbmreplace — + Replaces the value for a key in a DBM database +
dbmdelete — + Deletes the value for a key from a DBM database +
dbmfirstkey — + Retrieves the first key from a DBM database +
dbmnextkey — + Retrieves the next key from a DBM database
dblist — + Describes the DBM-compatible library being used +

PrevHomeNext
dbase_numrecordsUpdbmopen
\ No newline at end of file diff --git a/ref.dir.html b/ref.dir.html new file mode 100644 index 0000000..10f51da --- /dev/null +++ b/ref.dir.html @@ -0,0 +1,184 @@ +Directory functions
PHP Manual
PrevNext

XVI. Directory functions

Table of Contents
chdir — change directory
dir — directory class
closedir — close directory handle
getcwd — gets the current working directory
opendir — open directory handle
readdir — read entry from directory handle
rewinddir — rewind directory handle

PrevHomeNext
dblistUpchdir
\ No newline at end of file diff --git a/ref.dl.html b/ref.dl.html new file mode 100644 index 0000000..3a73d9e --- /dev/null +++ b/ref.dl.html @@ -0,0 +1,154 @@ +Dynamic Loading functions
PHP Manual
PrevNext

XVII. Dynamic Loading functions

Table of Contents
dl — load a PHP extension at runtime

PrevHomeNext
rewinddirUpdl
\ No newline at end of file diff --git a/ref.domxml.html b/ref.domxml.html new file mode 100644 index 0000000..006789c --- /dev/null +++ b/ref.domxml.html @@ -0,0 +1,417 @@ +DOM XML functions
PHP Manual
PrevNext

XVII. DOM XML functions

These functions are only available if PHP was configured with + --with-dom=[DIR], using the + GNOME xml library. You will need at least libxml-2.0.0 (the beta + version will not work). These functions have been added in PHP 4. +

This module defines the following constants: +

Table 1. XML constants

ConstantValueDescription
XML_ELEMENT_NODE1 
XML_ATTRIBUTE_NODE2 
XML_TEXT_NODE3 
XML_CDATA_SECTION_NODE4 
XML_ENTITY_REF_NODE5 
XML_ENTITY_NODE6 
XML_PI_NODE7 
XML_COMMENT_NODE8 
XML_DOCUMENT_NODE9 
XML_DOCUMENT_TYPE_NODE10 
XML_DOCUMENT_FRAG_NODE11 
XML_NOTATION_NODE12 
XML_GLOBAL_NAMESPACE1 
XML_LOCAL_NAMESPACE2 

This module defines a number of classes. The DOM XML functions + return a parsed tree of the XML document with each node being an + object belonging to one of these classes. +

Table of Contents
xmldoc — Creates a DOM object of an XML document
xmldocfile — Creates a DOM object from XML file
xmltree — + Creates a tree of php objects from XML document +

PrevHomeNext
rewinddirUpxmldoc
\ No newline at end of file diff --git a/ref.errorfunc.html b/ref.errorfunc.html new file mode 100644 index 0000000..a59e1ac --- /dev/null +++ b/ref.errorfunc.html @@ -0,0 +1,212 @@ +Error Handling and Logging Functions
PHP Manual
PrevNext

XVIII. Error Handling and Logging Functions

These are functions dealing with error handling and logging. They + allow you to define your own error handling rules, as well as modify + the way the errors can be logged. This allows you to change and + enhance error reporting to suit your needs. +

+ With the logging functions, you can send messages directly to other + machines, to an email (or email to pager gateway!), to system logs, + etc., so you can selectively log and monitor the most important parts + of your applications and websites. +

+ The error reporting functions allow you to customize what level and + kind of error feedback is given, ranging from simple notices to customized + functions returned during errors. +

Table of Contents
error_log — send an error message somewhere
error_reporting — set which PHP errors are reported
restore_error_handler — + Restores the previous error handler function +
set_error_handler — + Sets a user-defined error handler function. +
trigger_error — + Generates a user-level error/warning/notice message +
user_error — + Generates a user-level error/warning/notice message +

PrevHomeNext
xmltreeUperror_log
\ No newline at end of file diff --git a/ref.exec.html b/ref.exec.html new file mode 100644 index 0000000..d95b634 --- /dev/null +++ b/ref.exec.html @@ -0,0 +1,176 @@ +Program Execution functions
PHP Manual
PrevNext

LII. Program Execution functions

Table of Contents
escapeshellarg — escape a string to be used as a shell argument
escapeshellcmd — escape shell metacharacters
exec — Execute an external program
passthru — + Execute an external program and display raw output +
system — Execute an external program and display output

PrevHomeNext
pg_untraceUpescapeshellarg
\ No newline at end of file diff --git a/ref.fdf.html b/ref.fdf.html new file mode 100644 index 0000000..c135ea7 --- /dev/null +++ b/ref.fdf.html @@ -0,0 +1,424 @@ +Forms Data Format functions
PHP Manual
PrevNext

XXI. Forms Data Format functions

Forms Data Format (FDF) is a format for handling + forms within PDF documents. You should read the documentation at + http://partners.adobe.com/asn/developer/acrosdk/forms.html + for more information on what FDF is and how it is used in general. +

Note: + If you run into problems configuring php with fdftk support, check + whether the header file FdfTk.h and the library libFdfTk.so are at + the right place. They should be in fdftk-dir/include and + fdftk-dir/lib. This will not be the case if you just unpack + the FdfTk distribution. +

The general idea of FDF is similar to HTML forms. The diffence is + basically the format how data is transmitted to the server when the submit + button is pressed (this is actually the Form Data Format) and the format + of the form itself (which is the Portable Document Format, PDF). + Processing the FDF data is one of the features provided by the fdf + functions. But there is more. One may as well take an existing PDF form + and populated the input fields with data without modifying the form + itself. In such a case one would create a FDF document + (fdf_create()) set the values of each input field + (fdf_set_value()) and associate it with a PDF form + (fdf_set_file()). Finally it has to be sent to the + browser with MimeType application/vnd.fdf. The Acrobat + reader plugin of your browser recognizes the MimeType, reads the + associated PDF form and fills in the data from the FDF document. +

If you look at an FDF-document with a text editor you will find a + catalogue object with the name FDF. Such an object may + contain a number of entries like Fields, + F, Status etc.. + The most commonly used entries are Fields whicht points + to a list of input fields, and F which contains the + filename of the PDF-document this data belongs to. Those entries are + referred to in the FDF documention as /F-Key or /Status-Key. + Modifying this entries + is done by functions like fdf_set_file() and + fdf_set_status(). Fields are modified with + fdf_set_value(), fdf_set_opt() etc.. +

The following examples shows just the evaluation of form data.

Example 1. Evaluating a FDF document


<?php
+// Save the FDF data into a temp file
+$fdffp = fopen("test.fdf", "w");
+fwrite($fdffp, $HTTP_FDF_DATA, strlen($HTTP_FDF_DATA));
+fclose($fdffp);
+
+// Open temp file and evaluate data
+// The pdf form contained several input text fields with the names
+// volume, date, comment, publisher, preparer, and two checkboxes
+// show_publisher and show_preparer.
+$fdf = fdf_open("test.fdf");
+$volume = fdf_get_value($fdf, "volume");
+echo "The volume field has the value '<B>$volume</B>'<BR>";
+
+$date = fdf_get_value($fdf, "date");
+echo "The date field has the value '<B>$date</B>'<BR>";
+
+$comment = fdf_get_value($fdf, "comment");
+echo "The comment field has the value '<B>$comment</B>'<BR>";
+
+if(fdf_get_value($fdf, "show_publisher") == "On") {
+  $publisher = fdf_get_value($fdf, "publisher");
+  echo "The publisher field has the value '<B>$publisher</B>'<BR>";
+} else
+  echo "Publisher shall not be shown.<BR>";
+
+if(fdf_get_value($fdf, "show_preparer") == "On") {
+  $preparer = fdf_get_value($fdf, "preparer");
+  echo "The preparer field has the value '<B>$preparer</B>'<BR>";
+} else
+  echo "Preparer shall not be shown.<BR>";
+fdf_close($fdf);
+?>
+     
Table of Contents
fdf_open — Open a FDF document
fdf_close — Close an FDF document
fdf_create — Create a new FDF document
fdf_save — Save a FDF document
fdf_get_value — Get the value of a field
fdf_set_value — Set the value of a field
fdf_next_field_name — Get the next field name
fdf_set_ap — Set the appearance of a field
fdf_set_status — Set the value of the /STATUS key
fdf_get_status — Get the value of the /STATUS key
fdf_set_file — Set the value of the /F key
fdf_get_file — Get the value of the /F key
fdf_set_flags — Sets a flag of a field
fdf_set_opt — Sets an option of a field
fdf_set_submit_form_action — Sets an javascript action of a field
fdf_set_javascript_action — Sets an javascript action of a field

PrevHomeNext
unlinkUpfdf_open
\ No newline at end of file diff --git a/ref.filepro.html b/ref.filepro.html new file mode 100644 index 0000000..e4b5ab9 --- /dev/null +++ b/ref.filepro.html @@ -0,0 +1,199 @@ +filePro functions
PHP Manual
PrevNext

XIX. filePro functions

These functions allow read-only access to data stored in filePro databases.

filePro is a registered trademark of Fiserv, Inc. You can find more + information about filePro at http://www.fileproplus.com/.

Table of Contents
filepro — read and verify the map file
filepro_fieldname — gets the name of a field
filepro_fieldtype — gets the type of a field
filepro_fieldwidth — gets the width of a field
filepro_retrieve — retrieves data from a filePro database
filepro_fieldcount — find out how many fields are in a filePro database
filepro_rowcount — find out how many rows are in a filePro database

PrevHomeNext
user_errorUpfilepro
\ No newline at end of file diff --git a/ref.filesystem.html b/ref.filesystem.html new file mode 100644 index 0000000..9409391 --- /dev/null +++ b/ref.filesystem.html @@ -0,0 +1,496 @@ +Filesystem functions
PHP Manual
PrevNext

XX. Filesystem functions

Table of Contents
basename — + Returns filename component of path +
chgrp — Changes file group
chmod — Changes file mode
chown — Changes file owner
clearstatcache — Clears file stat cache
copy — Copies file
delete — A dummy manual entry
dirname — Returns directory name component of path
diskfreespace — Returns available space in directory
fclose — Closes an open file pointer
feof — Tests for end-of-file on a file pointer
fgetc — Gets character from file pointer
fgetcsv — + Gets line from file pointer and parse for CSV fields +
fgets — Gets line from file pointer
fgetss — + Gets line from file pointer and strip HTML tags +
file — Reads entire file into an array
file_exists — Checks whether a file exists
fileatime — Gets last access time of file
filectime — Gets inode change time of file
filegroup — Gets file group
fileinode — Gets file inode
filemtime — Gets file modification time
fileowner — Gets file owner
fileperms — Gets file permissions
filesize — Gets file size
filetype — Gets file type
flock — Portable advisory file locking
fopen — Opens file or URL
fpassthru — + Output all remaining data on a file pointer +
fputs — Writes to a file pointer
fread — Binary-safe file read
fscanf — Parses input from a file according to a format
fseek — Seeks on a file pointer
fstat — + Gets information about a file using an open file pointer +
ftell — Tells file pointer read/write position
ftruncate — + Truncates a file to a given length. +
fwrite — Binary-safe file write
set_file_buffer — + Sets file buffering on the given file pointer +
is_dir — Tells whether the filename is a directory
is_executable — Tells whether the filename is executable
is_file — + Tells whether the filename is a regular file +
is_link — + Tells whether the filename is a symbolic link +
is_readable — + Tells whether the filename is readable +
is_writeable — Tells whether the filename is writeable
is_uploaded_file — Tells whether the file was uploaded via HTTP POST.
link — Create a hard link
linkinfo — Gets information about a link
mkdir — Makes directory
move_uploaded_file — Moves an uploaded file to a new location.
pclose — Closes process file pointer
popen — Opens process file pointer
readfile — Outputs a file
readlink — Returns the target of a symbolic link
rename — Renames a file
rewind — Rewind the position of a file pointer
rmdir — Removes directory
stat — Gives information about a file
lstat — + Gives information about a file or symbolic link +
realpath — Returns canonicalized absolute pathname
symlink — Creates a symbolic link
tempnam — Creates unique file name
tmpfile — Creates a temporary file
touch — Sets modification time of file
umask — Changes the current umask
unlink — Deletes a file

PrevHomeNext
filepro_rowcountUpbasename
\ No newline at end of file diff --git a/ref.ftp.html b/ref.ftp.html new file mode 100644 index 0000000..19e6614 --- /dev/null +++ b/ref.ftp.html @@ -0,0 +1,345 @@ +FTP functions
PHP Manual
PrevNext

XXII. FTP functions

FTP stands for File Transfer Protocol.

The following constants are defined when using the FTP module: + FTP_ASCII and FTP_BINARY. +

Example 1. ftp() example


<?php
+// set up basic connection
+$conn_id = ftp_connect("$ftp_server"); 
+
+// login with username and password
+$login_result = ftp_login($conn_id, "$ftp_user_name", "$ftp_user_pass"); 
+
+// check connection
+if ((!$conn_id) || (!$login_result)) { 
+        echo "Ftp connection has failed!";
+        echo "Attempted to connect to $ftp_server for user $user"; 
+        die; 
+    } else {
+        echo "Connected to $ftp_server, for user $user";
+    }
+
+// upload the file
+$upload = ftp_put($conn_id, "$destination_file", "$source_file", FTP_BINARY); 
+
+// check upload status
+if (!$upload) { 
+        echo "Ftp upload has failed!";
+    } else {
+        echo "Uploaded $source_file to $ftp_server as $destination_file";
+    }
+
+// close the FTP stream 
+ftp_quit($conn_id); 
+?>
+     
+

Table of Contents
ftp_connect — Opens up an FTP connection
ftp_login — Logs in an FTP connection
ftp_pwd — Returns the current directory name
ftp_cdup — Changes to the parent directory
ftp_chdir — Changes directories on a FTP server
ftp_mkdir — Creates a directory
ftp_rmdir — Removes a directory
ftp_nlist — Returns a list of files in the given directory.
ftp_rawlist — + Returns a detailed list of files in the given directory. +
ftp_systype — + Returns the system type identifier of the remote FTP server. +
ftp_pasv — Turns passive mode on or off.
ftp_get — Downloads a file from the FTP server.
ftp_fget — Downloads a file from the FTP server and saves to an + open file.
ftp_put — Uploads a file to the FTP server.
ftp_fput — Uploads from an open file to the FTP server.
ftp_size — Returns the size of the given file.
ftp_mdtm — Returns the last modified time of the given file.
ftp_rename — Renames a file on the ftp server.
ftp_delete — Deletes a file on the ftp server.
ftp_site — Sends a SITE command to the server.
ftp_quit — Closes an FTP connection

PrevHomeNext
fdf_set_javascript_actionUpftp_connect
\ No newline at end of file diff --git a/ref.funchand.html b/ref.funchand.html new file mode 100644 index 0000000..e46b57f --- /dev/null +++ b/ref.funchand.html @@ -0,0 +1,204 @@ +Function Handling functions
PHP Manual
PrevNext

XXIII. Function Handling functions

These functions all handle various operations involved in working + with functions. +

Table of Contents
call_user_func — + Call a user function given by the first parameter +
create_function — Create an anonymous (lambda-style) function
func_get_arg — Return an item from the argument list
func_get_args — + Returns an array comprising a function's argument list +
func_num_args — + Returns the number of arguments passed to the function +
function_exists — + Return true if the given function has been defined +
register_shutdown_function — + Register a function for execution on shutdown +

PrevHomeNext
ftp_quitUpcall_user_func
\ No newline at end of file diff --git a/ref.gettext.html b/ref.gettext.html new file mode 100644 index 0000000..b12898a --- /dev/null +++ b/ref.gettext.html @@ -0,0 +1,186 @@ +GNU Gettext
PHP Manual
PrevNext

XXIV. GNU Gettext

The gettext functions implement a NLS (Native Language Support) + API which can be used to internationalize your PHP applications. + Please see the GNU gettext documentation for a thorough explanation + of these functions. +

Table of Contents
bindtextdomain — Sets the path for a domain
dcgettext — Overrides the domain for a single lookup
dgettext — Override the current domain
gettext — Lookup a message in the current domain
textdomain — Sets the default domain

PrevHomeNext
register_shutdown_functionUpbindtextdomain
\ No newline at end of file diff --git a/ref.http.html b/ref.http.html new file mode 100644 index 0000000..d432dd3 --- /dev/null +++ b/ref.http.html @@ -0,0 +1,174 @@ +HTTP functions
PHP Manual
PrevNext

XXV. HTTP functions

These functions let you manipulate the output sent back to the + remote browser right down to the HTTP protocol level. +

Table of Contents
header — Send a raw HTTP header
headers_sent — Returns true if headers have been sent
setcookie — Send a cookie

PrevHomeNext
textdomainUpheader
\ No newline at end of file diff --git a/ref.hyperwave.html b/ref.hyperwave.html new file mode 100644 index 0000000..814012b --- /dev/null +++ b/ref.hyperwave.html @@ -0,0 +1,942 @@ +Hyperwave functions
PHP Manual
PrevNext

XXVI. Hyperwave functions

Introduction

Hyperwave has been developed at IICM in Graz. It started with + the name Hyper-G and changed to Hyperwave when + it was commercialised (If I remember properly it was in 1996).

Hyperwave is not free software. The current version, 4.1, is + available at www.hyperwave.com. + A time limited version can be ordered for free (30 days).

Hyperwave is an information system similar to a database + (HIS, Hyperwave Information Server). Its focus + is the storage and management of documents. A document can be any + possible piece of data that may as well be stored in file. Each + document is accompanied by its object record. The object record + contains meta data for the document. The meta data is a list of + attributes which can be extended by the user. Certain attributes + are always set by the Hyperwave server, other may be modified by + the user. An attribute is a name/value pair of the form name=value. + The complete object record contains as many of those pairs as the + user likes. The name of an attribute does not have to be unique, + e.g. a title may appear several times within an object record. + This makes sense if you want to specify a title in several languages. + In such a case there is a convention, that each title value is + preceded by the two letter language abbreviation followed by a colon, + e.g. 'en:Title in English' or 'ge:Titel in deutsch'. Other attributes + like a description or keywords are potential candidates. You may + also replace the language abbreviation by any other string as long + as it separated by colon from the rest of the attribute value.

Each object record has native a string representation with each + name/value + pair separated by a newline. The Hyperwave extension also knows + a second representation which is an associated array with the + attribute name being the key. Multilingual attribute values itself + form another associated array with the key being the language + abbreviation. Actually any multiple attribute forms an associated + array with the string left to the colon in the attribute value + being the key. (This is not fully implemented. Only the attributes + Title, Description and Keyword are treated properly yet.)

Besides the documents, all hyper links contained in a document + are stored as object records as well. Hyper links which + are in a document will be removed from it and stored as individual + objects, when the document is inserted into the database. + The object record of the link contains information + about where it starts and where it ends. + In order to gain the original document you will have + to retrieve the plain document without the links and the list + of links and reinsert them (The functions + hw_pipedocument() and hw_gettext() + do this for you. The advantage of separating links + from the document is obvious. Once a document to which a link + is pointing to changes its name, the link can easily be modified + accordingly. The document containing the link is not affected + at all. You may even add a link to a document without modifying + the document itself.

Saying that hw_pipedocument() and + hw_gettext() do the link insertion automatically + is not as simple as it sounds. Inserting links implies a certain + hierarchy of the documents. On a web server this is given by the + file system, but Hyperwave has its own hierarchy and names do not + reflect the position of an object in that hierarchy. Therefore + creation of links first of all requires a mapping from the Hyperwave + hierarchy and namespace into a web hierarchy respective web namespace. + The fundamental difference between Hyperwave and the web is the clear + distinction between names and hierarchy in Hyperwave. The name does + not contain any information about the objects position in the hierarchy. + In the web the + name also contains the information on where the object is located + in the hierarchy. This leads to two possibles ways of mapping. Either + the Hyperwave hierarchy and name of the Hyperwave object is reflected + in the URL or the name only. + To make things simple the second approach is used. + Hyperwave object with name 'my_object' is mapped to + 'http://host/my_object' disregarding where it resides in the + Hyperwave hierarchy. + An object with name 'parent/my_object' could be the child of + 'my_object' in the Hyperwave hierarchy, though in a web namespace it + appears to be just the opposite and the user might get confused. + This can only be prevented by selecting reasonable object names.

Having made this decision a second problem arises. How do you + involve PHP? The URL http://host/my_object will not call any + PHP script unless you tell your web server to rewrite it to + e.g. 'http://host/php3_script/my_object' and the script 'php3_script' + evaluates the $PATH_INFO variable and retrieves the object with + name 'my_object' from the Hyperwave server. Their is just one little + drawback which can be fixed easily. Rewriting any URL would not allow + any access to other document on the web server. A PHP script for + searching in the Hyperwave server would be impossible. Therefore + you will need at least a second rewriting rule to exclude certain + URLS like all e.g. starting with http://host/Hyperwave. This is + basically sharing of a namespace by the web and Hyperwave server.

Based on the above mechanism links are insert into documents.

It gets more complicated if PHP is not run as a server module or CGI + script but as a standalone application e.g. to dump the content of + the Hyperwave server on a CD-ROM. In such a case it makes sense to + retain the Hyperwave hierarchy and map in onto the file system. This + conflicts with the object names if they reflect its own hierarchy + (e.g. by choosing names including '/'). Therefore '/' has to be + replaced by another character, e.g. '_'. to be continued.

The network protocol to communicate + with the Hyperwave server is called HG-CSP + (Hyper-G Client/Server Protocol). It is based on messages to initiate + certain actions, e.g. get object record. In early versions of + the Hyperwave Server two native clients (Harmony, Amadeus) were + provided for communication with the server. Those two disappeared + when Hyperwave was commercialised. As a replacement a so called + wavemaster was provided. The wavemaster is like a protocol converter + from HTTP to HG-CSP. The idea is + to do all the administration of the database and visualisation of + documents by a web interface. The wavemaster implements a set of + placeholders for certain actions to customise the interface. This + set of placeholders is called the PLACE Language. + PLACE lacks a lot of features of a real programming + language and any extension to it only enlarges the list of + placeholders. This has led to the use of JavaScript which IMO does + not make life easier.

Adding Hyperwave support to PHP should fill in the gap of a + missing programming language for interface customisation. It + implements all the messages as defined by the + HG-CSP but also provides more powerful commands + to e.g. retrieve complete documents.

Hyperwave has its own terminology to name certain pieces of + information. This has widely been taken over and extended. + Almost all functions operate on one of the following data types. + +

  • object ID: An unique integer value for each object in the + Hyperwave server. It is also one of the attributes of the + object record (ObjectID). Object ids are often used as an + input parameter to specify an object. +

  • object record: A string with attribute-value pairs of the form + attribute=value. The pairs are separated by a carriage return + from each other. An object record can easily be converted into + an object array with hw_object2array(). + Several functions return object records. The names of those + functions end with obj. +

  • object array: An associated array with all attributes of an + object. The key is the attribute name. If an attribute occurs + more than once in an object record it will result in another + indexed or associated array. Attributes which are language + depended (like the title, keyword, description) will form an + associated array with the key set to the language + abbreviation. All other multiple attributes will form an + indexed array. PHP functions never return object arrays. +

  • hw_document: This is a complete new data type which holds the + actual document, e.g. HTML, PDF etc. It is somewhat optimised + for HTML documents but may be used for any format. +

Several functions which return an array of object records do also + return an associated array with statistical information about + them. The array is the last element of the object record + array. The statistical array contains the following entries: +

Hidden

Number of object records with attribute PresentationHints + set to Hidden.

CollectionHead

Number of object records with attribute + PresentationHints set to CollectionHead.

FullCollectionHead

Number of object records with attribute + PresentationHints set to FullCollectionHead.

CollectionHeadNr

Index in array of object records with + attribute PresentationHints set to CollectionHead.

FullCollectionHeadNr

Index in array of object records with + attribute PresentationHints set to FullCollectionHead.

Total

Total: Number of object records.

Integration with Apache

The Hyperwave extension is best used when PHP is compiled as an + Apache module. In such a case the underlying Hyperwave server can + be hidden from users almost completely if Apache uses its rewriting + engine. The following instructions will explain this.

Since PHP with Hyperwave support built into Apache is intended + to replace the native Hyperwave solution based on Wavemaster I + will assume that the Apache server will only serve as a Hyperwave + web interface. This is not necessary but it simplifies the + configuration. The concept is quite simple. First of all you + need a PHP script which evaluates the PATH_INFO + variable and treats its value as the name of a Hyperwave + object. Let's call this script 'Hyperwave'. The URL http://your.hostname/Hyperwave/name_of_object + would than return the Hyperwave object with the name + 'name_of_object'. Depending on the type of the object the script + has to react accordingly. If it is a collection, it will probably + return a list of children. If it is a document it will return the + mime type and the content. A slight improvement can be achieved + if the Apache rewriting engine is used. From the users point of + view it would be more straight forward if the URL http://your.hostname/name_of_object would + return the object. The rewriting rule is quite easy: + +


RewriteRule ^/(.*) /usr/local/apache/htdocs/HyperWave/$1 [L]
+

+ + Now every URL relates to an object in the Hyperwave server. This + causes a simple to solve problem. There is no way to execute a + different script, e.g. for searching, than the 'Hyperwave' + script. This can be fixed with another rewriting rule like the + following: + +


RewriteRule ^/hw/(.*) /usr/local/apache/htdocs/hw/$1 [L]
+

+ + This will reserve the directory /usr/local/apache/htdocs/hw for + additional scripts and other files. Just make sure this rule is + evaluated before the one above. There is just a little drawback: + all Hyperwave objects whose name starts with 'hw/' will be + shadowed. So, make sure you don't use such names. If you need + more directories, e.g. for images just add more rules or place + them all in one directory. Finally, don't forget to turn on the + rewriting engine with + +


RewriteEngine on
+

+ + My experiences have shown that you will need the following + scripts: + +

  • to return the object itself

  • to allow searching

  • to identify yourself

  • to set your profile

  • one for each additional function like to show + the object attributes, to show information about users, + to show the status of the server, etc.

Todo

There are still some things todo: +

  • The hw_InsertDocument has to be split into + hw_InsertObject() and + hw_PutDocument().

  • The names of several functions are not fixed, yet. +

  • Most functions require the current connection + as its first parameter. This leads to a lot of typing, which + is quite often not necessary if there is just one open + connection. A default connection will + improve this.

  • Conversion form object record into object array + needs to handle any multiple attribute. +

Table of Contents
hw_Array2Objrec — convert attributes from object array to object record
hw_Children — object ids of children
hw_ChildrenObj — object records of children
hw_Close — closes the Hyperwave connection
hw_Connect — opens a connection
hw_Cp — copies objects
hw_Deleteobject — deletes object
hw_DocByAnchor — object id object belonging to anchor
hw_DocByAnchorObj — object record object belonging to anchor
hw_DocumentAttributes — object record of hw_document
hw_DocumentBodyTag — body tag of hw_document
hw_DocumentContent — returns content of hw_document
hw_DocumentSetContent — sets/replaces content of hw_document
hw_DocumentSize — size of hw_document
hw_ErrorMsg — returns error message
hw_EditText — retrieve text document
hw_Error — error number
hw_Free_Document — frees hw_document
hw_GetParents — object ids of parents
hw_GetParentsObj — object records of parents
hw_GetChildColl — object ids of child collections
hw_GetChildCollObj — object records of child collections
hw_GetRemote — Gets a remote document
hw_GetRemoteChildren — Gets children of remote document
hw_GetSrcByDestObj — Returns anchors pointing at object
hw_GetObject — object record
hw_GetAndLock — return bject record and lock object
hw_GetText — retrieve text document
hw_GetObjectByQuery — search object
hw_GetObjectByQueryObj — search object
hw_GetObjectByQueryColl — search object in collection
hw_GetObjectByQueryCollObj — search object in collection
hw_GetChildDocColl — object ids of child documents of collection
hw_GetChildDocCollObj — object records of child documents of collection
hw_GetAnchors — object ids of anchors of document
hw_GetAnchorsObj — object records of anchors of document
hw_Mv — moves objects
hw_Identify — identifies as user
hw_InCollections — check if object ids in collections
hw_Info — info about connection
hw_InsColl — insert collection
hw_InsDoc — insert document
hw_InsertDocument — upload any document
hw_InsertObject — inserts an object record
hw_mapid — Maps global id on virtual local id
hw_Modifyobject — modifies object record
hw_New_Document — create new document
hw_Objrec2Array — convert attributes from object record to object array
hw_OutputDocument — prints hw_document
hw_pConnect — make a persistent database connection
hw_PipeDocument — retrieve any document
hw_Root — root object id
hw_Unlock — unlock object
hw_Who — List of currently logged in users
hw_getusername — name of currently logged in user

PrevHomeNext
setcookieUphw_Array2Objrec
\ No newline at end of file diff --git a/ref.ibase.html b/ref.ibase.html new file mode 100644 index 0000000..edc8bd6 --- /dev/null +++ b/ref.ibase.html @@ -0,0 +1,283 @@ +InterBase functions
PHP Manual
PrevNext

XXXI. InterBase functions

InterBase is a popular database put out by Borland/Inprise. More + information about InterBase is available at http://www.interbase.com/. Oh, by the way, InterBase + just joined the open source movement! +

Note: + Full support for InterBase 6 was added in PHP 4.0. +

This database uses a single quote (') character for escaping, a + behavior similar to the Sybase database, add to your + php.ini the following directive: +


magic_quotes_sybase = On
+	  

+

Table of Contents
ibase_connect — + Open a connection to an InterBase database +
ibase_pconnect — + Creates an persistent connection to an InterBase database +
ibase_close — + Close a connection to an InterBase database +
ibase_query — Execute a query on an InterBase database
ibase_fetch_row — Fetch a row from an InterBase database
ibase_fetch_object — Get an object from a InterBase database
ibase_free_result — Free a result set
ibase_prepare — + Prepare a query for later binding of parameter placeholders and + execution +
ibase_execute — Execute a previously prepared query
ibase_free_query — + Free memory allocated by a prepared query +
ibase_timefmt — + Sets the format of timestamp, date and time type columns returned from queries +
ibase_num_fields — + Get the number of fields in a result set +

PrevHomeNext
ifxus_write_slobUpibase_connect
\ No newline at end of file diff --git a/ref.icap.html b/ref.icap.html new file mode 100644 index 0000000..435f617 --- /dev/null +++ b/ref.icap.html @@ -0,0 +1,212 @@ +ICAP Functions
PHP Manual
PrevNext

XXVII. ICAP Functions

To get these functions to work, you have to compile PHP with + --with-icap. That requires the + icap library to be installed. Grab the latest version from http://icap.chek.com/ and compile and install it. +

Table of Contents
icap_open — Opens up an ICAP connection
icap_close — Close an ICAP stream
icap_fetch_event — Fetches an event from the calendar stream/
icap_list_events — + Return a list of events between two given datetimes +
icap_store_event — Store an event into an ICAP calendar
icap_delete_event — Delete an event from an ICAP calendar
icap_snooze — Snooze an alarm
icap_list_alarms — + Return a list of events that has an alarm triggered at the given + datetime +

PrevHomeNext
hw_getusernameUpicap_open
\ No newline at end of file diff --git a/ref.ifx.html b/ref.ifx.html new file mode 100644 index 0000000..e3c807f --- /dev/null +++ b/ref.ifx.html @@ -0,0 +1,563 @@ +Informix functions
PHP Manual
PrevNext

XXX. Informix functions

The Informix driver for Informix (IDS) 7.x, SE 7.x, Universal + Server (IUS) 9.x and IDS 2000 is implemented in "ifx.ec" and + "php3_ifx.h" in the informix extension directory. IDS 7.x support + is fairly complete, with full support for BYTE and TEXT + columns. IUS 9.x support is partly finished: the new data types + are there, but SLOB and CLOB support is still under construction. +

Configuration notes: + You need a version of ESQL/C to compile the PHP Informix driver. + ESQL/C versions from 7.2x on should be OK. ESQL/C is now part of + the Informix Client SDK. +

Make sure that the "INFORMIXDIR" variable has been set, and that + $INFORMIXDIR/bin is in your PATH before you run the "configure" + script. +

+ The configure script will autodetect the libraries and include + directories, if you run "configure --with_informix=yes". You can + overide this detection by specifying "IFX_LIBDIR", "IFX_LIBS" and + "IFX_INCDIR" in the environment. The configure script will also + try to detect your Informix server version. It will set the + "HAVE_IFX_IUS" conditional compilation variable if your Informix + version >= 9.00. +

Runtime considerations: + Make sure that the Informix environment variables INFORMIXDIR and + INFORMIXSERVER are available to the PHP ifx driver, and that the + INFORMIX bin directory is in the PATH. Check this by running a + script that contains a call to phpinfo()() + before you start testing. The phpinfo()() + output should list these environment variables. This is true for + both CGI php and Apache mod_php. You may have to set these + environment variables in your Apache startup script. +

The Informix shared libraries should also be available to the + loader (check LD_LINBRARY_PATH or ld.so.conf/ldconfig). +

Some notes on the use of BLOBs (TEXT and BYTE columns): + BLOBs are normally addressed by BLOB identifiers. Select queries + return a "blob id" for every BYTE and TEXT column. You can get + at the contents with "string_var = ifx_get_blob($blob_id);" if + you choose to get the BLOBs in memory (with : + "ifx_blobinfile(0);"). If you prefer to receive the content of + BLOB columns in a file, use "ifx_blobinfile(1);", and + "ifx_get_blob($blob_id);" will get you the filename. Use normal + file I/O to get at the blob contents. +

For insert/update queries you must create these "blob id's" + yourself with "ifx_create_blob();". You then + plug the blob id's into an array, and replace the blob columns + with a question mark (?) in the query string. For + updates/inserts, you are responsible for setting the blob + contents with ifx_update_blob(). +

The behaviour of BLOB columns can be altered by configuration + variables that also can be set at runtime : +

configuration variable : ifx.textasvarchar +

configuration variable : ifx.byteasvarchar +

runtime functions : +

ifx_textasvarchar(0) : use blob id's for select queries with TEXT + columns +

ifx_byteasvarchar(0) : use blob id's for select queries with BYTE + columns +

ifx_textasvarchar(1) : return TEXT columns as if they were + VARCHAR columns, so that you don't need to use blob id's for + select queries. +

ifx_byteasvarchar(1) : return BYTE columns as if they were + VARCHAR columns, so that you don't need to use blob id's for + select queries. +

configuration variable : ifx.blobinfile +

runtime function : +

ifx_blobinfile_mode(0) : return BYTE columns in memory, the blob + id lets you get at the contents. +

ifx_blobinfile_mode(1) : return BYTE columns in a file, the blob + id lets you get at the file name. +

If you set ifx_text/byteasvarchar to 1, you can use TEXT and BYTE + columns in select queries just like normal (but rather long) + VARCHAR fields. Since all strings are "counted" in PHP, this + remains "binary safe". It is up to you to handle this + correctly. The returned data can contain anything, you are + responsible for the contents. +

If you set ifx_blobinfile to 1, use the file name returned by + ifx_get_blob(..) to get at the blob contents. Note that in this + case YOU ARE RESPONSIBLE FOR DELETING THE TEMPORARY FILES CREATED + BY INFORMIX when fetching the row. Every new row fetched will + create new temporary files for every BYTE column. +

The location of the temporary files can be influenced by the + environment variable "blobdir", default is "." (the current + directory). Something like : putenv(blobdir=tmpblob"); will ease + the cleaning up of temp files accidentally left behind (their + names all start with "blb"). +

Automatically trimming "char" (SQLCHAR and SQLNCHAR) data: + This can be set with the configuration variable +

ifx.charasvarchar : if set to 1 trailing spaces will be + automatically trimmed, to save you some "chopping". +

NULL values: + The configuration variable ifx.nullformat (and the runtime + function ifx_nullformat()) when set to true + will return NULL columns as the string "NULL", when set to false + they return the empty string. This allows you to discriminate + between NULL columns and empty columns. +

Table of Contents
ifx_connect — Open Informix server connection
ifx_pconnect — Open persistent Informix connection
ifx_close — Close Informix connection
ifx_query — Send Informix query
ifx_prepare — Prepare an SQL-statement for execution
ifx_do — + Execute a previously prepared SQL-statement +
ifx_error — Returns error code of last Informix call
ifx_errormsg — Returns error message of last Informix call
ifx_affected_rows — Get number of rows affected by a query
ifx_getsqlca — + Get the contents of sqlca.sqlerrd[0..5] after a query +
ifx_fetch_row — Get row as enumerated array
ifx_htmltbl_result — + Formats all rows of a query into a HTML table +
ifx_fieldtypes — List of Informix SQL fields
ifx_fieldproperties — List of SQL fieldproperties
ifx_num_fields — Returns the number of columns in the query
ifx_num_rows — Count the rows already fetched a query
ifx_free_result — Releases resources for the query
ifx_create_char — Creates an char object
ifx_free_char — Deletes the char object
ifx_update_char — Updates the content of the char object
ifx_get_char — Return the content of the char object
ifx_create_blob — Creates an blob object
ifx_copy_blob — Duplicates the given blob object
ifx_free_blob — Deletes the blob object
ifx_get_blob — Return the content of a blob object
ifx_update_blob — Updates the content of the blob object
ifx_blobinfile_mode — Set the default blob mode for all select queries
ifx_textasvarchar — Set the default text mode
ifx_byteasvarchar — Set the default byte mode
ifx_nullformat — + Sets the default return value on a fetch row +
ifxus_create_slob — Creates an slob object and opens it
ifxus_free_slob — Deletes the slob object
ifxus_close_slob — Deletes the slob object
ifxus_open_slob — Opens an slob object
ifxus_tell_slob — Returns the current file or seek position
ifxus_seek_slob — Sets the current file or seek position
ifxus_read_slob — Reads nbytes of the slob object
ifxus_write_slob — Writes a string into the slob object

PrevHomeNext
imap_mailUpifx_connect
\ No newline at end of file diff --git a/ref.image.html b/ref.image.html new file mode 100644 index 0000000..b1d7927 --- /dev/null +++ b/ref.image.html @@ -0,0 +1,513 @@ +Image functions
PHP Manual
PrevNext

XXVIII. Image functions

You can use the image functions in PHP to get the size of + JPEG, GIF, + PNG, and SWF images, and if + you have the GD library (available at http://www.boutell.com/gd/) you will also be able to create + and manipulate images. +

The format of images you are able to manipulate depend on the + version of gd you install, and any other libraries gd might need + to access those image formats. Versions of gd older than gd-1.6 + support gif format images, and do not support png, where versions + greater than gd-1.6 support png, not gif. +

In order to read and write images in jpeg format, you will need to + obtain and install jpeg-6b (available at + ftp://ftp.uu.net/graphics/jpeg/), and then recompile gd to + make use of jpeg-6b. You will also have to compile PHP with + --with-jpeg-dir=/path/to/jpeg-6b. +

To add support for Type 1 fonts, you can install t1lib (available + at ftp://ftp.neuroinformatik.ruhr-uni-bochum.de/pub/software/t1lib/), and then add + --with-t1lib[=dir]. +

Table of Contents
GetImageSize — Get the size of a GIF, JPEG, PNG or SWF image
ImageArc — Draw a partial ellipse
ImageChar — Draw a character horizontally
ImageCharUp — Draw a character vertically
ImageColorAllocate — Allocate a color for an image
ImageColorDeAllocate — + De-allocate a color for an image +
ImageColorAt — Get the index of the color of a pixel
ImageColorClosest — + Get the index of the closest color to the specified color +
ImageColorExact — Get the index of the specified color
ImageColorResolve — + Get the index of the specified color or its closest possible + alternative +
ImageGammaCorrect — + Apply a gamma correction to a GD image +
ImageColorSet — + Set the color for the specified palette index +
ImageColorsForIndex — Get the colors for an index
ImageColorsTotal — + Find out the number of colors in an image's palette +
ImageColorTransparent — Define a color as transparent
ImageCopy — + Copy part of an image +
ImageCopyResized — Copy and resize part of an image
ImageCreate — Create a new image
ImageCreateFromGIF — Create a new image from file or URL
ImageCreateFromJPEG — Create a new image from file or URL
ImageCreateFromPNG — Create a new image from file or URL
ImageDashedLine — Draw a dashed line
ImageDestroy — Destroy an image
ImageFill — Flood fill
ImageFilledPolygon — Draw a filled polygon
ImageFilledRectangle — Draw a filled rectangle
ImageFillToBorder — Flood fill to specific color
ImageFontHeight — Get font height
ImageFontWidth — Get font width
ImageGIF — Output image to browser or file
ImagePNG — + Output a PNG image to either the browser or a file +
ImageJPEG — Output image to browser or file
ImageInterlace — Enable or disable interlace
ImageLine — Draw a line
ImageLoadFont — Load a new font
ImagePolygon — Draw a polygon
ImagePSBBox — + Give the bounding box of a text rectangle using PostScript Type1 + fonts +
ImagePSEncodeFont — + Change the character encoding vector of a font +
ImagePSFreeFont — Free memory used by a PostScript Type 1 font
ImagePSLoadFont — Load a PostScript Type 1 font from file
ImagePsExtendFont — + Extend or condense a font +
ImagePsSlantFont — + Slant a font +
ImagePSText — + To draw a text string over an image using PostScript Type1 fonts +
ImageRectangle — Draw a rectangle
ImageSetPixel — Set a single pixel
ImageString — Draw a string horizontally
ImageStringUp — Draw a string vertically
ImageSX — Get image width
ImageSY — Get image height
ImageTTFBBox — + Give the bounding box of a text using TypeType fonts +
ImageTTFText — + Write text to the image using TrueType fonts +
ImageTypes — + Return the image types supported by this PHP build +
read_exif_data — Read the EXIF headers from a JPEG

PrevHomeNext
icap_list_alarmsUpGetImageSize
\ No newline at end of file diff --git a/ref.imap.html b/ref.imap.html new file mode 100644 index 0000000..b4b60f5 --- /dev/null +++ b/ref.imap.html @@ -0,0 +1,660 @@ +IMAP, POP3 and NNTP functions
PHP Manual
PrevNext

XXIX. IMAP, POP3 and NNTP functions

To get these functions to work, you have to compile PHP with + --with-imap. That requires the + c-client library to be installed. Grab the latest version from + ftp://ftp.cac.washington.edu/imap/ and compile it. Then + copy c-client/c-client.a to + /usr/local/lib/libc-client.a or some other + directory on your link path and copy + c-client/rfc822.h, + mail.h and linkage.h to + /usr/local/include or some other directory in + your include path. +

Note that these functions are not limited to the + IMAP protocol, despite their name. The + underlying c-client library also supports NNTP, + POP3 and local mailbox access methods. +

This document can't go into detail on all the topics touched by + the provided functions. Further information is provided by the + documentation of the c-client library source + (docs/internal.txt). and the following RFC + documents: +

  • RFC821: Simple Mail + Transfer Protocol (SMTP). +

  • RFC822: Standard for + ARPA internet text messages. +

  • RFC2060: Internet + Message Access Protocol (IMAP) Version 4rev1. +

  • RFC1939: Post + Office Protocol Version 3 (POP3). +

  • RFC977: Network News + Transfer Protocol (NNTP). +

  • RFC2076: Common + Internet Message Headers. +

  • RFC2045 , RFC2046 , RFC2047 , RFC2048 & RFC2049: Multipurpose + Internet Mail Extensions (MIME). +

+ A detailed overview is also available in the books + Programming Internet Email + by David Wood and Managing + IMAP by Dianna Mullet & Kevin Mullet. +

Table of Contents
imap_append — + Append a string message to a specified mailbox +
imap_base64 — Decode BASE64 encoded text
imap_body — Read the message body
imap_check — Check current mailbox
imap_close — Close an IMAP stream
imap_createmailbox — Create a new mailbox
imap_delete — + Mark a messge for deletion from current mailbox +
imap_deletemailbox — Delete a mailbox
imap_expunge — Delete all messages marked for deletion
imap_fetchbody — + Fetch a particular section of the body of the message +
imap_fetchstructure — + Read the structure of a particular message +
imap_headerinfo — Read the header of the message
imap_header — Read the header of the message
imap_rfc822_parse_headers — Parse mail headers from a string
imap_headers — + Returns headers for all messages in a mailbox +
imap_listmailbox — Read the list of mailboxes
imap_getmailboxes — + Read the list of mailboxes, returning detailed information on + each one +
imap_listsubscribed — List all the subscribed mailboxes
imap_getsubscribed — List all the subscribed mailboxes
imap_mail_copy — Copy specified messages to a mailbox
imap_mail_move — Move specified messages to a mailbox
imap_num_msg — + Gives the number of messages in the current mailbox +
imap_num_recent — Gives the number of recent messages in current + mailbox
imap_open — Open an IMAP stream to a mailbox
imap_ping — Check if the IMAP stream is still active
imap_renamemailbox — Rename an old mailbox to new mailbox
imap_reopen — Reopen IMAP stream to new mailbox
imap_subscribe — Subscribe to a mailbox
imap_undelete — + Unmark the message which is marked deleted +
imap_unsubscribe — Unsubscribe from a mailbox
imap_qprint — Convert a quoted-printable string to an 8 bit + string
imap_8bit — + Convert an 8bit string to a quoted-printable string +
imap_binary — + Convert an 8bit string to a base64 string +
imap_scanmailbox — + Read the list of mailboxes, takes a string to search for in the + text of the mailbox +
imap_mailboxmsginfo — Get information about the current mailbox
imap_rfc822_write_address — + Returns a properly formatted email address given the mailbox, + host, and personal info. +
imap_rfc822_parse_adrlist — Parses an address string
imap_setflag_full — Sets flags on messages
imap_clearflag_full — Clears flags on messages
imap_sort — Sort an array of message headers
imap_fetchheader — Returns header for a message
imap_uid — + This function returns the UID for the given message sequence + number +
imap_msgno — + This function returns the message sequence number for the given + UID +
imap_search — + This function returns an array of messages matching the given + search criteria +
imap_last_error — + This function returns the last IMAP error (if any) that occurred + during this page request +
imap_errors — + This function returns all of the IMAP errors (if any) that have + occurred during this page request or since the error stack was + reset. +
imap_alerts — + This function returns all IMAP alert messages (if any) that have + occurred during this page request or since the alert stack was + reset +
imap_status — + This function returns status information on a mailbox other than + the current one +
imap_utf7_decode — + Decodes a modified UTF-7 encoded string. +
imap_utf7_encode — + Converts 8bit data to modified UTF-7 text. +
imap_utf8 — + Converts text to UTF8 +
imap_fetch_overview — + Read an overview of the information in the headers of the given message +
imap_mime_header_decode — Decode MIME header elements
imap_mail_compose — + Create a MIME message based on given envelope and body sections +
imap_mail — + Send an email message +

PrevHomeNext
read_exif_dataUpimap_append
\ No newline at end of file diff --git a/ref.info.html b/ref.info.html new file mode 100644 index 0000000..6a28e8d --- /dev/null +++ b/ref.info.html @@ -0,0 +1,336 @@ +PHP options & information
PHP Manual
PrevNext

XLIX. PHP options & information

Table of Contents
assert — Checks if assertion is false
assert_options — Set/get the various assert flags
extension_loaded — find out whether an extension is loaded
dl — load a PHP extension at runtime
getenv — Get the value of an environment variable
get_cfg_var — + Get the value of a PHP configuration option. +
get_current_user — + Get the name of the owner of the current PHP script. +
get_magic_quotes_gpc — + Get the current active configuration setting of magic quotes gpc. +
get_magic_quotes_runtime — + Get the current active configuration setting of + magic_quotes_runtime. +
getlastmod — Get time of last page modification.
getmyinode — Get the inode of the current script.
getmypid — Get PHP's process ID.
getmyuid — Get PHP script owner's UID.
getrusage — Get the current resource usages.
ini_alter — Change the value of a configuration option
ini_get — Get the value of a configuration option
ini_restore — Restore the value of a configuration option
ini_set — Set the value of a configuration option
phpcredits — Prints out the credits for PHP.
phpinfo — Output lots of PHP information.
phpversion — Get the current PHP version.
php_logo_guid — Get the logo guid
php_sapi_name — + Returns the type of interface between web server and PHP +
php_uname — + Returns information about the operating system PHP was built on +
putenv — Set the value of an environment variable.
set_magic_quotes_runtime — + Set the current active configuration setting of + magic_quotes_runtime. +
set_time_limit — limit the maximum execution time
zend_logo_guid — Get the zend guid
get_loaded_extensions — + Returns an array with the names of all modules compiled and + loaded +
get_extension_funcs — + Returns an array with the names of the functions of a module +
get_required_files — + Returns an array with the names of the files require_once()'d in + a script +
get_included_files — + Returns an array with the names of the files include_once()'d in + a script +

PrevHomeNext
pfpro_versionUpassert
\ No newline at end of file diff --git a/ref.ldap.html b/ref.ldap.html new file mode 100644 index 0000000..ed49bf1 --- /dev/null +++ b/ref.ldap.html @@ -0,0 +1,575 @@ +LDAP functions
PHP Manual
PrevNext

XXXII. LDAP functions

Introduction to LDAP

LDAP is the Lightweight Directory Access Protocol, and is a + protocol used to access "Directory Servers". The Directory is a + special kind of database that holds information in a tree + structure. +

+ The concept is similar to your hard disk directory structure, + except that in this context, the root directory is "The world" + and the first level subdirectories are "countries". Lower levels + of the directory structure contain entries for companies, + organisations or places, while yet lower still we find directory + entries for people, and perhaps equipment or documents. +

To refer to a file in a subdirectory on your hard disk, you might + use something like +


+    /usr/local/myapp/docs
+

The forwards slash marks each division in the reference, and the + sequence is read from left to right. +

+ The equivalent to the fully qualified file reference in LDAP is + the "distinguished name", referred to simply as "dn". An example + dn might be. +


+    cn=John Smith,ou=Accounts,o=My Company,c=US
+

The comma marks each division in the reference, and the sequence + is read from right to left. You would read this dn as .. +


+    country = US
+    organization = My Company
+    organizationalUnit = Accounts
+    commonName = John Smith
+

In the same way as there are no hard rules about how you organise + the directory structure of a hard disk, a directory server + manager can set up any structure that is meaningful for the + purpose. However, there are some conventions that are used. The + message is that you can not write code to access a directory + server unless you know something about its structure, any more + than you can use a database without some knowledge of what is + available. +

Complete code example

Retrieve information for all entries where the surname starts + with "S" from a directory server, displaying an extract with + name and email address. +

Example 1. LDAP search example


<?php
+// basic sequence with LDAP is connect, bind, search, interpret search
+// result, close connection
+
+echo "<h3>LDAP query test</h3>";
+echo "Connecting ...";
+$ds=ldap_connect("localhost");  // must be a valid LDAP server!
+echo "connect result is ".$ds."<p>";
+
+if ($ds) { 
+    echo "Binding ..."; 
+    $r=ldap_bind($ds);     // this is an "anonymous" bind, typically
+                           // read-only access
+    echo "Bind result is ".$r."<p>";
+
+    echo "Searching for (sn=S*) ...";
+    // Search surname entry
+    $sr=ldap_search($ds,"o=My Company, c=US", "sn=S*");  
+    echo "Search result is ".$sr."<p>";
+
+    echo "Number of entires returned is ".ldap_count_entries($ds,$sr)."<p>";
+
+    echo "Getting entries ...<p>";
+    $info = ldap_get_entries($ds, $sr);
+    echo "Data for ".$info["count"]." items returned:<p>";
+
+    for ($i=0; $i<$info["count"]; $i++) {
+        echo "dn is: ". $info[$i]["dn"] ."<br>";
+        echo "first cn entry is: ". $info[$i]["cn"][0] ."<br>";
+        echo "first email entry is: ". $info[$i]["mail"][0] ."<p>";
+    }
+
+    echo "Closing connection";
+    ldap_close($ds);
+
+} else {
+    echo "<h4>Unable to connect to LDAP server</h4>";
+}
+?>
+

Using the PHP LDAP calls

You will need to get and compile LDAP client libraries from + either the University of Michigan ldap-3.3 package or the + Netscape Directory SDK 3.0. You will also need to recompile PHP + with LDAP support enabled before PHP's LDAP calls will work. +

Before you can use the LDAP calls you will need to know .. + +

  • The name or address of the directory server you will use +

  • The "base dn" of the server (the part of the world directory + that is held on this server, which could be "o=My + Company,c=US") +

  • Whether you need a password to access the server (many servers + will provide read access for an "anonymous bind" but require a + password for anything else) +

The typical sequence of LDAP calls you will make in an + application will follow this pattern: +


+  ldap_connect()    // establish connection to server
+     |
+  ldap_bind()       // anonymous or authenticated "login"
+     |
+  do something like search or update the directory
+  and display the results
+     |
+  ldap_close()      // "logout"
+

More Information

Lots of information about LDAP can be found at +

+ The Netscape SDK contains a helpful Programmer's Guide in .html + format. +

Table of Contents
ldap_add — Add entries to LDAP directory
ldap_bind — Bind to LDAP directory
ldap_close — Close link to LDAP server
ldap_compare — Compare value of attribute found in entry specified with DN
ldap_connect — Connect to an LDAP server
ldap_count_entries — Count the number of entries in a search
ldap_delete — Delete an entry from a directory
ldap_dn2ufn — Convert DN to User Friendly Naming format
ldap_err2str — + Convert LDAP error number into string error message +
ldap_errno — + Return the LDAP error number of the last LDAP command +
ldap_error — + Return the LDAP error message of the last LDAP command +
ldap_explode_dn — Splits DN into its component parts
ldap_first_attribute — Return first attribute
ldap_first_entry — Return first result id
ldap_free_result — Free result memory
ldap_get_attributes — Get attributes from a search result entry
ldap_get_dn — Get the DN of a result entry
ldap_get_entries — Get all result entries
ldap_get_values — Get all values from a result entry
ldap_get_values_len — Get all binary values from a result entry
ldap_list — Single-level search
ldap_modify — Modify an LDAP entry
ldap_mod_add — Add attribute values to current attributes
ldap_mod_del — Delete attribute values from current attributes
ldap_mod_replace — Replace attribute values with new ones
ldap_next_attribute — Get the next attribute in result
ldap_next_entry — Get next result entry
ldap_read — Read an entry
ldap_search — Search LDAP tree
ldap_unbind — Unbind from LDAP directory

PrevHomeNext
ibase_num_fieldsUpldap_add
\ No newline at end of file diff --git a/ref.mail.html b/ref.mail.html new file mode 100644 index 0000000..3beaf6d --- /dev/null +++ b/ref.mail.html @@ -0,0 +1,173 @@ +Mail functions
PHP Manual
PrevNext

XXXIII. Mail functions

The mail() function allows you to send mail.

Table of Contents
mail — send mail
ezmlm_hash — Calculate the hash value needed by EZMLM

PrevHomeNext
ldap_unbindUpmail
\ No newline at end of file diff --git a/ref.math.html b/ref.math.html new file mode 100644 index 0000000..e739ebe --- /dev/null +++ b/ref.math.html @@ -0,0 +1,643 @@ +Mathematical Functions
PHP Manual
PrevNext

XXXIV. Mathematical Functions

Introduction

These math functions will only handle values within the range of + the long and double types on your computer. If you need to + handle bigger numbers, take a look at the arbitrary precision math functions. +

Math constants

The following values are defined as constants in PHP by the math + extension: +

Table 1. Math constants

ConstantValueDescription
M_PI3.14159265358979323846Der Wert π (Pi)
M_E2.7182818284590452354e
M_LOG2E1.4426950408889634074log_2 e
M_LOG10E0.43429448190325182765log_10 e
M_LN20.69314718055994530942log_e 2
M_LN102.30258509299404568402log_e 10
M_PI_21.57079632679489661923pi/2
M_PI_40.78539816339744830962pi/4
M_1_PI0.318309886183790671541/pi
M_2_PI0.636619772367581343082/pi
M_SQRTPI1.77245385090551602729sqrt(pi) [4.0.2]
M_2_SQRTPI1.128379167095512573902/sqrt(pi)
M_SQRT21.41421356237309504880sqrt(2)
M_SQRT31.73205080756887729352sqrt(3) [4.0.2]
M_SQRT1_20.707106781186547524401/sqrt(2)
M_LNPI1.14472988584940017414log_e(pi) [4.0.2]
M_EULER0.57721566490153286061Euler constant [4.0.2]
+ Only M_PI is available in PHP versions up to and including PHP4RC1. + All other constants are available starting with PHP 4.0. Constants + labelled [4.0.2] were added in PHP 4.0.2. +

Table of Contents
abs — Absolute value
acos — Arc cosine
asin — Arc sine
atan — Arc tangent
atan2 — arc tangent of two variables
base_convert — Convert a number between arbitrary bases
bindec — Binary to decimal
ceil — Round fractions up
cos — Cosine
decbin — Decimal to binary
dechex — Decimal to hexadecimal
decoct — Decimal to octal
deg2rad — + Converts the number in degrees to the radian equivalent +
exp — e to the power of ...
floor — Round fractions down
getrandmax — Show largest possible random value
hexdec — Hexadecimal to decimal
lcg_value — Combined linear congruential generator
log — Natural logarithm
log10 — Base-10 logarithm
max — Find highest value
min — Find lowest value
mt_rand — Generate a better random value
mt_srand — Seed the better random number generator
mt_getrandmax — Show largest possible random value
number_format — Format a number with grouped thousands
octdec — Octal to decimal
pi — Get value of pi
pow — Exponential expression
rad2deg — + Converts the radian number to the equivalent number in degrees +
rand — Generate a random value
round — Rounds a float
sin — Sine
sqrt — Square root
srand — Seed the random number generator
tan — Tangent

PrevHomeNext
ezmlm_hashUpabs
\ No newline at end of file diff --git a/ref.mcal.html b/ref.mcal.html new file mode 100644 index 0000000..20a77d7 --- /dev/null +++ b/ref.mcal.html @@ -0,0 +1,478 @@ +MCAL functions
PHP Manual
PrevNext

XXXV. MCAL functions

MCAL stands for Modular Calendar Access Library. +

Libmcal is a C library for accessing calendars. It's written to be + very modular, with plugable drivers. MCAL is the calendar + equivalent of the IMAP module for mailboxes. +

With mcal support, a calendar stream can be opened much like the + mailbox stream with the IMAP support. Calendars can be local file + stores, remote ICAP servers, or other formats that are supported + by the mcal library. +

Calendar events can be pulled up, queried, and stored. There is + also support for calendar triggers (alarms) and reoccuring events. +

With libmcal, central calendar servers can be accessed and used, + removing the need for any specific database or local file + programming. +

To get these functions to work, you have to compile PHP with + --with-mcal. That requires the + mcal library to be installed. Grab the latest version from + http://mcal.chek.com/ and compile and install + it. +

The following constants are defined when using the MCAL module: + + MCAL_SUNDAY, + MCAL_MONDAY, + MCAL_TUESDAY, + MCAL_WEDNESDAY, + MCAL_THURSDAY, + MCAL_FRIDAY, + MCAL_SATURDAY, + + MCAL_RECUR_NONE, + MCAL_RECUR_DAILY, + MCAL_RECUR_WEEKLY, + MCAL_RECUR_MONTHLY_MDAY, + MCAL_RECUR_MONTHLY_WDAY, + MCAL_RECUR_YEARLY, + + MCAL_JANUARY, + MCAL_FEBRUARY, + MCAL_MARCH, + MCAL_APRIL, + MCAL_MAY, + MCAL_JUNE, + MCAL_JULY, + MCAL_AUGUGT, + MCAL_SEPTEMBER, + MCAL_OCTOBER, + MCAL_NOVEMBER, and + MCAL_DECEMBER. + + Most of the functions use an internal event structure that is + unique for each stream. This alleviates the need to pass around + large objects between functions. There are convenience functions + for setting, initializing, and retrieving the event structure + values. +

Table of Contents
mcal_open — Opens up an MCAL connection
mcal_popen — Opens up a persistant MCAL connection
mcal_reopen — Reopens an MCAL connection
mcal_close — Close an MCAL stream
mcal_create_calendar — Create a new MCAL calendar
mcal_rename_calendar — Rename an MCAL calendar
mcal_delete_calendar — Delete an MCAL calendar
mcal_fetch_event — + Fetches an event from the calendar stream +
mcal_list_events — + Return a list of IDs for a date or a range of dates. +
mcal_append_event — Store a new event into an MCAL calendar
mcal_store_event — Modify an existing event in an MCAL calendar
mcal_delete_event — Delete an event from an MCAL calendar
mcal_snooze — Turn off an alarm for an event
mcal_list_alarms — + Return a list of events that has an alarm triggered at the given + datetime +
mcal_event_init — + Initializes a streams global event structure +
mcal_event_set_category — + Sets the category of the streams global event structure +
mcal_event_set_title — + Sets the title of the streams global event structure +
mcal_event_set_description — + Sets the description of the streams global event structure +
mcal_event_set_start — + Sets the start date and time of the streams global event + structure +
mcal_event_set_end — + Sets the end date and time of the streams global event structure +
mcal_event_set_alarm — + Sets the alarm of the streams global event structure +
mcal_event_set_class — + Sets the class of the streams global event structure +
mcal_is_leap_year — + Returns if the given year is a leap year or not +
mcal_days_in_month — + Returns the number of days in the given month +
mcal_date_valid — + Returns true if the given year, month, day is a valid date +
mcal_time_valid — + Returns true if the given year, month, day is a valid time +
mcal_day_of_week — + Returns the day of the week of the given date +
mcal_day_of_year — + Returns the day of the year of the given date +
mcal_date_compare — Compares two dates
mcal_next_recurrence — Returns the next recurrence of the event
mcal_event_set_recur_none — + Sets the recurrence of the streams global event structure +
mcal_event_set_recur_daily — + Sets the recurrence of the streams global event structure +
mcal_event_set_recur_weekly — + Sets the recurrence of the streams global event structure +
mcal_event_set_recur_monthly_mday — + Sets the recurrence of the streams global event structure +
mcal_event_set_recur_monthly_wday — + Sets the recurrence of the streams global event structure +
mcal_event_set_recur_yearly — + Sets the recurrence of the streams global event structure +
mcal_fetch_current_stream_event — + Returns an object containing the current streams event structure +
mcal_event_add_attribute — + Adds an attribute and a value to the streams global event structure +
mcal_expunge — + Deletes all events marked for being expunged. +

PrevHomeNext
tanUpmcal_open
\ No newline at end of file diff --git a/ref.mcrypt.html b/ref.mcrypt.html new file mode 100644 index 0000000..7b983b7 --- /dev/null +++ b/ref.mcrypt.html @@ -0,0 +1,799 @@ +Mcrypt Encryption Functions
PHP Manual
PrevNext

XXXVI. Mcrypt Encryption Functions

These functions work using mcrypt. +

This is an interface to the mcrypt library, which supports a wide + variety of block algorithms such as DES, TripleDES, Blowfish + (default), 3-WAY, SAFER-SK64, SAFER-SK128, TWOFISH, TEA, RC2 and + GOST in CBC, OFB, CFB and ECB cipher modes. Additionally, it + supports RC6 and IDEA which are considered "non-free". +

If you linked against libmcrypt 2.4.x, the following additional + block algorithms are supported: CAST, LOKI97, RIJNDAEL, SAFERPLUS, + SERPENT and the following stream ciphers: ENIGMA (crypt), PANAMA, + RC4 and WAKE. With libmcrypt 2.4.x another cipher mode is also + available; nOFB. +

To use it, download libmcrypt-x.x.tar.gz from here and follow the included + installation instructions. You need to compile PHP with the + --with-mcrypt parameter to + enable this extension. Make sure you compile libmcrypt with the + option --disable-posix-threads. +

Mcrypt can be used to encrypt and decrypt using the above + mentioned ciphers. If you linked against libmcrypt-2.2.x, the + four important mcrypt commands (mcrypt_cfb(), + mcrypt_cbc(), mcrypt_ecb(), + and mcrypt_ofb()) can operate in both modes + which are named MCRYPT_ENCRYPT and MCRYPT_DECRYPT, respectively. +

Example 1. Encrypt an input value with TripleDES in ECB mode


<?php
+$key = "this is a very secret key";
+$input = "Let us meet at 9 o'clock at the secret place.";
+
+$encrypted_data = mcrypt_ecb (MCRYPT_TripleDES, $key, $input, MCRYPT_ENCRYPT);
+?>
+     
+ This example will give you the encrypted data as a string in + $encrypted_data. +

If you linked against libmcrypt 2.4.x, these functions are still + available, but it is recommended that you use the advanced functions. +

Example 2. Encrypt an input value with TripleDES in ECB mode


<?php
+$key = "this is a very secret key";
+$input = "Let us meet at 9 o'clock at the secret place.";
+
+$td = mcrypt_module_open (MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, "");
+$iv = mcrypt_create_iv (mcrypt_enc_get_iv_size ($td), MCRYPT_RAND);
+mcrypt_generic_init ($td, $key, $iv);
+$encrypted_data = mcrypt_generic ($td, $input);
+mcrypt_generic_end ($td);
+?>
+     
+ This example will give you the encrypted data as a string in + $encrypted_data. +

Mcrypt can operate in four block cipher modes (CBC, OFB, CFB, and + ECB). If linked against libmcrypt-2.4.x mcrypt can also operate + in the block cipher mode nOFB and in STREAM mode. Then there are + also constants in the form MCRYPT_MODE_mode for use with several + functions. We will outline the normal use for each of these modes. + For a more complete reference and discussion see + Applied Cryptography by Schneier (ISBN 0-471-11709-9). +

  • ECB (electronic codebook) is suitable for random data, such as + encrypting other keys. Since data there is short and random, + the disadvantages of ECB have a favorable negative + effect. +

  • CBC (cipher block chaining) is especially suitable for + encrypting files where the security is increased over ECB + significantly. +

  • CFB (cipher feedback) is the best mode for encrypting byte + streams where single bytes must be encrypted. +

  • OFB (output feedback, in 8bit) is comparable to CFB, but + can be used in applications where error propagation cannot + be tolerated. It's insecure (because it operates in 8bit + mode) so it is not recommended to use it. +

  • nOFB (output feedback, in nbit) is comparable to OFB, but + more secure because it operates on the block size of the + algorithm. +

  • STREAM is an extra mode to include some stream algorithms + like WAKE or RC4. +

+

PHP does not support encrypting/decrypting bit streams + currently. As of now, PHP only supports handling of strings. +

For a complete list of supported ciphers, see the defines at the + end of mcrypt.h. The general rule with the + mcrypt-2.2.x API is that you can access the cipher from PHP with + MCRYPT_ciphername. With the mcrypt-2.4.x API these constants also + work, but it is possible to specify the name of the cipher as + a string with a call to mcrypt_module_open(). +

Here is a short list of ciphers which are currently supported by + the mcrypt extension. If a cipher is not listed here, but is + listed by mcrypt as supported, you can safely assume that this + documentation is outdated. +

  • MCRYPT_ARCFOUR_IV (libmcrypt 2.4.x only) +

  • MCRYPT_ARCFOUR (libmcrypt 2.4.x only) +

  • MCRYPT_BLOWFISH +

  • MCRYPT_CAST_128 +

  • MCRYPT_CAST_256 +

  • MCRYPT_CRYPT +

  • MCRYPT_DES +

  • MCRYPT_DES_COMPAT (libmcrypt 2.2.x only) +

  • MCRYPT_ENIGMA (libmcrypt 2.4.x only, alias for MCRYPT_CRYPT) +

  • MCRYPT_GOST +

  • MCRYPT_IDEA (non-free) +

  • MCRYPT_LOKI97 (libmcrypt 2.4.x only) +

  • MCRYPT_MARS (libmcrypt 2.4.x only, non-free) +

  • MCRYPT_PANAMA (libmcrypt 2.4.x only) +

  • MCRYPT_RIJNDAEL_128 (libmcrypt 2.4.x only) +

  • MCRYPT_RIJNDAEL_192 (libmcrypt 2.4.x only) +

  • MCRYPT_RIJNDAEL_256 (libmcrypt 2.4.x only) +

  • MCRYPT_RC2 +

  • MCRYPT_RC4 (libmcrypt 2.2.x only) +

  • MCRYPT_RC6 (libmcrypt 2.4.x only) +

  • MCRYPT_RC6_128 (libmcrypt 2.2.x only) +

  • MCRYPT_RC6_192 (libmcrypt 2.2.x only) +

  • MCRYPT_RC6_256 (libmcrypt 2.2.x only) +

  • MCRYPT_SAFER64 +

  • MCRYPT_SAFER128 +

  • MCRYPT_SAFERPLUS (libmcrypt 2.4.x only) +

  • MCRYPT_SERPENT (libmcrypt 2.4.x only) +

  • MCRYPT_SERPENT_128 (libmcrypt 2.2.x only) +

  • MCRYPT_SERPENT_192 (libmcrypt 2.2.x only) +

  • MCRYPT_SERPENT_256 (libmcrypt 2.2.x only) +

  • MCRYPT_SKIPJACK (libmcrypt 2.4.x only) +

  • MCRYPT_TEAN (libmcrypt 2.2.x only) +

  • MCRYPT_THREEWAY +

  • MCRYPT_TRIPLEDES +

  • MCRYPT_TWOFISH (for older mcrypt 2.x versions, or mcrypt 2.4.x ) +

  • MCRYPT_TWOFISH128 (TWOFISHxxx are available in newer 2.x versions, but not in the 2.4.x versions) +

  • MCRYPT_TWOFISH192 +

  • MCRYPT_TWOFISH256 +

  • MCRYPT_WAKE (libmcrypt 2.4.x only) +

  • MCRYPT_XTEA (libmcrypt 2.4.x only) +

+

You must (in CFB and OFB mode) or can (in CBC mode) supply an + initialization vector (IV) to the respective cipher function. The + IV must be unique and must be the same when + decrypting/encrypting. With data which is stored encrypted, you + can take the output of a function of the index under which the + data is stored (e.g. the MD5 key of the filename). + Alternatively, you can transmit the IV together with the encrypted + data (see chapter 9.3 of Applied Cryptography by Schneier (ISBN 0-471-11709-9) for a + discussion of this topic). +

Table of Contents
mcrypt_get_cipher_name — Get the name of the specified cipher
mcrypt_get_block_size — Get the block size of the specified cipher
mcrypt_get_key_size — Get the key size of the specified cipher
mcrypt_create_iv — + Create an initialization vector (IV) from a random source +
mcrypt_cbc — Encrypt/decrypt data in CBC mode
mcrypt_cfb — Encrypt/decrypt data in CFB mode
mcrypt_ecb — Encrypt/decrypt data in ECB mode
mcrypt_ofb — Encrypt/decrypt data in OFB mode
mcrypt_list_algorithms — Get an array of all supported ciphers
mcrypt_list_modes — Get an array of all supported modes
mcrypt_get_iv_size — Returns the size of the IV belonging to a specific cipher/mode combination
mcrypt_encrypt — Encrypts plaintext with given parameters
mcrypt_decrypt — Decrypts crypttext with given parameters
mcrypt_module_open — This function opens the module of the algorithm and the mode to be used
mcrypt_generic_init — This function initializes all buffers needed for encryption
mcrypt_generic — This function encrypts data
mdecrypt_generic — This function decrypts data
mcrypt_generic_end — This function terminates encryption
mcrypt_enc_self_test — This function runs a self test on the opened module
mcrypt_enc_is_block_algorithm_mode — Checks whether the encryption of the opened mode works on blocks
mcrypt_enc_is_block_algorithm — Checks whether the algorithm of the opened mode is a block algorithm
mcrypt_enc_is_block_mode — Checks whether the opened mode outputs blocks
mcrypt_enc_get_block_size — Returns the blocksize of the opened algorithm
mcrypt_enc_get_key_size — Returns the maximum supported keysize of the opened mode
mcrypt_enc_get_supported_key_sizes — Returns an array with the supported keysizes of the opened algorithm
mcrypt_enc_get_iv_size — Returns the size of the IV of the opened algorithm
mcrypt_enc_get_algorithms_name — Returns the name of the opened algorithm
mcrypt_enc_get_modes_name — Returns the name of the opened mode
mcrypt_module_self_test — This function runs a self test on the specified module
mcrypt_module_is_block_algorithm_mode — This function returns if the the specified module is a block algorithm or not
mcrypt_module_is_block_algorithm — This function checks whether the specified algorithm is a block algorithm
mcrypt_module_is_block_mode — This function returns if the the specified mode outputs blocks or not
mcrypt_module_get_algo_block_size — Returns the blocksize of the specified algorithm
mcrypt_module_get_algo_key_size — Returns the maximum supported keysize of the opened mode
mcrypt_module_get_algo_supported_key_sizes — Returns an array with the supported keysizes of the opened algorithm

PrevHomeNext
mcal_expungeUpmcrypt_get_cipher_name
\ No newline at end of file diff --git a/ref.mhash.html b/ref.mhash.html new file mode 100644 index 0000000..3ba189f --- /dev/null +++ b/ref.mhash.html @@ -0,0 +1,324 @@ +Mhash Functions
PHP Manual
PrevNext

XXXVII. Mhash Functions

These functions are intended to work with mhash.

This is an interface to the mhash library. mhash supports a wide + variety of hash algorithms such as MD5, SHA1, GOST, and many + others. +

To use it, download the mhash distribution from its web site and follow the included + installation instructions. You need to compile PHP with the + --with-mhash parameter to enable + this extension. +

Mhash can be used to create checksums, message digests, and + more. +

Example 1. Compute the SHA1 key and print it out as hex


<?php
+$input = "Let us meet at 9 o' clock at the secret place.";
+$hash = mhash (MHASH_SHA1, $input);
+
+print "The hash is ".bin2hex ($hash)."\n";
+?>
+     
+ This will produce: +

The hash is d3b85d710d8f6e4e5efd4d5e67d041f9cecedafe
+    
+ For a complete list of supported hashes, refer to the + documentation of mhash. The general rule is that you can access + the hash algorithm from PHP with MHASH_HASHNAME. For example, to + access HAVAL you use the PHP constant MHASH_HAVAL. +

Here is a list of hashes which are currently supported by mhash. If a + hash is not listed here, but is listed by mhash as supported, you can + safely assume that this documentation is outdated. +

  • MHASH_MD5 +

  • MHASH_SHA1 +

  • MHASH_HAVAL +

  • MHASH_RIPEMD160 +

  • MHASH_RIPEMD128 +

  • MHASH_SNEFRU +

  • MHASH_TIGER +

  • MHASH_GOST +

  • MHASH_CRC32 +

  • MHASH_CRC32B +

+

Table of Contents
mhash_get_hash_name — Get the name of the specified hash
mhash_get_block_size — Get the block size of the specified hash
mhash_count — Get the highest available hash id
mhash — Compute hash

PrevHomeNext
mcrypt_module_get_algo_supported_key_sizesUpmhash_get_hash_name
\ No newline at end of file diff --git a/ref.misc.html b/ref.misc.html new file mode 100644 index 0000000..fe43268 --- /dev/null +++ b/ref.misc.html @@ -0,0 +1,274 @@ +Miscellaneous functions
PHP Manual
PrevNext

XXXIX. Miscellaneous functions

These functions were placed here because none of the other + categories seemed to fit. +

Table of Contents
connection_aborted — Returns true if client disconnected
connection_status — Returns connection status bitfield
connection_timeout — Return true if script timed out
define — Defines a named constant.
defined — + Checks whether a given named constant exists +
die — + Output a message and terminate the current script +
eval — Evaluate a string as PHP code
exit — Terminate current script
get_browser — + Tells what the user's browser is capable of +
highlight_file — Syntax highlighting of a file
highlight_string — Syntax highlighting of a string
ignore_user_abort — + Set whether a client disconnect should abort script execution +
iptcparse — + Parse a binary IPTC http://www.xe.net/iptc/ + block into single tags. +
leak — Leak memory
pack — Pack data into binary string.
show_source — Syntax highlighting of a file
sleep — Delay execution
uniqid — Generate a unique id
unpack — Unpack data from binary string
usleep — Delay execution in microseconds

PrevHomeNext
mssql_select_dbUpconnection_aborted
\ No newline at end of file diff --git a/ref.msql.html b/ref.msql.html new file mode 100644 index 0000000..ea23d52 --- /dev/null +++ b/ref.msql.html @@ -0,0 +1,374 @@ +mSQL functions
PHP Manual
PrevNext

XL. mSQL functions

These functions allow you to access mSQL database servers. In + order to have these functions available, you must compile php + with msql support by using the + --with-msql[=dir] option. The default + location is /usr/local/Hughes. +

More information about mSQL can be found at http://www.hughes.com.au/. +

Table of Contents
msql — Send mSQL query
msql_affected_rows — Returns number of affected rows
msql_close — Close mSQL connection
msql_connect — Open mSQL connection
msql_create_db — Create mSQL database
msql_createdb — Create mSQL database
msql_data_seek — Move internal row pointer
msql_dbname — Get current mSQL database name
msql_drop_db — Drop (delete) mSQL database
msql_dropdb — Drop (delete) mSQL database
msql_error — Returns error message of last msql call
msql_fetch_array — Fetch row as array
msql_fetch_field — Get field information
msql_fetch_object — Fetch row as object
msql_fetch_row — Get row as enumerated array
msql_fieldname — Get field name
msql_field_seek — Set field offset
msql_fieldtable — Get table name for field
msql_fieldtype — Get field type
msql_fieldflags — Get field flags
msql_fieldlen — Get field length
msql_free_result — Free result memory
msql_freeresult — Free result memory
msql_list_fields — List result fields
msql_listfields — List result fields
msql_list_dbs — List mSQL databases on server
msql_listdbs — List mSQL databases on server
msql_list_tables — List tables in an mSQL database
msql_listtables — List tables in an mSQL database
msql_num_fields — Get number of fields in result
msql_num_rows — Get number of rows in result
msql_numfields — Get number of fields in result
msql_numrows — Get number of rows in result
msql_pconnect — Open persistent mSQL connection
msql_query — Send mSQL query
msql_regcase — + Make regular expression for case insensitive match +
msql_result — Get result data
msql_select_db — Select mSQL database
msql_selectdb — Select mSQL database
msql_tablename — Get table name of field

PrevHomeNext
usleepUpmsql
\ No newline at end of file diff --git a/ref.mssql.html b/ref.mssql.html new file mode 100644 index 0000000..55dde2a --- /dev/null +++ b/ref.mssql.html @@ -0,0 +1,257 @@ +Microsoft SQL Server functions
PHP Manual
PrevNext

XXXVIII. Microsoft SQL Server functions

Table of Contents
mssql_close — Close MS SQL Server connection
mssql_connect — Open MS SQL server connection
mssql_data_seek — Move internal row pointer
mssql_fetch_array — Fetch row as array
mssql_fetch_field — Get field information
mssql_fetch_object — Fetch row as object
mssql_fetch_row — Get row as enumerated array
mssql_field_length — Get the length of a field
mssql_field_name — Get the name of a field
mssql_field_seek — Set field offset
mssql_field_type — Get the type of a field
mssql_free_result — Free result memory
mssql_get_last_message — + Returns the last message from server (over + min_message_severity?) +
mssql_min_error_severity — Sets the lower error severity
mssql_min_message_severity — Sets the lower message severity
mssql_num_fields — Get number of fields in result
mssql_num_rows — Get number of rows in result
mssql_pconnect — Open persistent MS SQL connection
mssql_query — Send MS SQL query
mssql_result — Get result data
mssql_select_db — Select MS SQL database

PrevHomeNext
mhashUpmssql_close
\ No newline at end of file diff --git a/ref.mysql.html b/ref.mysql.html new file mode 100644 index 0000000..982c4e0 --- /dev/null +++ b/ref.mysql.html @@ -0,0 +1,395 @@ +MySQL functions
PHP Manual
PrevNext

XLI. MySQL functions

These functions allow you to access MySQL database servers. In + order to have these functions available, you must compile php + with mysql support by using the + --with-mysql option. If you + use this option without specifying the path to mysql, php will + use the built-in mysql client libraries. Users who run other + applications that use mysql (for example, running php3 and php4 + as concurrent apache modules, or auth-mysql) should always + specify the path to mysql: + --with-mysql=/path/to/mysql. + This will force php to use the client libraries installed by + mysql, avoiding any conflicts. +

More information about MySQL can be found at http://www.mysql.com/. +

Documentation for MySQL can be found at http://www.mysql.com/documentation/. +

Table of Contents
mysql_affected_rows — Get number of affected rows in previous MySQL + operation
mysql_change_user — + Change logged in user of the active connection +
mysql_close — Close MySQL connection
mysql_connect — Open a connection to a MySQL Server
mysql_create_db — Create a MySQL database
mysql_data_seek — Move internal result pointer
mysql_db_name — Get result data
mysql_db_query — Send a MySQL query
mysql_drop_db — Drop (delete) a MySQL database
mysql_errno — Returns the numerical value of the error message from previous + MySQL operation
mysql_error — Returns the text of the error message from previous + MySQL operation
mysql_fetch_array — + Fetch a result row as an associative array, a numeric array, or both. +
mysql_fetch_assoc — + Fetch a result row as an associative array +
mysql_fetch_field — + Get column information from a result and return as an object +
mysql_fetch_lengths — + Get the length of each output in a result +
mysql_fetch_object — Fetch a result row as an object
mysql_fetch_row — Get a result row as an enumerated array
mysql_field_flags — + Get the flags associated with the specified field in a result +
mysql_field_name — + Get the name of the specified field in a result +
mysql_field_len — + Returns the length of the specified field +
mysql_field_seek — + Set result pointer to a specified field offset +
mysql_field_table — + Get name of the table the specified field is in +
mysql_field_type — + Get the type of the specified field in a result +
mysql_free_result — Free result memory
mysql_insert_id — + Get the id generated from the previous INSERT operation +
mysql_list_dbs — + List databases available on a MySQL server +
mysql_list_fields — List MySQL result fields
mysql_list_tables — List tables in a MySQL database
mysql_num_fields — Get number of fields in result
mysql_num_rows — Get number of rows in result
mysql_pconnect — + Open a persistent connection to a MySQL Server +
mysql_query — Send a MySQL query
mysql_result — Get result data
mysql_select_db — Select a MySQL database
mysql_tablename — Get table name of field

PrevHomeNext
msql_tablenameUpmysql_affected_rows
\ No newline at end of file diff --git a/ref.network.html b/ref.network.html new file mode 100644 index 0000000..a9fefe7 --- /dev/null +++ b/ref.network.html @@ -0,0 +1,291 @@ +Network Functions
PHP Manual
PrevNext

XLII. Network Functions

Table of Contents
checkdnsrr — + Check DNS records corresponding to a given Internet host name or + IP address +
closelog — Close connection to system logger
debugger_off — Disable internal PHP debugger
debugger_on — Enable internal PHP debugger
define_syslog_variables — Initializes all syslog related constants
fsockopen — + Open Internet or Unix domain socket connection +
gethostbyaddr — + Get the Internet host name corresponding to a given IP address +
gethostbyname — + Get the IP address corresponding to a given Internet host name +
gethostbynamel — + Get a list of IP addresses corresponding to a given Internet host + name +
getmxrr — + Get MX records corresponding to a given Internet host name +
getprotobyname — + Get protocol number associated with protocol name +
getprotobynumber — + Get protocol name associated with protocol number +
getservbyname — + Get port number associated with an Internet service and protocol +
getservbyport — + Get Internet service which corresponds to port and protocol +
ip2long — + Converts a string containing an (IPv4) Internet Protocol dotted address + into a proper address. +
long2ip — + Converts an (IPv4) Internet network address into a string in Internet + standard dotted format +
openlog — Open connection to system logger
pfsockopen — + Open persistent Internet or Unix domain socket connection +
socket_get_status — + Returns information about existing socket resource +
socket_set_blocking — Set blocking/non-blocking mode on a socket
socket_set_timeout — Set timeout period on a socket
syslog — Generate a system log message

PrevHomeNext
mysql_tablenameUpcheckdnsrr
\ No newline at end of file diff --git a/ref.nis.html b/ref.nis.html new file mode 100644 index 0000000..79fd978 --- /dev/null +++ b/ref.nis.html @@ -0,0 +1,210 @@ +YP/NIS Functions
PHP Manual
PrevNext

LXXIII. YP/NIS Functions

NIS (formerly called Yellow Pages) allows network management of + important administrative files (e.g. the password file). For more + information refer to the NIS manpage and Introduction to YP/NIS. There is also a book called Managing NFS and NIS by Hal Stern. +

To get these functions to work, you have to configure PHP with + --with-yp. +

Table of Contents
yp_get_default_domain — Fetches the machine's default NIS domain
yp_order — Returns the order number for a map
yp_master — + Returns the machine name of the master NIS server for a map +
yp_match — Returns the matched line
yp_first — + Returns the first key-value pair from the named map +
yp_next — Returns the next key-value pair in the named + map.

PrevHomeNext
yaz_waitUpyp_get_default_domain
\ No newline at end of file diff --git a/ref.oci8.html b/ref.oci8.html new file mode 100644 index 0000000..73f44a1 --- /dev/null +++ b/ref.oci8.html @@ -0,0 +1,477 @@ +Oracle 8 functions
PHP Manual
PrevNext

XLIV. Oracle 8 functions

These functions allow you to access Oracle8 and Oracle7 databases. + It uses the Oracle8 Call-Interface (OCI8). You will need the Oracle8 + client libraries to use this extension. +

This extension is more flexible than the standard Oracle + extension. It supports binding of global and local PHP variables + to Oracle placeholders, has full LOB, FILE and ROWID support + and allows you to use user-supplied define variables. +

Before using this extension, make sure that you have set up your + oracle environment variables properly for the Oracle user, as well + as your web daemon user. The variables you might need to set are as + follows: +

  • ORACLE_HOME +

  • ORACLE_SID +

  • LD_PRELOAD +

  • LD_LIBRARY_PATH +

  • NLS_LANG +

  • ORA_NLS33 +

+

After setting up the environment variables for your webserver user, + be sure to also add the webserver user (nobody, www) to the oracle + group. +

Example 1. OCI Hints


<?php
+// by sergo@bacup.ru
+
+// Use option: OCI_DEFAULT for execute command to delay execution
+OCIExecute($stmt, OCI_DEFAULT);
+
+// for retrieve data use (after fetch):
+
+$result = OCIResult($stmt, $n);
+if (is_object ($result)) $result = $result->load();
+
+// For INSERT or UPDATE statetment use:
+
+$sql = "insert into table (field1, field2) values (field1 = 'value',
+ field2 = empty_clob()) returning field2 into :field2";
+OCIParse($conn, $sql);
+$clob = OCINewDescriptor($conn, OCI_D_LOB);
+OCIBindByName ($stmt, ":field2", &$clob, -1, OCI_B_CLOB);
+OCIExecute($stmt, OCI_DEFAULT);
+$clob->save ("some text");
+
+?>
+     
+

You can easily access stored procedures in the same way as you + would from the commands line. +

Example 2. Using Stored Procedures


<?php
+// by webmaster@remoterealty.com
+$sth = OCIParse ( $dbh, "begin sp_newaddress( :address_id, '$firstname',
+ '$lastname', '$company', '$address1', '$address2', '$city', '$state',
+ '$postalcode', '$country', :error_code );end;" );
+
+// This calls stored procedure sp_newaddress, with :address_id being an
+// in/out variable and :error_code being an out variable. 
+// Then you do the binding:
+
+   OCIBindByName ( $sth, ":address_id", $addr_id, 10 );
+   OCIBindByName ( $sth, ":error_code", $errorcode, 10 );
+   OCIExecute ( $sth );
+
+?>
+     
+

Table of Contents
OCIDefineByName — + Use a PHP variable for the define-step during a SELECT +
OCIBindByName — Bind a PHP variable to an Oracle Placeholder
OCILogon — Establishes a connection to Oracle
OCIPLogon — Connect to an Oracle database and log on using a persistant connection. + Returns a new session.
OCINLogon — Connect to an Oracle database and log on using a new connection. + Returns a new session.
OCILogOff — Disconnects from Oracle
OCIExecute — Execute a statement
OCICommit — Commits outstanding transactions
OCIRollback — Rolls back outstanding transactions
OCINewDescriptor — Initialize a new empty descriptor LOB/FILE (LOB is default)
OCIRowCount — Gets the number of affected rows
OCINumCols — Return the number of result columns in a statement
OCIResult — Returns coulumn value for fetched row
OCIFetch — Fetches the next row into result-buffer
OCIFetchInto — Fetches the next row into result-array
OCIFetchStatement — Fetch all rows of result data into an array.
OCIColumnIsNULL — test whether a result column is NULL
OCIColumnSize — return result column size
OCIServerVersion — Return a string containing server version information.
OCIStatementType — Return the type of an OCI statement.
OCINewCursor — return a new cursor (Statement-Handle) - use this to bind ref-cursors!
OCIFreeStatement — Free all resources associated with a statement.
OCIFreeCursor — Free all resources associated with a cursor.
OCIFreeDesc — Deletes a large object descriptor.
OCIColumnName — Returns the name of a column.
OCIColumnType — Returns the data type of a column.
OCIParse — Parse a query and return a statement
OCIError — Return the last error of stmt|conn|global. + If no error happened returns false. +
OCIInternalDebug — + Enables or disables internal debug output. By default it is + disabled +

PrevHomeNext
odbc_statisticsUpOCIDefineByName
\ No newline at end of file diff --git a/ref.odbc.html b/ref.odbc.html new file mode 100644 index 0000000..3a09176 --- /dev/null +++ b/ref.odbc.html @@ -0,0 +1,451 @@ +Unified ODBC functions
PHP Manual
PrevNext

XLIII. Unified ODBC functions

In addition to normal ODBC support, the Unified ODBC functions in + PHP allow you to access several databases that have borrowed the + semantics of the ODBC API to implement their own API. Instead of + maintaining multiple database drivers that were all nearly + identical, these drivers have been unified into a single set of + ODBC functions. +

The following databases are supported by the Unified ODBC + functions: Adabas D, IBM DB2, iODBC, Solid, and Sybase SQL Anywhere. +

Please see the Installation on Unix + Systems chapter for more information about configuring PHP + with these databases. +

Note: + There is no ODBC involved when connecting to the above + databases. The functions that you use to speak natively to them + just happen to share the same names and syntax as the ODBC + functions. +

Table of Contents
odbc_autocommit — Toggle autocommit behaviour
odbc_binmode — Handling of binary column data
odbc_close — Close an ODBC connection
odbc_close_all — Close all ODBC connections
odbc_commit — Commit an ODBC transaction
odbc_connect — Connect to a datasource
odbc_cursor — Get cursorname
odbc_do — Synonym for odbc_exec()
odbc_exec — Prepare and execute a SQL statement
odbc_execute — Execute a prepared statement
odbc_fetch_into — Fetch one result row into array
odbc_fetch_row — Fetch a row
odbc_field_name — Get the columnname
odbc_field_num — Return column number
odbc_field_type — Datatype of a field
odbc_field_len — Get the length (precision) of a field
odbc_field_precision — Synonym for odbc_field_len()
odbc_field_scale — Get the scale of a field
odbc_free_result — Free resources associated with a result
odbc_longreadlen — Handling of LONG columns
odbc_num_fields — Number of columns in a result
odbc_pconnect — Open a persistent database connection
odbc_prepare — Prepares a statement for execution
odbc_num_rows — Number of rows in a result
odbc_result — Get result data
odbc_result_all — Print result as HTML table
odbc_rollback — Rollback a transaction
odbc_setoption — + Adjust ODBC settings. Returns false if an error occurs, otherwise + true. +
odbc_tables — + Get the list of table names stored in a specific data source. + Returns a result identifier containing the + information. +
odbc_tableprivileges — + Lists tables and the privileges associated with each table +
odbc_columns — + Lists the column names in specified tables. Returns a result + identifier containing the information. +
odbc_columnprivileges — + Returns a result identifier that can be used to fetch a list of + columns and associated privileges +
odbc_gettypeinfo — + Returns a result identifier containing information about data + types supported by the data source. +
odbc_primarykeys — + Returns a result identifier that can be used to fetch the column + names that comprise the primary key for a table +
odbc_foreignkeys — + Returns a list of foreign keys in the specified table or a list + of foreign keys in other tables that refer to the primary key in + the specified table +
odbc_procedures — + Get the list of procedures stored in a specific data source. + Returns a result identifier containing the information. +
odbc_procedurecolumns — + Retrieve information about parameters to procedures +
odbc_specialcolumns — + Returns either the optimal set of columns that uniquely + identifies a row in the table or columns that are automatically + updated when any value in the row is updated by a transaction +
odbc_statistics — Retrieve statistics about a table

PrevHomeNext
syslogUpodbc_autocommit
\ No newline at end of file diff --git a/ref.oracle.html b/ref.oracle.html new file mode 100644 index 0000000..e25991d --- /dev/null +++ b/ref.oracle.html @@ -0,0 +1,266 @@ +Oracle functions
PHP Manual
PrevNext

XLV. Oracle functions

Table of Contents
Ora_Bind — bind a PHP variable to an Oracle parameter
Ora_Close — close an Oracle cursor
Ora_ColumnName — get name of Oracle result column
Ora_ColumnSize — get size of Oracle result column
Ora_ColumnType — get type of Oracle result column
Ora_Commit — commit an Oracle transaction
Ora_CommitOff — disable automatic commit
Ora_CommitOn — enable automatic commit
Ora_Do — Parse, Exec, Fetch
Ora_Error — get Oracle error message
Ora_ErrorCode — get Oracle error code
Ora_Exec — execute parsed statement on an Oracle cursor
Ora_Fetch — fetch a row of data from a cursor
Ora_Fetch_Into — Fetch a row into the specified result array
Ora_GetColumn — get data from a fetched column
Ora_Logoff — close an Oracle connection
Ora_Logon — open an Oracle connection
Ora_pLogon — + Open a persistent Oracle connection +
Ora_Numcols — Returns the number of columns
Ora_Numrows — Returns the number of rows
Ora_Open — open an Oracle cursor
Ora_Parse — parse an SQL statement
Ora_Rollback — roll back transaction

PrevHomeNext
OCIInternalDebugUpOra_Bind
\ No newline at end of file diff --git a/ref.outcontrol.html b/ref.outcontrol.html new file mode 100644 index 0000000..019b733 --- /dev/null +++ b/ref.outcontrol.html @@ -0,0 +1,316 @@ +Output Control Functions
PHP Manual
PrevNext

XLVI. Output Control Functions

The Output Control functions allow you to control when output is + sent from the script. This can be useful in several different + situations, especially if you need to send headers to the browser + after your script has began outputing data. The Output Control + functions do not affect headers sent using + header() or setcookie(), + only functions such as echo() and data between + blocks of PHP code. +

Example 1. Output Control example


<?php
+
+ob_start();
+echo "Hello\n";
+
+setcookie ("cookiename", "cookiedata");
+
+ob_end_flush();
+
+?>
+     
+

In the above example, the output from echo() + would be stored in the output buffer until + ob_end_flush() was called. In the mean time, + the call to setcookie() successfully stored a + cookie without causing an error. (You can not normally send + headers to the browser after data has already been sent.) +

See also header() and + setcookie(). +

Table of Contents
flush — Flush the output buffer
ob_start — Turn on output buffering
ob_get_contents — + Return the contents of the output buffer +
ob_get_length — + Return the length of the output buffer +
ob_end_flush — + Flush (send) the output buffer and turn off output buffering +
ob_end_clean — + Clean (erase) the output buffer and turn off output buffering +
ob_implicit_flush — + Turn implicit flush on/off +

PrevHomeNext
Ora_RollbackUpflush
\ No newline at end of file diff --git a/ref.pcre.html b/ref.pcre.html new file mode 100644 index 0000000..6567b5c --- /dev/null +++ b/ref.pcre.html @@ -0,0 +1,310 @@ +Regular Expression Functions (Perl-Compatible)
PHP Manual
PrevNext

LVI. Regular Expression Functions (Perl-Compatible)

The syntax for patterns used in these functions closely resembles + Perl. The expression should be enclosed in the delimiters, a + forward slash (/), for example. Any character can be used for + delimiter as long as it's not alphanumeric or backslash (\). If + the delimiter character has to be used in the expression itself, + it needs to be escaped by backslash. +

The ending delimiter may be followed by various modifiers that + affect the matching. + See Pattern Modifiers. +

Example 1. Examples of valid patterns

  • /<\/\w+>/

  • |(\d{3})-\d+|Sm

  • /^(?i)php[34]/

+

Example 2. Examples of invalid patterns

  • /href='(.*)' - missing ending delimiter +

  • /\w+\s*\w+/J - unknown modifier 'J' +

  • 1-\d3-\d3-\d4| - missing starting delimiter +

+

Note: + The Perl-compatible regular expression functions are available in + PHP 4 and in PHP 3.0.9 and up. +

Table of Contents
preg_match — Perform a regular expression match
preg_match_all — Perform a global regular expression match
preg_replace — Perform a regular expression search and replace
preg_split — Split string by a regular expression
preg_quote — Quote regular expression characters
preg_grep — + Return array entries that match the pattern +
Pattern Modifiers — Describes possible modifiers in regex + patterns
Pattern Syntax — Describes PCRE regex syntax

PrevHomeNext
recode_fileUppreg_match
\ No newline at end of file diff --git a/ref.pdf.html b/ref.pdf.html new file mode 100644 index 0000000..f053bea --- /dev/null +++ b/ref.pdf.html @@ -0,0 +1,1578 @@ +PDF functions
PHP Manual
PrevNext

XLVII. PDF functions

Introduction

You can use the PDF functions in PHP to create PDF files if you + have the PDF library by Thomas Merz (available at + http://www.pdflib.com/pdflib/index.html; + you will also need the JPEG library + and the TIFF library to + compile this. These two libs also quite often make problems when + configuring php. Follow the messages of configure to fix possible + problems. +

Please consult the excellent documentation for + pdflib shipped with the source distribution of pdflib. + It provides a very good overview of what pdflib capable of doing. + Most of the functions in pdflib + and the PHP module have the same name. The parameters are also + identical. You should also understand some of the concepts of PDF + or Postscript to efficiently use this module. + All lengths and coordinates are measured in Postscript points. + There are generally 72 PostScript points to an inch, but this + depends on the output resolution. +

There is another PHP module for pdf document creation based on + FastIO's. + ClibPDF. It has a slightly different API. Check the + ClibPDF functions section for + details. +

+ The pdf module introduces two new type of variable. + It is called pdfdoc + pdfdoc is a pointer to a pdf document and + almost all functions need it as its first parameter. +

Confusion with old pdflib versions

+ Since the very begining of PDF support in PHP — starting with + pdflib 0.6 — + there has been tons of changes especially to the pdflib API. Most of + these changes has been somehow covered by PHP, some has even required + changes to the PHP API. Since pdflib + 3.x the API seems to be stabilzed and PHP 4 has adopted the version as a + minimum requirement for PDF support. The consequence will be that many + functions will disappear or be replaced by alternatives sooner or later. + Support for pdflib 0.6 is already completely given up. + The following table list all the functions which are deprecated + in PHP 4.02 and should be replaced by their new versions. +

Table 1. Deprecated functions and its replacements

Old functionReplacement
pdf_put_image()Not needed anymore.
pdf_get_font()pdf_get_value() passing + "font" as the second parameter.
pdf_get_fontsize()pdf_get_value() passing + "fontsize" as the second parameter.
pdf_get_fontname()pdf_get_parameter() passing + "fontname" as the second parameter.
pdf_set_info_creator()pdf_set_info() passing + "Creator" as the second parameter.
pdf_set_info_title()pdf_set_info() passing + "Title" as the second parameter.
pdf_set_info_subject()pdf_set_info() passing + "Subject" as the second parameter.
pdf_set_info_author()pdf_set_info() passing + "Author" as the second parameter.
pdf_set_info_keywords()pdf_set_info() passing + "Keywords" as the second parameter.
pdf_set_leading()pdf_set_value() passing + "leading" as the second parameter.
pdf_set_text_rendering()pdf_set_value() passing + "textrendering" as the second parameter.
pdf_set_text_rise()pdf_set_value() passing + "textrise" as the second parameter.
pdf_set_horiz_scaling()pdf_set_value() passing + "horizscaling" as the second parameter.
pdf_set_text_matrix()Not available anymore
pdf_set_char_spacing()pdf_set_value() passing + "charspacing" as the second parameter.
pdf_set_word_spacing()pdf_set_value() passing + "wordspacing" as the second parameter.
pdf_set_transition()pdf_set_parameter() passing + "transition" as the second parameter.
pdf_set_duration()pdf_set_value() passing + "duration" as the second parameter.
pdf_open_gif()pdf_open_image_file() passing + "gif" as the second parameter.
pdf_open_jpeg()pdf_open_image_file() passing + "jpeg" as the second parameter.
pdf_open_tiff()pdf_open_image_file() passing + "tiff" as the second parameter.
pdf_open_png()pdf_open_image_file() passing + "png" as the second parameter.
pdf_get_imagewidth()pdf_get_value() passing + "imagewidth" as the second parameter and the image + as the third parameter.
pdf_get_imageheight()pdf_get_value() passing + "imageheight" as the second parameter and the + image as the third parameter.
()()
+

Hints for installation of pdflib 3.x

Since version 3.0 of pdflib you should configure pdflib with the option + --enable-shared-pdflib. +

Issues with older versions of pdflib

If you use pdflib 2.01 check how the lib was installed. + There should be a file or a to link libpdf.so. Version 2.01 just creates + a lib with the name libpdf2.01.so which cannot be found when linking + the test programm in configure. You will have to create a symbolic + link from libpdf.so to libpdf2.01.so.). +

Version 2.20 of pdflib has introduced more changes to its API and + support for chinese and japanese fonts. This unfortunately causes + some changes of the pdf module of php4 (not php3). If you use pdflib 2.20 + handle the in memory generation of PDF documents with care. Until + pdflib 3.0 is released it might be unstable. The encoding parameter + of pdf_set_font() has changed to a string. This + means that instead of e.g. 4 you have to use 'winansi'. +

If you use pdflib 2.30 the pdf_set_text_matrix() + will have gone. It is not supported any more. In general it is a good + advise to consult the release notes of the used version of pdflib + for possible changes. +

Any version of PHP 4 after March, 9th 2000 do not support versions + of pdflib older than 3.0. PHP 3 on the other hand should not be used + with version newer than 2.01. +

Examples

Most of the functions are fairly easy to use. The most difficult part + is probably to create a very simple pdf document at all. The following + example should help to get started. + It creates the file test.pdf + with one page. The page contains the text "Times-Roman" in an + outlined 30pt font. The text is also underlined. +

Example 1. Creating a PDF document with pdflib


<?php
+$fp = fopen("test.pdf", "w");
+$pdf = pdf_open($fp);
+pdf_set_info($pdf, "Author", "Uwe Steinmann");
+pdf_set_info($pdf, "Title", "Test for PHP wrapper of PDFlib 2.0");
+pdf_set_info($pdf, "Creator", "See Author");
+pdf_set_info($pdf, "Subject", "Testing");
+pdf_begin_page($pdf, 595, 842);
+pdf_add_outline($pdf, "Page 1");
+pdf_set_font($pdf, "Times-Roman", 30, "host");
+pdf_set_value($pdf, "textrendering", 1);
+pdf_show_xy($pdf, "Times Roman outlined", 50, 750);
+pdf_moveto($pdf, 50, 740);
+pdf_lineto($pdf, 330, 740);
+pdf_stroke($pdf);
+pdf_end_page($pdf);
+pdf_close($pdf);
+fclose($fp);
+echo "<A HREF=getpdf.php>finished</A>";
+?>
+      

The script getpdf.php just returns the pdf document. +


<?php
+$fp = fopen("test.pdf", "r");
+header("Content-type: application/pdf");
+fpassthru($fp);
+fclose($fp);
+?>
+       

+

The pdflib distribution contains a more complex example which + creates a serious of pages with an analog clock. This example + converted into PHP using pdflib looks as the following (you + can see the same example in the documentation for the + clibpdf module): +

Example 2. pdfclock example from pdflib distribution


<?php
+$pdffilename = "clock.pdf";
+$radius = 200;
+$margin = 20;
+$pagecount = 40;
+
+$fp = fopen($pdffilename, "w");
+$pdf = pdf_open($fp);
+pdf_set_info($pdf, "Creator", "pdf_clock.php3");
+pdf_set_info($pdf, "Author", "Uwe Steinmann");
+pdf_set_info($pdf, "Title", "Analog Clock");
+
+while($pagecount-- > 0) {
+    pdf_begin_page($pdf, 2 * ($radius + $margin), 2 * ($radius + $margin));
+
+    pdf_set_parameter($pdf, "transition", "wipe");
+    pdf_set_value($pdf, "duration", 0.5);
+  
+    pdf_translate($pdf, $radius + $margin, $radius + $margin);
+    pdf_save($pdf);
+    pdf_setrgbcolor($pdf, 0.0, 0.0, 1.0);
+
+    /* minute strokes */
+    pdf_setlinewidth($pdf, 2.0);
+    for ($alpha = 0; $alpha < 360; $alpha += 6) {
+        pdf_rotate($pdf, 6.0);
+        pdf_moveto($pdf, $radius, 0.0);
+        pdf_lineto($pdf, $radius-$margin/3, 0.0);
+        pdf_stroke($pdf);
+    }
+
+    pdf_restore($pdf);
+    pdf_save($pdf);
+
+    /* 5 minute strokes */
+    pdf_setlinewidth($pdf, 3.0);
+    for ($alpha = 0; $alpha < 360; $alpha += 30) { 
+        pdf_rotate($pdf, 30.0);
+        pdf_moveto($pdf, $radius, 0.0);
+        pdf_lineto($pdf, $radius-$margin, 0.0);
+        pdf_stroke($pdf);
+    }
+
+    $ltime = getdate();
+
+    /* draw hour hand */
+    pdf_save($pdf);
+    pdf_rotate($pdf,-(($ltime['minutes']/60.0)+$ltime['hours']-3.0)*30.0);
+    pdf_moveto($pdf, -$radius/10, -$radius/20);
+    pdf_lineto($pdf, $radius/2, 0.0);
+    pdf_lineto($pdf, -$radius/10, $radius/20);
+    pdf_closepath($pdf);
+    pdf_fill($pdf);
+    pdf_restore($pdf);
+
+    /* draw minute hand */
+    pdf_save($pdf);
+    pdf_rotate($pdf,-(($ltime['seconds']/60.0)+$ltime['minutes']-15.0)*6.0);
+    pdf_moveto($pdf, -$radius/10, -$radius/20);
+    pdf_lineto($pdf, $radius * 0.8, 0.0);
+    pdf_lineto($pdf, -$radius/10, $radius/20);
+    pdf_closepath($pdf);
+    pdf_fill($pdf);
+    pdf_restore($pdf);
+
+    /* draw second hand */
+    pdf_setrgbcolor($pdf, 1.0, 0.0, 0.0);
+    pdf_setlinewidth($pdf, 2);
+    pdf_save($pdf);
+    pdf_rotate($pdf, -(($ltime['seconds'] - 15.0) * 6.0));
+    pdf_moveto($pdf, -$radius/5, 0.0);
+    pdf_lineto($pdf, $radius, 0.0);
+    pdf_stroke($pdf);
+    pdf_restore($pdf);
+
+    /* draw little circle at center */
+    pdf_circle($pdf, 0, 0, $radius/30);
+    pdf_fill($pdf);
+
+    pdf_restore($pdf);
+
+    pdf_end_page($pdf);
+}
+
+$pdf = pdf_close($pdf);
+fclose($fp);
+echo "<A HREF=getpdf.php?filename=".$pdffilename.">finished</A>";
+?>
+      

The PHP script getpdf.php just outputs the pdf document. +


<?php
+$fp = fopen($filename, "r");
+header("Content-type: application/pdf");
+fpassthru($fp);
+fclose($fp);
+?>
+      

Table of Contents
pdf_set_info — Fills a field of the document information
pdf_open — Opens a new pdf document
pdf_close — Closes a pdf document
pdf_begin_page — Starts new page
pdf_end_page — Ends a page
pdf_show — Output text at current position
pdf_show_boxed — Output text in a box
pdf_show_xy — Output text at given position
pdf_set_font — Selects a font face and size
pdf_set_leading — Sets distance between text lines
pdf_set_parameter — Sets certain parameters
pdf_get_parameter — Gets certain parameters
pdf_set_value — Sets certain numerical value
pdf_get_value — Gets certain numerical value
pdf_get_image_height — Returns height of an image
pdf_get_image_width — Returns width of an image
pdf_set_text_rendering — Determines how text is rendered
pdf_set_horiz_scaling — Sets horizontal scaling of text
pdf_set_text_rise — Sets the text rise
pdf_set_text_matrix — Sets the text matrix
pdf_set_text_pos — Sets text position
pdf_set_char_spacing — Sets character spacing
pdf_set_word_spacing — Sets spacing between words
pdf_skew — Skews the coordinate system
pdf_continue_text — Outputs text in next line
pdf_stringwidth — Returns width of text using current font
pdf_save — Saves the current environment
pdf_restore — Restores formerly saved environment
pdf_translate — Sets origin of coordinate system
pdf_scale — Sets scaling
pdf_rotate — Sets rotation
pdf_setflat — Sets flatness
pdf_setlinejoin — Sets linejoin parameter
pdf_setlinecap — Sets linecap parameter
pdf_setmiterlimit — Sets miter limit
pdf_setlinewidth — Sets line width
pdf_setdash — Sets dash pattern
pdf_moveto — Sets current point
pdf_curveto — Draws a curve
pdf_lineto — Draws a line
pdf_circle — Draws a circle
pdf_arc — Draws an arc
pdf_rect — Draws a rectangle
pdf_closepath — Closes path
pdf_stroke — Draws line along path
pdf_closepath_stroke — Closes path and draws line along path
pdf_fill — Fills current path
pdf_fill_stroke — Fills and strokes current path
pdf_closepath_fill_stroke — Closes, fills and strokes current path
pdf_endpath — Ends current path
pdf_clip — Clips to current path
pdf_setgray_fill — Sets filling color to gray value
pdf_setgray_stroke — Sets drawing color to gray value
pdf_setgray — Sets drawing and filling color to gray value
pdf_setrgbcolor_fill — Sets filling color to rgb color value
pdf_setrgbcolor_stroke — Sets drawing color to rgb color value
pdf_setrgbcolor — Sets drawing and filling color to rgb color value
pdf_add_outline — Adds bookmark for current page
pdf_set_transition — Sets transition between pages
pdf_set_duration — Sets duration between pages
pdf_open_gif — Opens a GIF image
pdf_open_png — + Opens a PNG image +
pdf_open_image_file — Reads an image from a file
pdf_open_memory_image — Opens an image created with PHP's image functions
pdf_open_jpeg — Opens a JPEG image
pdf_open_tiff — Opens a TIFF image
pdf_close_image — Closes an image
pdf_place_image — Places an image on the page
pdf_put_image — Stores an image in the PDF for later use
pdf_execute_image — Places a stored image on the page
pdf_add_annotation — Adds annotation
pdf_set_border_style — Sets style of border around links and annotations
pdf_set_border_color — Sets color of border around links and annotations
pdf_set_border_dash — Sets dash style of border around links and annotations

PrevHomeNext
ob_implicit_flushUppdf_set_info
\ No newline at end of file diff --git a/ref.pfpro.html b/ref.pfpro.html new file mode 100644 index 0000000..46e54d6 --- /dev/null +++ b/ref.pfpro.html @@ -0,0 +1,270 @@ +Verisign Payflow Pro functions
PHP Manual
PrevNext

XLVIII. Verisign Payflow Pro functions

This extension allows you to process credit cards and other financial + transactions using Verisign Payment Services, formerly known as Signio + (http://www.verisign.com/payment/). +

These functions are only available if PHP has been compiled with the + --with-pfpro[=DIR] option. You will + require the appropriate SDK for your platform, which may be + downloaded from within the manager + interface once you have registered. +

Once you have downloaded the SDK you should copy the files from + the lib directory of the + distribution. Copy the header file pfpro.h + to /usr/local/include + and the library file libpfpro.so to + /usr/local/lib. +

When using these functions, you may omit calls to + pfpro_init() and pfpro_cleanup() + as this extension will do so automatically if required. However the + functions are still available in case you are processing a number of + transactions and require fine control over the library. + You may perform any number + of transactions using pfpro_process() between the two. +

These functions have been added in PHP 4.0.2. +

Note: + These functions only provide a link to Verisign Payment Services. Be sure + to read the Payflow Pro Developers Guide for full details of the required + parameters. +

Table of Contents
pfpro_init — Initialises the Payflow Pro library
pfpro_cleanup — Shuts down the Payflow Pro library
pfpro_process — Process a transaction with Payflow Pro
pfpro_process_raw — Process a raw transaction with Payflow Pro
pfpro_version — Returns the version of the Payflow Pro software

PrevHomeNext
pdf_set_border_dashUppfpro_init
\ No newline at end of file diff --git a/ref.pgsql.html b/ref.pgsql.html new file mode 100644 index 0000000..932caab --- /dev/null +++ b/ref.pgsql.html @@ -0,0 +1,582 @@ +PostgreSQL functions
PHP Manual
PrevNext

LI. PostgreSQL functions

Postgres, developed originally in the UC Berkeley Computer Science + Department, pioneered many of the object-relational concepts now + becoming available in some commercial databases. It provides + SQL92/SQL3 language support, transaction integrity, and type + extensibility. PostgreSQL is a public-domain, open source + descendant of this original Berkeley code. +

PostgreSQL is available without cost. The current version is + available at www.PostgreSQL.org. +

Since version 6.3 (03/02/1998) PostgreSQL uses unix domain sockets. + A table is shown below describing these new connection possibilities. + This socket will be found in /tmp/.s.PGSQL.5432. + This option can be enabled with the '-i' flag to postmaster + and it's meaning is: "listen on TCP/IP sockets as well as + Unix domain sockets". +

Table 1. Postmaster and PHP

PostmasterPHPStatus
postmaster &pg_connect("dbname=MyDbName");OK
postmaster -i &pg_connect("dbname=MyDbName");OK
postmaster &pg_connect("host=localhost dbname=MyDbName"); Unable to connect to PostgreSQL server: connectDB() failed: + Is the postmaster running and accepting TCP/IP (with -i) + connection at 'localhost' on port '5432'? in + /path/to/file.php3 on line 20. +
postmaster -i &pg_connect("host=localhost dbname=MyDbName");OK
+

One can establish a connection with the following value pairs + set in the command string: + $conn = pg_Connect("host=myHost port=myPort tty=myTTY + options=myOptions user=myUser password=myPassword dbname=myDB"); + +

The previous syntax of: + $conn = pg_connect ("host", "port", "options", "tty", + "dbname") + + has been deprecated. +

To use the large object (lo) interface, it is necessary to enclose + it within a transaction block. A transaction block starts with a + begin and if the transaction was valid ends + with commit or end. If the + transaction fails the transaction should be closed with + rollback or abort. +

Example 1. Using Large Objects


<?php
+    $database = pg_Connect ("dbname=jacarta");
+    pg_exec ($database, "begin");
+    $oid = pg_locreate ($database);
+    echo ("$oid\n");
+    $handle = pg_loopen ($database, $oid, "w");
+    echo ("$handle\n");
+    pg_lowrite ($handle, "gaga");
+    pg_loclose ($handle);
+    pg_exec ($database, "commit");
+?>
+     
+

Table of Contents
pg_close — Close a PostgreSQL connection
pg_cmdtuples — Returns number of affected tuples
pg_connect — Open a PostgreSQL connection
pg_dbname — Get the database name
pg_end_copy — Sync with PostgreSQL backend
pg_errormessage — Get the error message string
pg_exec — Execute a query
pg_fetch_array — Fetch a row as an array
pg_fetch_object — Fetch a row as an object
pg_fetch_row — Get a row as an enumerated array
pg_fieldisnull — Test if a field is NULL
pg_fieldname — Returns the name of a field
pg_fieldnum — Returns the field number of the named field
pg_fieldprtlen — Returns the printed length
pg_fieldsize — + Returns the internal storage size of the named field +
pg_fieldtype — + Returns the type name for the corresponding field number +
pg_freeresult — Free reult memory
pg_getlastoid — Returns the last object identifier
pg_host — + Returns the host name associated with the connection +
pg_loclose — Close a large object
pg_locreate — Create a large object
pg_loexport — Export a large object to file
pg_loimport — Import a large object from file
pg_loopen — Open a large object
pg_loread — Read a large object
pg_loreadall — + Read a entire large object and send straight to browser +
pg_lounlink — Delete a large object
pg_lowrite — Write a large object
pg_numfields — Returns the number of fields
pg_numrows — Returns the number of rows
pg_options — Get the options associated with the connection
pg_pconnect — Open a persistant PostgreSQL connection
pg_port — + Return the port number associated with the connection +
pg_put_line — Send a NULL-terminated string to PostgreSQL backend
pg_result — Returns values from a result identifier
pg_set_client_encoding — + Set the client encoding +
pg_client_encoding — + Get the client encoding +
pg_trace — Enable tracing a PostgreSQL connection
pg_tty — + Return the tty name associated with the connection +
pg_untrace — Disable tracing of a PostgreSQL connection

PrevHomeNext
posix_getrlimitUppg_close
\ No newline at end of file diff --git a/ref.posix.html b/ref.posix.html new file mode 100644 index 0000000..c07e872 --- /dev/null +++ b/ref.posix.html @@ -0,0 +1,324 @@ +POSIX functions
PHP Manual
PrevNext

L. POSIX functions

This module contains an interface to those functions defined in the + IEEE 1003.1 (POSIX.1) standards document which are not accessible + through other means. POSIX.1 for example defined the open(), read(), + write() and close() functions, too, which traditionally have been + part of PHP 3 for a long time. Some more system specific functions + have not been available before, though, and this module tries to + remedy this by providing easy access to these functions. +

Table of Contents
posix_kill — Send a signal to a process
posix_getpid — Return the current process identifier
posix_getppid — Return the parent process identifier
posix_getuid — + Return the real user ID of the current process +
posix_geteuid — + Return the effective user ID of the current process +
posix_getgid — + Return the real group ID of the current process +
posix_getegid — + Return the effective group ID of the current process +
posix_setuid — + Set the effective UID of the current process +
posix_setgid — + Set the effective GID of the current process +
posix_getgroups — + Return the group set of the current process +
posix_getlogin — Return login name
posix_getpgrp — + Return the current process group identifier +
posix_setsid — Make the current process a session leader
posix_setpgid — set process group id for job control
posix_getpgid — Get process group id for job control
posix_getsid — Get the current sid of the process
posix_uname — Get system name
posix_times — Get process times
posix_ctermid — Get path name of controlling terminal
posix_ttyname — Determine terminal device name
posix_isatty — + Determine if a file descriptor is an interactive terminal +
posix_getcwd — Pathname of current directory
posix_mkfifo — + Create a fifo special file (a named pipe) +
posix_getgrnam — Return info about a group by name
posix_getgrgid — Return info about a group by group id
posix_getpwnam — Return info about a user by username
posix_getpwuid — Return info about a user by user id
posix_getrlimit — Return info about system ressource limits

PrevHomeNext
get_included_filesUpposix_kill
\ No newline at end of file diff --git a/ref.pspell.html b/ref.pspell.html new file mode 100644 index 0000000..dd6dbd0 --- /dev/null +++ b/ref.pspell.html @@ -0,0 +1,264 @@ +Pspell Functions
PHP Manual
PrevNext

LIII. Pspell Functions

These functions allow you to check the spelling of a word and offer + suggestions. +

You need the aspell and pspell libraries, available from http://aspell.sourceforge.net/ and + http://pspell.sourceforge.net/ respectively, and + add the --with-pspell[=dir] option + when compiling php. +

Table of Contents
pspell_add_to_personal — Add the word to a personal wordlist.
pspell_add_to_session — Add the word to the wordlist in the current session. +
pspell_check — Check a word
pspell_clear_session — Clear the current session.
pspell_config_create — Create a config used to open a dictionary.
pspell_config_ignore — Ignore words less than N characters long.
pspell_config_mode — Change the mode number of suggestions returned.
pspell_config_personal — Set a file that contains personal wordlist.
pspell_config_repl — Set a file that contains replacement pairs.
pspell_config_runtogether — Consider run-together words as valid compounds.
pspell_config_save_repl — Determine whether to save a replacement pairs list + along with the wordlist.
pspell_new — Load a new dictionary
pspell_new_config — Load a new dictionary with settings based on a given config +
pspell_new_personal — Load a new dictionary with personal wordlist
pspell_save_wordlist — Save the personal wordlist to a file.
pspell_store_replacement — Store a replacement pair for a word
pspell_suggest — Suggest spellings of a word

PrevHomeNext
systemUppspell_add_to_personal
\ No newline at end of file diff --git a/ref.readline.html b/ref.readline.html new file mode 100644 index 0000000..3dc5e14 --- /dev/null +++ b/ref.readline.html @@ -0,0 +1,220 @@ +GNU Readline
PHP Manual
PrevNext

LIV. GNU Readline

The readline() functions implement an interface + to the GNU Readline library. These are functions that provide + editable command lines. An example being the way Bash allows you + to use the arrow keys to insert characters or scroll through + command history. Because of the interactive nature of this + library, it will be of little use for writing Web applications, + but may be useful when writing scripts meant to be run from a + shell. +

The home page of the GNU Readline project is + http://cnswww.cns.cwru.edu/~chet/readline/rltop.html. It's maintained + by Chet Ramey, who's also the author of Bash. +

Table of Contents
readline — Reads a line
readline_add_history — Adds a line to the history
readline_clear_history — Clears the history
readline_completion_function — Registers a completion function
readline_info — Gets/sets various internal readline variables
readline_list_history — Lists the history
readline_read_history — Reads the history
readline_write_history — Writes the history

PrevHomeNext
pspell_suggestUpreadline
\ No newline at end of file diff --git a/ref.recode.html b/ref.recode.html new file mode 100644 index 0000000..84c0bc5 --- /dev/null +++ b/ref.recode.html @@ -0,0 +1,187 @@ +GNU Recode functions
PHP Manual
PrevNext

LV. GNU Recode functions

This module contains an interface to the GNU Recode library, + version 3.5. To be able to use the functions defined in this + module you must compile you PHP interpreter using the --with-recode + option. In order to do so, you must have GNU Recode 3.5 or higher + installed on your system. +

The GNU Recode library converts files between various coded + character sets and surface encodings. When this cannot be + achieved exactly, it may get rid of the offending characters or + fall back on approximations. The library recognises or produces + nearly 150 different character sets and is able to convert files + between almost any pair. Most RFC 1345 character sets are supported. +

Table of Contents
recode_string — Recode a string according to a recode request
recode — Recode a string according to a recode request
recode_file — + Recode from file to file according to recode request +

PrevHomeNext
readline_write_historyUprecode_string
\ No newline at end of file diff --git a/ref.regex.html b/ref.regex.html new file mode 100644 index 0000000..66fa838 --- /dev/null +++ b/ref.regex.html @@ -0,0 +1,341 @@ +Regular Expression Functions (POSIX Extended)
PHP Manual
PrevNext

LVII. Regular Expression Functions (POSIX Extended)

Regular expressions are used for complex string manipulation in + PHP. The functions that support regular expressions are: +

+ These functions all take a regular expression string as their + first argument. PHP uses the POSIX extended regular expressions + as defined by POSIX 1003.2. For a full description of POSIX + regular expressions see the regex man pages included in the regex + directory in the PHP distribution. It's in manpage format, so + you'll want to do something along the lines of man + /usr/local/src/regex/regex.7 in order to read it. + + + +

Example 1. Regular Expression Examples


ereg ("abc", $string);            
+/* Returns true if "abc"
+   is found anywhere in $string. */
+
+ereg ("^abc", $string);
+/* Returns true if "abc"
+   is found at the beginning of $string. */
+
+ereg ("abc$", $string);
+/* Returns true if "abc"
+   is found at the end of $string. */
+
+eregi ("(ozilla.[23]|MSIE.3)", $HTTP_USER_AGENT);  
+/* Returns true if client browser
+   is Netscape 2, 3 or MSIE 3. */
+
+ereg ("([[:alnum:]]+) ([[:alnum:]]+) ([[:alnum:]]+)", $string,$regs); 
+/* Places three space separated words
+   into $regs[1], $regs[2] and $regs[3]. */
+
+$string = ereg_replace ("^", "<BR>", $string); 
+/* Put a <BR> tag at the beginning of $string. */
+ 
+$string = ereg_replace ("$", "<BR>", $string); 
+/* Put a <BR> tag at the end of $string. */
+
+$string = ereg_replace ("\n", "", $string);
+/* Get rid of any newline
+   characters in $string. */
+     
+

Table of Contents
ereg — Regular expression match
ereg_replace — Replace regular expression
eregi — case insensitive regular expression match
eregi_replace — replace regular expression case insensitive
split — split string into array by regular expression
spliti — + Split string into array by regular expression case insensitive +
sql_regcase — + Make regular expression for case insensitive match +

PrevHomeNext
Pattern SyntaxUpereg
\ No newline at end of file diff --git a/ref.satellite.html b/ref.satellite.html new file mode 100644 index 0000000..6292e1b --- /dev/null +++ b/ref.satellite.html @@ -0,0 +1,194 @@ +Satellite CORBA client extension
PHP Manual
PrevNext

LVIII. Satellite CORBA client extension

The Satellite extension is used for accessing CORBA objects. You + will need to set the idl_directory= entry in php.ini to a path + where you store all IDL files you use. +

Table of Contents
OrbitObject — Access CORBA objects
OrbitEnum — Use CORBA enums
OrbitStruct — Use CORBA structs
satellite_caught_exception — + See if an exception was caught from the previous function +
satellite_exception_id — Get the repository id for the latest excetpion.
satellite_exception_value — + Get the exception struct for the latest exception +

PrevHomeNext
sql_regcaseUpOrbitObject
\ No newline at end of file diff --git a/ref.sem.html b/ref.sem.html new file mode 100644 index 0000000..7c62e86 --- /dev/null +++ b/ref.sem.html @@ -0,0 +1,286 @@ +Semaphore and Shared Memory Functions
PHP Manual
PrevNext

LIX. Semaphore and Shared Memory Functions

This module provides semaphore functions using System V + semaphores. Semaphores may be used to provide exclusive access to + resources on the current machine, or to limit the number of + processes that may simultaneously use a resource. +

This module provides also shared memory functions using System V + shared memory. Shared memory may be used to provide access to + global variables. Different httpd-daemons and even other programs + (such as Perl, C, ...) are able to access this data to provide a + global data-exchange. Remember, that shared memory is NOT safe + against simultaneous access. Use semaphores for synchronization. +

Table 1. Limits of Shared Memory by the Unix OS

SHMMAXmax size of shared memory, normally 131072 bytes
SHMMINminimum size of shared memory, normally 1 byte
SHMMNImax amount of shared memory segments, normally 100
SHMSEGmax amount of shared memory per process, normally 6
+

Note: + These functions do not work on Windows systems. +

Table of Contents
sem_get — Get a semaphore id
sem_acquire — Acquire a semaphore
sem_release — Release a semaphore
shm_attach — Creates or open a shared memory segment
shm_detach — Disconnects from shared memory segment
shm_remove — Removes shared memory from Unix systems
shm_put_var — Inserts or updates a variable in shared + memory
shm_get_var — Returns a variable from shared memory +
shm_remove_var — Removes a variable from shared memory +

PrevHomeNext
satellite_exception_valueUpsem_get
\ No newline at end of file diff --git a/ref.session.html b/ref.session.html new file mode 100644 index 0000000..fb30a24 --- /dev/null +++ b/ref.session.html @@ -0,0 +1,837 @@ +Session handling functions
PHP Manual
PrevNext

LX. Session handling functions

Session support in PHP consists of a way to preserve certain data + across subsequent accesses. This enables you to build more + customized applications and increase the appeal of your web site. +

If you are familiar with the session management of PHPLIB, you + will notice that some concepts are similar to PHP's session + support. +

A visitor accessing your web site is assigned an unique id, the + so-called session id. This is either stored in a cookie on the + user side or is propagated in the URL. +

The session support allows you to register arbitrary numbers of + variables to be preserved across requests. When a visitor accesses + your site, PHP will check automatically (if session.auto_start is + set to 1) or on your request (explicitly through + session_start() or implicitly through + session_register()) whether a specific session + id has been sent with the request. If this is the case, the prior + saved environment is recreated. +

All registered variables are serialized after the request + finishes. Registered variables which are undefined are marked as + being not defined. On subsequent accesses, these are not defined + by the session module unless the user defines them later. +

The track_vars and + register_globals + configuration settings influence how the session variables get + stored and restored. +

Note: + As of PHP 4.0.3, track_vars is + always turned on. +

If track_vars is + enabled and register_globals + is disabled, only members of the global associative array + $HTTP_SESSION_VARS can be registered as session variables. The + restored session variables will only be available in the array + $HTTP_SESSION_VARS. +

Example 1. + Registering a variable with track_vars + enabled +


<?php
+session_register("count");
+$HTTP_SESSION_VARS["count"]++;
+?>
+     
+

If register_globals + is enabled, then all global variables can be registered as session + variables and the session variables will be restored to + corresponding global variables. +

Example 2. + Registering a variable with register_globals + enabled +


<?php
+session_register("count");
+$count++;
+?>
+     
+

If both track_vars and + register_globals + are enabled, then the globals variables and the $HTTP_SESSION_VARS + entries will reference the same value. +

There are two methods to propagate a session id: +

  • Cookies +

  • URL parameter +

+

The session module supports both methods. Cookies are optimal, but + since they are not reliable (clients are not bound to accept + them), we cannot rely on them. The second method embeds the + session id directly into URLs. +

PHP is capable of doing this transparently when compiled with + --enable-trans-sid. If you enable this option, + relative URIs will be changed to contain the session id + automatically. Alternatively, you can use the constant + SID which is defined, if the client did not + send the appropriate cookie. SID is either of + the form session_name=session_id or is an empty + string. +

The following example demonstrates how to register a variable, and + how to link correctly to another page using SID. +

Example 3. Counting the number of hits of a single user


<?php
+session_register ("count");
+$count++;
+?>
+
+Hello visitor, you have seen this page <? echo $count; ?> times.<p>
+
+<php?
+# the <?=SID?> is necessary to preserve the session id
+# in the case that the user has disabled cookies
+?>
+
+To continue, <A HREF="nextpage.php?<?=SID?>">click here</A>
+     
+

The <?=SID?> is not necessary, if + --enable-trans-sid was used to compile PHP. +

To implement database storage, or any other storage method, you + will need to use session_set_save_handler() to + create a set of user-level storage functions. +

The session management system supports a number of configuration + options which you can place in your php.ini file. We will give a + short overview. +

  • session.save_handler defines the name of the + handler which is used for storing and retrieving data + associated with a session. Defaults to + files. +

  • session.save_path defines the argument which + is passed to the save handler. If you choose the default files + handler, this is the path where the files are created. + Defaults to /tmp. +

  • session.name specifies the name of the + session which is used as cookie name. It should only contain + alphanumeric characters. Defaults to + PHPSESSID. +

  • session.auto_start specifies whether the + session module starts a session automatically on request + startup. Defaults to 0 (disabled). +

  • session.cookie_lifetime specifies the lifetime of + the cookie in seconds which is sent to the browser. The value 0 + means "until the browser is closed." Defaults to + 0. +

  • session.serialize_handler defines the name + of the handler which is used to serialize/deserialize + data. Currently, a PHP internal format (name + php) and WDDX is supported (name + wddx). WDDX is only available, if PHP is + compiled with WDDX + support. Defaults to php. +

  • session.gc_probability specifies the + probability that the gc (garbage collection) routine is started + on each request in percent. Defaults to 1. +

  • session.gc_maxlifetime specifies the number + of seconds after which data will be seen as 'garbage' and + cleaned up. +

  • session.referer_check contains the substring you + want to check each HTTP Referer for. If the Referer was sent by the + client and the substring was not found, the embedded session id will + be marked as invalid. Defaults to the empty string. +

  • session.entropy_file gives a path to an + external resource (file) which will be used as an additional + entropy source in the session id creation process. Examples are + /dev/random or + /dev/urandom which are available on many + Unix systems. +

  • session.entropy_length specifies the number + of bytes which will be read from the file specified + above. Defaults to 0 (disabled). +

  • session.use_cookies specifies whether the + module will use cookies to store the session id on the client + side. Defaults to 1 (enabled). +

  • session.cookie_path specifies path to set + in session_cookie. Defaults to /. +

  • session.cookie_domain specifies domain to + set in session_cookie. Default is none at all. +

  • session.cache_limiter specifies cache control + method to use for session pages (nocache/private/public). + Defaults to nocache. +

  • session.cache_expire specifies time-to-live + for cached session pages in minutes, this has no effect for + nocache limiter. Defaults to 180. +

+

Note: + Session handling was added in PHP 4.0. +

+

Table of Contents
session_start — Initialize session data
session_destroy — Destroys all data registered to a session
session_name — Get and/or set the current session name
session_module_name — Get and/or set the current session module
session_save_path — Get and/or set the current session save path
session_id — Get and/or set the current session id
session_register — + Register one or more variables with the current session +
session_unregister — + Unregister a variable from the current session +
session_unset — + Free all session variables +
session_is_registered — + Find out if a variable is registered in a session +
session_get_cookie_params — + Get the session cookie parameters +
session_set_cookie_params — + Set the session cookie parameters +
session_decode — Decodes session data from a string
session_encode — + Encodes the current session data as a string +
session_set_save_handler — + Sets user-level session storage functions +
session_cache_limiter — Get and/or set the current cache limiter

PrevHomeNext
shm_remove_varUpsession_start
\ No newline at end of file diff --git a/ref.shmop.html b/ref.shmop.html new file mode 100644 index 0000000..93a8af8 --- /dev/null +++ b/ref.shmop.html @@ -0,0 +1,260 @@ +Shared Memory Functions
PHP Manual
PrevNext

LXI. Shared Memory Functions

Shmop is an easy to use set of functions that allows php to read, + write, create and delete UNIX shared memory segments. The functions + will not work on windows, as it does not support shared memory. To + use shmop you will need to compile php with the --enable-shmop parameter + in your configure line. +

Example 1. Shared Memory Operations Overview


<?php
+   
+// Create 100 byte shared memory block with system id if 0xff3
+$shm_id = shm_open(0xff3, "c", 0644, 100);
+if(!$shm_id) {
+	echo "Couldn't create shared memory segment\n";
+}
+
+// Get shared memory block's size
+$shm_size = shm_size($shm_id);
+echo "SHM Block Size: ".$shm_size. " has been created.\n";
+
+// Lets write a test string into shared memory
+$shm_bytes_written = shm_write($shm_id, "my shared memory block", 0);
+if($shm_bytes_written != strlen("my shared memory block")) {
+	echo "Couldn't write the entire length of data\n";
+}
+
+// Now lets read the string back
+$my_string = shm_read($shm_id, 0, $shm_size);
+if(!$my_string) {
+	echo "Couldn't read from shared memory block\n";
+}
+echo "The data inside shared memory was: ".$my_string."\n";
+
+//Now lets delete the block and close the shared memory segment
+if(!shm_delete($shm_id)) {
+	echo "Couldn't mark shared memory block for deletion.
+}
+shm_close($shm_id);
+   
+?>
+     
+

Table of Contents
shm_open — Create or open shared memory block
shm_read — Read data from shared memory block
shm_write — Write data into shared memory block
shm_size — Get size of shared memory block
shm_delete — Delete shared memory block
shm_close — Close shared memory block

PrevHomeNext
session_cache_limiterUpshm_open
\ No newline at end of file diff --git a/ref.snmp.html b/ref.snmp.html new file mode 100644 index 0000000..d8c3021 --- /dev/null +++ b/ref.snmp.html @@ -0,0 +1,221 @@ +SNMP functions
PHP Manual
PrevNext

LXIII. SNMP functions

In order to use the SNMP functions on Unix you need to install the UCD SNMP package. On Windows these functions + are only available on NT and not on Win95/98.

Important: In order to use the UCD SNMP package, you need to define + NO_ZEROLENGTH_COMMUNITY to 1 before compiling it. After configuring UCD + SNMP, edit config.h and search for NO_ZEROLENGTH_COMMUNITY. Uncomment the + #define line. It should look like this afterwards:


#define NO_ZEROLENGTH_COMMUNITY 1
+    
+

If you see strange segmentation faults in combination with SNMP commands, + you did not follow the above instructions. If you do not want to recompile + UCD SNMP, you can compile PHP with the --enable-ucd-snmp-hack switch which + will work around the misfeature.

Table of Contents
snmpget — Fetch an SNMP object
snmpset — Set an SNMP object
snmpwalk — Fetch all the SNMP objects from an agent
snmpwalkoid — Query for a tree of information about a network entity +
snmp_get_quick_print — Fetch the current value of the UCD library's quick_print setting +
snmp_set_quick_print — Set the value of quick_print within the UCD SNMP library. +

PrevHomeNext
swf_posroundUpsnmpget
\ No newline at end of file diff --git a/ref.sockets.html b/ref.sockets.html new file mode 100644 index 0000000..23b3fd3 --- /dev/null +++ b/ref.sockets.html @@ -0,0 +1,424 @@ +Socket functions
PHP Manual
PrevNext

LXIV. Socket functions

The socket extension implements a low-level interface to the + socket communication functions, providing the possibility to act + as a socket server as well as a client. +

The socket functions described here are part of an extension to + PHP which must be enabled at compile time by giving the --enable-sockets option to + configure. +

For a more generic client-side socket interface, see + fsockopen() and + pfsockopen(). +

When using these functions, it is important to remember that while + many of them have identical names to their C counterparts, they + often have different declarations. Please be sure to read the + descriptions to avoid confusion. +

That said, those unfamiliar with socket programming can still find + a lot of useful material in the appropriate Unix man pages, and + there is a great deal of tutorial information on socket + programming in C on the web, much of which can be applied, with + slight modifications, to socket programming in PHP. +

Example 1. Socket example: Simple TCP/IP server

This example shows a simple talkback server. Change the + address and port variables + to suit your setup and execute. You may then connect to the + server with a command similar to: telnet 192.168.1.53 + 10000 (where the address and port match your + setup). Anything you type will then be output on the server + side, and echoed back to you. To disconnect, enter 'quit'. +


<?php
+error_reporting (E_ALL);
+
+/* Allow the script to hang around waiting for connections. */
+set_time_limit (0);
+
+$address = '192.168.1.53';
+$port = 10000;
+
+if (($sock = socket (AF_INET, SOCK_STREAM, 0)) < 0) {
+    echo "socket() failed: reason: " . strerror ($sock) . "\n";
+}
+
+if (($ret = bind ($sock, $address, $port)) < 0) {
+    echo "bind() failed: reason: " . strerror ($ret) . "\n";
+}
+
+if (($ret = listen ($sock, 5)) < 0) {
+    echo "listen() failed: reason: " . strerror ($ret) . "\n";
+}
+
+do {
+    if (($msgsock = accept_connect($sock)) < 0) {
+        echo "accept_connect() failed: reason: " . strerror ($msgsock) . "\n";
+        break;
+    }
+    do {
+        $buf = '';
+        $ret = read ($msgsock, $buf, 2048);
+        if ($ret < 0) {
+            echo "read() failed: reason: " . strerror ($ret) . "\n";
+            break 2;
+        }
+        if ($ret == 0) {
+            break 2;
+        }
+        $buf = trim ($buf);
+        if ($buf == 'quit') {
+            close ($msgsock);
+            break 2;
+        }
+        $talkback = "PHP: You said '$buf'.\n";
+        write ($msgsock, $talkback, strlen ($talkback));
+        echo "$buf\n";
+    } while (true);
+    close ($msgsock);
+} while (true);
+
+close ($sock);
+?>
+     
+

Example 2. Socket example: Simple TCP/IP client

This example shows a simple, one-shot HTTP client. It simply + connects to a page, submits a HEAD request, echoes the reply, + and exits. +


<?php
+error_reporting (E_ALL);
+
+echo "<h2>TCP/IP Connection</h2>\n";
+
+/* Get the port for the WWW service. */
+$service_port = getservbyname ('www', 'tcp');
+
+/* Get the IP address for the target host. */
+$address = gethostbyname ('www.php.net');
+
+/* Create a TCP/IP socket. */
+$socket = socket (AF_INET, SOCK_STREAM, 0);
+if ($socket < 0) {
+    echo "socket() failed: reason: " . strerror ($socket) . "\n";
+} else {
+    "socket() successful: " . strerror ($socket) . "\n";
+}
+
+echo "Attempting to connect to '$address' on port '$service_port'...";
+$result = connect ($socket, $address, $service_port);
+if ($result < 0) {
+    echo "connect() failed.\nReason: ($result) " . strerror($result) . "\n";
+} else {
+    echo "OK.\n";
+}
+
+$in = "HEAD / HTTP/1.0\r\n\r\n";
+$out = '';
+
+echo "Sending HTTP HEAD request...";
+write ($socket, $in, strlen ($in));
+echo "OK.\n";
+
+echo "Reading response:\n\n";
+while (read ($socket, $out, 2048)) {
+    echo $out;
+}
+
+echo "Closing socket...";
+close ($socket);
+echo "OK.\n\n";
+?>
+      
+

Table of Contents
accept_connect — Accepts a connection on a socket
bind — Binds a name to a socket
close — Closes a file descriptor
connect — Initiates a connection on a socket
listen — Listens for a connection on a socket
socket — Create a socket (endpoint for communication)
strerror — Return a string describing a socket error

PrevHomeNext
snmp_set_quick_printUpaccept_connect
\ No newline at end of file diff --git a/ref.solid.html b/ref.solid.html new file mode 100644 index 0000000..9519afd --- /dev/null +++ b/ref.solid.html @@ -0,0 +1,208 @@ +Solid functions
PHP Manual
PrevNext

LI. Solid functions

The Solid functions are deprecated, you probably want to use the + Unified ODBC functions instead.

Table of Contents
solid_close — close a Solid connection
solid_connect — connect to a Solid data source
solid_exec — execute a Solid query
solid_fetchrow — fetch row of data from Solid query
solid_fieldname — get name of column from Solid query
solid_fieldnum — get index of column from Solid query
solid_freeresult — free result memory from Solid query
solid_numfields — get number of fields in Solid result
solid_numrows — get number of rows in Solid result
solid_result — get data from Solid results

PrevHomeNext
snmp_set_quick_printUpsolid_close
\ No newline at end of file diff --git a/ref.strings.html b/ref.strings.html new file mode 100644 index 0000000..dd643ff --- /dev/null +++ b/ref.strings.html @@ -0,0 +1,612 @@ +String functions
PHP Manual
PrevNext

LXV. String functions

These functions all manipulate strings in various ways. Some more + specialized sections can be found in the regular expression and + URL handling sections. +

For information on how strings behave, especially with regard to + usage of single quotes, double quotes, and escape sequences, see + the Strings entry in + the Types section of the + manual. +

Table of Contents
AddCSlashes — Quote string with slashes in a C style
AddSlashes — Quote string with slashes
bin2hex — + Convert binary data into hexadecimal representation +
Chop — Remove trailing whitespace
Chr — Return a specific character
chunk_split — Split a string into smaller chunks
convert_cyr_string — + Convert from one Cyrillic character set to another +
count_chars — + Return information abouts characters used in a string +
crc32 — Calculates the crc32 polynomial of a string
crypt — DES-encrypt a string
echo — Output one or more strings
explode — Split a string by string
get_html_translation_table — + Returns the translation table used by + htmlspecialchars() and + htmlentities() +
get_meta_tags — + Extracts all meta tag content attributes from a file and returns + an array +
hebrev — + Convert logical Hebrew text to visual text +
hebrevc — + Convert logical Hebrew text to visual text with newline conversion +
htmlentities — + Convert all applicable characters to HTML entities +
htmlspecialchars — + Convert special characters to HTML entities +
implode — Join array elements with a string
join — Join array elements with a string
levenshtein — + Calculate Levenshtein distance between two strings +
ltrim — + Strip whitespace from the beginning of a string +
md5 — Calculate the md5 hash of a string
Metaphone — Calculate the metaphone key of a string
nl2br — Converts newlines to HTML line breaks
Ord — Return ASCII value of character
parse_str — Parses the string into variables
print — Output a string
printf — Output a formatted string
quoted_printable_decode — + Convert a quoted-printable string to an 8 bit string +
quotemeta — Quote meta characters
rtrim — Remove trailing whitespace.
sscanf — Parses input from a string according to a format
setlocale — Set locale information
similar_text — + Calculate the similarity between two strings +
soundex — Calculate the soundex key of a string
sprintf — Return a formatted string
strcasecmp — + Binary safe case-insensitive string comparison +
strchr — + Find the first occurrence of a character +
strcmp — Binary safe string comparison
strcspn — + Find length of initial segment not matching mask +
strip_tags — Strip HTML and PHP tags from a string
stripcslashes — + Un-quote string quoted with addcslashes() +
stripslashes — + Un-quote string quoted with addslashes() +
stristr — + Case-insensitive strstr() +
strlen — Get string length
strnatcmp — + String comparisons using a "natural order" algorithm +
strnatcasecmp — + Case insensitive string comparisons using a "natural order" algorithm +
strncmp — + Binary safe string comparison of the first n characters +
str_pad — Pad a string to a certain length with another string
strpos — + Find position of first occurrence of a string +
strrchr — + Find the last occurrence of a character in a string +
str_repeat — Repeat a string
strrev — Reverse a string
strrpos — + Find position of last occurrence of a char in a string +
strspn — + Find length of initial segment matching mask +
strstr — Find first occurrence of a string
strtok — Tokenize string
strtolower — Make a string lowercase
strtoupper — Make a string uppercase
str_replace — + Replace all occurrences of needle in haystack with str +
strtr — Translate certain characters
substr — Return part of a string
substr_count — Count the number of substring occurrences
substr_replace — Replace text within a portion of a string
trim — + Strip whitespace from the beginning and end of a string +
ucfirst — Make a string's first character uppercase
ucwords — + Uppercase the first character of each word in a string +
wordwrap — + Wraps a string to a given number of characters using a string + break character. +

PrevHomeNext
strerrorUpAddCSlashes
\ No newline at end of file diff --git a/ref.swf.html b/ref.swf.html new file mode 100644 index 0000000..020786c --- /dev/null +++ b/ref.swf.html @@ -0,0 +1,665 @@ +Shockwave Flash functions
PHP Manual
PrevNext

LXII. Shockwave Flash functions

PHP offers the ability to create Shockwave Flash files via Paul + Haeberli's libswf module. You can download libswf at http://reality.sgi.com/grafica/flash/. Once you have libswf all you + need to do is to configure --with-swf[=DIR] where DIR is a location + containing the directories include and lib. The include directory + has to contain the swf.h file and the lib directory has to contain + the libswf.a file. If you unpack the libswf distribution the two + files will be in one directory. Consequently you will have to copy + the files to the proper location manually. +

Once you've successfully installed PHP with Shockwave Flash + support you can then go about creating Shockwave files from PHP. + You would be surprised at what you can do, take the following + code: +

Example 1. SWF example


<?php
+swf_openfile ("test.swf", 256, 256, 30, 1, 1, 1);
+swf_ortho2 (-100, 100, -100, 100);
+swf_defineline (1, -70, 0, 70, 0, .2);
+swf_definerect (4, 60, -10, 70, 0, 0);
+swf_definerect (5, -60, 0, -70, 10, 0);
+swf_addcolor (0, 0, 0, 0);
+
+swf_definefont (10, "Mod");
+swf_fontsize (5);
+swf_fontslant (10);
+swf_definetext (11, "This be Flash wit PHP!", 1);
+
+swf_pushmatrix ();
+swf_translate (-50, 80, 0);
+swf_placeobject (11, 60);
+swf_popmatrix ();
+
+for ($i = 0; $i < 30; $i++) {
+    $p = $i/(30-1);
+    swf_pushmatrix ();
+    swf_scale (1-($p*.9), 1, 1);
+    swf_rotate (60*$p,  'z');
+    swf_translate (20+20*$p, $p/1.5, 0);
+    swf_rotate (270*$p,  'z');
+    swf_addcolor ($p, 0, $p/1.2, -$p);
+    swf_placeobject (1, 50);
+    swf_placeobject (4, 50);
+    swf_placeobject (5, 50);
+    swf_popmatrix ();
+    swf_showframe ();
+}
+
+for ($i = 0; $i < 30; $i++) {
+    swf_removeobject (50);
+    if (($i%4) == 0) {
+        swf_showframe ();
+    }
+}
+
+swf_startdoaction ();
+swf_actionstop ();
+swf_enddoaction ();
+
+swf_closefile ();
+?>
+     
+ It will produce the animation found at the following url. +

Note: + SWF support was added in PHP 4 RC2. +

Table of Contents
swf_openfile — Open a new Shockwave Flash file
swf_closefile — Close the current Shockwave Flash file
swf_labelframe — Label the current frame
swf_showframe — Display the current frame
swf_setframe — Switch to a specified frame
swf_getframe — Get the frame number of the current frame
swf_mulcolor — + Sets the global multiply color to the rgba value specified +
swf_addcolor — + Set the global add color to the rgba value specified +
swf_placeobject — Place an object onto the screen
swf_modifyobject — Modify an object
swf_removeobject — Remove an object
swf_nextid — Returns the next free object id
swf_startdoaction — + Start a description of an action list for the current frame +
swf_actiongotoframe — Play a frame and then stop
swf_actiongeturl — Get a URL from a Shockwave Flash movie
swf_actionnextframe — Go foward one frame
swf_actionprevframe — Go backwards one frame
swf_actionplay — + Start playing the flash movie from the current frame +
swf_actionstop — + Stop playing the flash movie at the current frame +
swf_actiontogglequality — + Toggle between low and high quality +
swf_actionwaitforframe — + Skip actions if a frame has not been loaded +
swf_actionsettarget — Set the context for actions
swf_actiongotolabel — + Display a frame with the specified label +
swf_enddoaction — End the current action
swf_defineline — Define a line
swf_definerect — Define a rectangle
swf_definepoly — + Define a polygon +
swf_startshape — Start a complex shape
swf_shapelinesolid — Set the current line style
swf_shapefilloff — Turns off filling
swf_shapefillsolid — + Set the current fill style to the specified color +
swf_shapefillbitmapclip — + Set current fill mode to clipped bitmap +
swf_shapefillbitmaptile — + Set current fill mode to tiled bitmap +
swf_shapemoveto — Move the current position
swf_shapelineto — Draw a line
swf_shapecurveto — + Draw a quadratic bezier curve between two points +
swf_shapecurveto3 — Draw a cubic bezier curve
swf_shapearc — Draw a circular arc
swf_endshape — + Completes the definition of the current shape +
swf_definefont — + Defines a font +
swf_setfont — Change the current font
swf_fontsize — Change the font size
swf_fontslant — Set the font slant
swf_fonttracking — Set the current font tracking
swf_getfontinfo — + The height in pixels of a capital A and a lowercase x +
swf_definetext — Define a text string
swf_textwidth — Get the width of a string
swf_definebitmap — Define a bitmap
swf_getbitmapinfo — Get information about a bitmap
swf_startsymbol — Define a symbol
swf_endsymbol — End the definition of a symbol
swf_startbutton — Start the definition of a button
swf_addbuttonrecord — + Controls location, appearance and active area of the current button +
swf_oncondition — + Describe a transition used to trigger an action list +
swf_endbutton — + End the definition of the current button +
swf_viewport — Select an area for future drawing
swf_ortho — + Defines an orthographic mapping of user coordinates onto the + current viewport +
swf_ortho2 — + Defines 2D orthographic mapping of user coordinates onto the + current viewport +
swf_perspective — + Define a perspective projection transformation +
swf_polarview — + Define the viewer's position with polar coordinates +
swf_lookat — Define a viewing transformation
swf_pushmatrix — + Push the current transformation matrix back unto the stack +
swf_popmatrix — + Restore a previous transformation matrix +
swf_scale — Scale the current transformation
swf_translate — Translate the current transformations
swf_rotate — Rotate the current transformation
swf_posround — + Enables or Disables the rounding of the translation when objects + are placed or moved +

PrevHomeNext
shm_closeUpswf_openfile
\ No newline at end of file diff --git a/ref.sybase.html b/ref.sybase.html new file mode 100644 index 0000000..3746257 --- /dev/null +++ b/ref.sybase.html @@ -0,0 +1,229 @@ +Sybase functions
PHP Manual
PrevNext

LXVI. Sybase functions

Table of Contents
sybase_affected_rows — get number of affected rows in last query
sybase_close — close Sybase connection
sybase_connect — open Sybase server connection
sybase_data_seek — move internal row pointer
sybase_fetch_array — fetch row as array
sybase_fetch_field — get field information
sybase_fetch_object — fetch row as object
sybase_fetch_row — get row as enumerated array
sybase_field_seek — set field offset
sybase_free_result — free result memory
sybase_num_fields — get number of fields in result
sybase_num_rows — get number of rows in result
sybase_pconnect — open persistent Sybase connection
sybase_query — send Sybase query
sybase_result — get result data
sybase_select_db — select Sybase database

PrevHomeNext
wordwrapUpsybase_affected_rows
\ No newline at end of file diff --git a/ref.url.html b/ref.url.html new file mode 100644 index 0000000..0727bbd --- /dev/null +++ b/ref.url.html @@ -0,0 +1,184 @@ +URL Functions
PHP Manual
PrevNext

LXVII. URL Functions

Table of Contents
base64_decode — Decodes data encoded with MIME base64
base64_encode — Encodes data with MIME base64
parse_url — Parse a URL and return its components
rawurldecode — Decode URL-encoded strings
rawurlencode — URL-encode according to RFC1738
urldecode — Decodes URL-encoded string
urlencode — URL-encodes string

PrevHomeNext
sybase_select_dbUpbase64_decode
\ No newline at end of file diff --git a/ref.var.html b/ref.var.html new file mode 100644 index 0000000..6787a9e --- /dev/null +++ b/ref.var.html @@ -0,0 +1,281 @@ +Variable Functions
PHP Manual
PrevNext

LXVIII. Variable Functions

Table of Contents
doubleval — Get double value of a variable
empty — Determine whether a variable is set
gettype — Get the type of a variable
intval — Get integer value of a variable
is_array — Finds whether a variable is an array
is_bool — + Finds out whether a variable is a boolean +
is_double — Finds whether a variable is a double
is_float — Finds whether a variable is a float
is_int — Find whether a variable is an integer
is_integer — Find whether a variable is an integer
is_long — Finds whether a variable is an integer
is_numeric — + Finds whether a variable is a number or a numeric string +
is_object — Finds whether a variable is an object
is_real — Finds whether a variable is a real
is_resource — + Finds whether a variable is a resource +
is_string — Finds whether a variable is a string
isset — Determine whether a variable is set
print_r — + Prints human-readable information about a variable +
serialize — + Generates a storable representation of a value +
settype — Set the type of a variable
strval — Get string value of a variable
unserialize — + Creates a PHP value from a stored representation +
unset — Unset a given variable
var_dump — Dumps information about a variable

PrevHomeNext
urlencodeUpdoubleval
\ No newline at end of file diff --git a/ref.vmailmgr.html b/ref.vmailmgr.html new file mode 100644 index 0000000..5233961 --- /dev/null +++ b/ref.vmailmgr.html @@ -0,0 +1,274 @@ +Vmailmgr functions
PHP Manual
PrevNext

LXIX. Vmailmgr functions

These functions require qmail and the + vmailmgr package by Bruce Guenter.

For all functions, the following two variables are defined as: + string vdomain the domain name of your virtual domain + (vdomain.com) string basepwd the password of the 'real' user that + holds the virtual users

Only up to 8 characters are recognized in passwords for virtual + users

Return status for all functions matches response in response.h

+

O ok
1 bad
2 error
3 error connecting

Known problems: vm_deluser() does not delete + the user directory as it should. vm_addalias() + currently does not work correctly.


<?php
+dl("php3_vmailmgr.so"); //load the shared library
+$vdomain="vdomain.com";
+$basepwd="password";
+?>
+      

Table of Contents
vm_adduser — Add a new virtual user with a password
vm_addalias — Add an alias to a virtual user
vm_passwd — Changes a virtual users password
vm_delalias — Removes an alias
vm_deluser — Removes a virtual user

PrevHomeNext
var_dumpUpvm_adduser
\ No newline at end of file diff --git a/ref.wddx.html b/ref.wddx.html new file mode 100644 index 0000000..22dbf1e --- /dev/null +++ b/ref.wddx.html @@ -0,0 +1,339 @@ +WDDX functions
PHP Manual
PrevNext

LXX. WDDX functions

These functions are intended for work with WDDX.

Note that all the functions that serialize variables use the first + element of an array to determine whether the array is to be + serialized into an array or structure. If the first element has + string key, then it is serialized into a structure, otherwise, + into an array. + +

Example 1. Serializing a single value


<?php
+print wddx_serialize_value("PHP to WDDX packet example", "PHP packet");
+?>
+     

This example will produce: +


<wddxPacket version='1.0'><header comment='PHP packet'/><data>
+<string>PHP to WDDX packet example</string></data></wddxPacket>
+     

+ +

Example 2. Using incremental packets


<?php
+$pi = 3.1415926;
+$packet_id = wddx_packet_start("PHP");
+wddx_add_vars($packet_id, "pi");
+
+/* Suppose $cities came from database */
+$cities = array("Austin", "Novato", "Seattle");
+wddx_add_vars($packet_id, "cities");
+
+$packet = wddx_packet_end($packet_id);
+print $packet;
+?>
+     

This example will produce: + +


<wddxPacket version='1.0'><header comment='PHP'/><data><struct>
+<var name='pi'><number>3.1415926</number></var><var name='cities'>
+<array length='3'><string>Austin</string><string>Novato</string>
+<string>Seattle</string></array></var></struct></data></wddxPacket>
+     

Table of Contents
wddx_serialize_value — Serialize a single value into a WDDX packet
wddx_serialize_vars — Serialize variables into a WDDX packet
wddx_packet_start — Starts a new WDDX packet with structure inside it
wddx_packet_end — Ends a WDDX packet with the specified ID
wddx_add_vars — Ends a WDDX packet with the specified ID
wddx_deserialize — Deserializes a WDDX packet

PrevHomeNext
vm_deluserUpwddx_serialize_value
\ No newline at end of file diff --git a/ref.xml.html b/ref.xml.html new file mode 100644 index 0000000..96b91a5 --- /dev/null +++ b/ref.xml.html @@ -0,0 +1,1335 @@ +XML parser functions
PHP Manual
PrevNext

LXXI. XML parser functions

Introduction

About XML

XML (eXtensible Markup Language) is a data format for structured + document interchange on the Web. It is a standard defined by + The World Wide Web consortium (W3C). Information about XML and + related technologies can be found at http://www.w3.org/XML/. +

Installation

This extension uses expat, which can + be found at http://www.jclark.com/xml/. The + Makefile that comes with expat does not build a library by + default, you can use this make rule for that: +

libexpat.a: $(OBJS)
+	ar -rc $@ $(OBJS)
+	ranlib $@
+      
+ A source RPM package of expat can be found at http://www.guardian.no/~ssb/phpxml.html. +

Note that if you are using Apache-1.3.7 or later, you already + have the required expat library. Simply configure PHP using + --with-xml (without any + additional path) and it will automatically use the expat library + built into Apache. +

On UNIX, run configure with the --with-xml option. The + expat library should be installed + somewhere your compiler can find it. If you compile PHP as a + module for Apache 1.3.9 or later, PHP will automatically use the + bundled expat library from Apache. + You may need to set CPPFLAGS and + LDFLAGS in your environment before running + configure if you have installed expat somewhere exotic. +

Build PHP. Tada! That should be it. +

About This Extension

This PHP extension implements support for James Clark's + expat in PHP. This toolkit lets you + parse, but not validate, XML documents. It supports three + source character encodings + also provided by PHP: US-ASCII, + ISO-8859-1 and UTF-8. + UTF-16 is not supported. +

This extension lets you create XML parsers + and then define handlers for different XML + events. Each XML parser also has a few parameters you + can adjust. +

The XML event handlers defined are: +

Table 1. Supported XML handlers

PHP function to set handlerEvent description
xml_set_element_handler() Element events are issued whenever the XML parser + encounters start or end tags. There are separate handlers + for start tags and end tags. +
xml_set_character_data_handler() + Character data is roughly all the non-markup contents of + XML documents, including whitespace between tags. Note + that the XML parser does not add or remove any whitespace, + it is up to the application (you) to decide whether + whitespace is significant. +
xml_set_processing_instruction_handler() + PHP programmers should be familiar with processing + instructions (PIs) already. <?php ?> is a processing + instruction, where php is called + the "PI target". The handling of these are + application-specific, except that all PI targets starting + with "XML" are reserved. +
xml_set_default_handler() What goes not to another handler goes to the default + handler. You will get things like the XML and document + type declarations in the default handler. +
xml_set_unparsed_entity_decl_handler() + This handler will be called for declaration of an unparsed + (NDATA) entity. +
xml_set_notation_decl_handler() + This handler is called for declaration of a notation. +
xml_set_external_entity_ref_handler() + This handler is called when the XML parser finds a + reference to an external parsed general entity. This can + be a reference to a file or URL, for example. See the external entity + example for a demonstration. +
+

Case Folding

The element handler functions may get their element names + case-folded. Case-folding is defined by + the XML standard as "a process applied to a sequence of + characters, in which those identified as non-uppercase are + replaced by their uppercase equivalents". In other words, when + it comes to XML, case-folding simply means uppercasing. +

By default, all the element names that are passed to the handler + functions are case-folded. This behaviour can be queried and + controlled per XML parser with the + xml_parser_get_option() and + xml_parser_set_option() functions, + respectively. +

Error Codes

The following constants are defined for XML error codes (as + returned by xml_parse()): +

XML_ERROR_NONE
XML_ERROR_NO_MEMORY
XML_ERROR_SYNTAX
XML_ERROR_NO_ELEMENTS
XML_ERROR_INVALID_TOKEN
XML_ERROR_UNCLOSED_TOKEN
XML_ERROR_PARTIAL_CHAR
XML_ERROR_TAG_MISMATCH
XML_ERROR_DUPLICATE_ATTRIBUTE
XML_ERROR_JUNK_AFTER_DOC_ELEMENT
XML_ERROR_PARAM_ENTITY_REF
XML_ERROR_UNDEFINED_ENTITY
XML_ERROR_RECURSIVE_ENTITY_REF
XML_ERROR_ASYNC_ENTITY
XML_ERROR_BAD_CHAR_REF
XML_ERROR_BINARY_ENTITY_REF
XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF
XML_ERROR_MISPLACED_XML_PI
XML_ERROR_UNKNOWN_ENCODING
XML_ERROR_INCORRECT_ENCODING
XML_ERROR_UNCLOSED_CDATA_SECTION
XML_ERROR_EXTERNAL_ENTITY_HANDLING

+

Character Encoding

PHP's XML extension supports the Unicode character set through + different character encodings. There are + two types of character encodings, source + encoding and target encoding. + PHP's internal representation of the document is always encoded + with UTF-8. +

Source encoding is done when an XML document is parsed. Upon creating an XML + parser, a source encoding can be specified (this encoding + can not be changed later in the XML parser's lifetime). The + supported source encodings are ISO-8859-1, + US-ASCII and UTF-8. The + former two are single-byte encodings, which means that each + character is represented by a single byte. + UTF-8 can encode characters composed by a + variable number of bits (up to 21) in one to four bytes. The + default source encoding used by PHP is + ISO-8859-1. +

Target encoding is done when PHP passes data to XML handler + functions. When an XML parser is created, the target encoding + is set to the same as the source encoding, but this may be + changed at any point. The target encoding will affect character + data as well as tag names and processing instruction targets. +

If the XML parser encounters characters outside the range that + its source encoding is capable of representing, it will return + an error. +

If PHP encounters characters in the parsed XML document that can + not be represented in the chosen target encoding, the problem + characters will be "demoted". Currently, this means that such + characters are replaced by a question mark. +

Some Examples

Here are some example PHP scripts parsing XML documents. +

XML Element Structure Example

This first example displays the stucture of the start elements in + a document with indentation. +

Example 1. Show XML Element Structure


$file = "data.xml";
+$depth = array();
+
+function startElement($parser, $name, $attrs) {
+    global $depth;
+    for ($i = 0; $i < $depth[$parser]; $i++) {
+        print "  ";
+    }
+    print "$name\n";
+    $depth[$parser]++;
+}
+
+function endElement($parser, $name) {
+    global $depth;
+    $depth[$parser]--;
+}
+
+$xml_parser = xml_parser_create();
+xml_set_element_handler($xml_parser, "startElement", "endElement");
+if (!($fp = fopen($file, "r"))) {
+    die("could not open XML input");
+}
+
+while ($data = fread($fp, 4096)) {
+    if (!xml_parse($xml_parser, $data, feof($fp))) {
+        die(sprintf("XML error: %s at line %d",
+                    xml_error_string(xml_get_error_code($xml_parser)),
+                    xml_get_current_line_number($xml_parser)));
+    }
+}
+xml_parser_free($xml_parser);
+       
+

XML Tag Mapping Example

Example 2. Map XML to HTML

This example maps tags in an XML document directly to HTML + tags. Elements not found in the "map array" are ignored. Of + course, this example will only work with a specific XML + document type. +

$file = "data.xml";
+$map_array = array(
+    "BOLD"     => "B",
+    "EMPHASIS" => "I",
+    "LITERAL"  => "TT"
+);
+
+function startElement($parser, $name, $attrs) {
+    global $map_array;
+    if ($htmltag = $map_array[$name]) {
+        print "<$htmltag>";
+    }
+}
+
+function endElement($parser, $name) {
+    global $map_array;
+    if ($htmltag = $map_array[$name]) {
+        print "</$htmltag>";
+    }
+}
+
+function characterData($parser, $data) {
+    print $data;
+}
+
+$xml_parser = xml_parser_create();
+// use case-folding so we are sure to find the tag in $map_array
+xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, true);
+xml_set_element_handler($xml_parser, "startElement", "endElement");
+xml_set_character_data_handler($xml_parser, "characterData");
+if (!($fp = fopen($file, "r"))) {
+    die("could not open XML input");
+}
+
+while ($data = fread($fp, 4096)) {
+    if (!xml_parse($xml_parser, $data, feof($fp))) {
+        die(sprintf("XML error: %s at line %d",
+                    xml_error_string(xml_get_error_code($xml_parser)),
+                    xml_get_current_line_number($xml_parser)));
+    }
+}
+xml_parser_free($xml_parser);
+	
+

+

XML External Entity Example

This example highlights XML code. It illustrates how to use an + external entity reference handler to include and parse other + documents, as well as how PIs can be processed, and a way of + determining "trust" for PIs containing code. +

XML documents that can be used for this example are found below + the example (xmltest.xml and + xmltest2.xml.) +

Example 3. External Entity Example


$file = "xmltest.xml";
+
+function trustedFile($file) {
+    // only trust local files owned by ourselves
+    if (!eregi("^([a-z]+)://", $file) 
+        && fileowner($file) == getmyuid()) {
+            return true;
+    }
+    return false;
+}
+
+function startElement($parser, $name, $attribs) {
+    print "&lt;<font color=\"#0000cc\">$name</font>";
+    if (sizeof($attribs)) {
+        while (list($k, $v) = each($attribs)) {
+            print " <font color=\"#009900\">$k</font>=\"<font 
+                   color=\"#990000\">$v</font>\"";
+        }
+    }
+    print "&gt;";
+}
+
+function endElement($parser, $name) {
+    print "&lt;/<font color=\"#0000cc\">$name</font>&gt;";
+}
+
+function characterData($parser, $data) {
+    print "<b>$data</b>";
+}
+
+function PIHandler($parser, $target, $data) {
+    switch (strtolower($target)) {
+        case "php":
+            global $parser_file;
+            // If the parsed document is "trusted", we say it is safe
+            // to execute PHP code inside it.  If not, display the code
+            // instead.
+            if (trustedFile($parser_file[$parser])) {
+                eval($data);
+            } else {
+                printf("Untrusted PHP code: <i>%s</i>", 
+                        htmlspecialchars($data));
+            }
+            break;
+    }
+}
+
+function defaultHandler($parser, $data) {
+    if (substr($data, 0, 1) == "&" && substr($data, -1, 1) == ";") {
+        printf('<font color="#aa00aa">%s</font>', 
+                htmlspecialchars($data));
+    } else {
+        printf('<font size="-1">%s</font>', 
+                htmlspecialchars($data));
+    }
+}
+
+function externalEntityRefHandler($parser, $openEntityNames, $base, $systemId,
+                                  $publicId) {
+    if ($systemId) {
+        if (!list($parser, $fp) = new_xml_parser($systemId)) {
+            printf("Could not open entity %s at %s\n", $openEntityNames,
+                   $systemId);
+            return false;
+        }
+        while ($data = fread($fp, 4096)) {
+            if (!xml_parse($parser, $data, feof($fp))) {
+                printf("XML error: %s at line %d while parsing entity %s\n",
+                       xml_error_string(xml_get_error_code($parser)),
+                       xml_get_current_line_number($parser), $openEntityNames);
+                xml_parser_free($parser);
+                return false;
+            }
+        }
+        xml_parser_free($parser);
+        return true;
+    }
+    return false;
+}
+
+
+function new_xml_parser($file) {
+    global $parser_file;
+
+    $xml_parser = xml_parser_create();
+    xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, 1);
+    xml_set_element_handler($xml_parser, "startElement", "endElement");
+    xml_set_character_data_handler($xml_parser, "characterData");
+    xml_set_processing_instruction_handler($xml_parser, "PIHandler");
+    xml_set_default_handler($xml_parser, "defaultHandler");
+    xml_set_external_entity_ref_handler($xml_parser, "externalEntityRefHandler");
+    
+    if (!($fp = @fopen($file, "r"))) {
+        return false;
+    }
+    if (!is_array($parser_file)) {
+        settype($parser_file, "array");
+    }
+    $parser_file[$xml_parser] = $file;
+    return array($xml_parser, $fp);
+}
+
+if (!(list($xml_parser, $fp) = new_xml_parser($file))) {
+    die("could not open XML input");
+}
+
+print "<pre>";
+while ($data = fread($fp, 4096)) {
+    if (!xml_parse($xml_parser, $data, feof($fp))) {
+        die(sprintf("XML error: %s at line %d\n",
+                    xml_error_string(xml_get_error_code($xml_parser)),
+                    xml_get_current_line_number($xml_parser)));
+    }
+}
+print "</pre>";
+print "parse complete\n";
+xml_parser_free($xml_parser);
+
+?>
+       
+

Example 4. xmltest.xml


<?xml version='1.0'?>
+<!DOCTYPE chapter SYSTEM "/just/a/test.dtd" [
+<!ENTITY plainEntity "FOO entity">
+<!ENTITY systemEntity SYSTEM "xmltest2.xml">
+]>
+<chapter>
+ <TITLE>Title &plainEntity;</TITLE>
+ <para>
+  <informaltable>
+   <tgroup cols="3">
+    <tbody>
+     <row><entry>a1</entry><entry morerows="1">b1</entry><entry>c1</entry></row>
+     <row><entry>a2</entry><entry>c2</entry></row>
+     <row><entry>a3</entry><entry>b3</entry><entry>c3</entry></row>
+    </tbody>
+   </tgroup>
+  </informaltable>
+ </para>
+ &systemEntity;
+ <sect1 id="about">
+  <title>About this Document</title>
+  <para>
+   <!-- this is a comment -->
+   <?php print 'Hi!  This is PHP version '.phpversion(); ?>
+  </para>
+ </sect1>
+</chapter>
+       
+

This file is included from xmltest.xml: +

Example 5. xmltest2.xml


<?xml version="1.0"?>
+<!DOCTYPE foo [
+<!ENTITY testEnt "test entity">
+]>
+<foo>
+   <element attrib="value"/>
+   &testEnt;
+   <?php print "This is some more PHP code being executed."; ?>
+</foo>
+       
+

Table of Contents
xml_parser_create — create an XML parser
xml_set_object — Use XML Parser within an object
xml_set_element_handler — set up start and end element handlers
xml_set_character_data_handler — set up character data handler
xml_set_processing_instruction_handler — + Set up processing instruction (PI) handler +
xml_set_default_handler — set up default handler
xml_set_unparsed_entity_decl_handler — + Set up unparsed entity declaration handler +
xml_set_notation_decl_handler — set up notation declaration handler
xml_set_external_entity_ref_handler — set up external entity reference handler
xml_parse — start parsing an XML document
xml_get_error_code — get XML parser error code
xml_error_string — get XML parser error string
xml_get_current_line_number — get current line number for an XML parser
xml_get_current_column_number — + Get current column number for an XML parser +
xml_get_current_byte_index — get current byte index for an XML parser
xml_parse_into_struct — Parse XML data into an array structure
xml_parser_free — Free an XML parser
xml_parser_set_option — set options in an XML parser
xml_parser_get_option — get options from an XML parser
utf8_decode — + Converts a string with ISO-8859-1 characters encoded with UTF-8 + to single-byte ISO-8859-1. +
utf8_encode — encodes an ISO-8859-1 string to UTF-8

PrevHomeNext
wddx_deserializeUpxml_parser_create
\ No newline at end of file diff --git a/ref.yaz.html b/ref.yaz.html new file mode 100644 index 0000000..95707d1 --- /dev/null +++ b/ref.yaz.html @@ -0,0 +1,411 @@ +YAZ functions
PHP Manual
PrevNext

LXXII. YAZ functions

Introduction

This extension offers a PHP interface to the + YAZ toolkit that implements the Z39.50 + protocol for information retrieval. With this extension you can easily + implement a Z39.50 origin (client) that searches Z39.50 targets + (servers) in parallel. +

YAZ is available at http://www.indexdata.dk/yaz/. You can find news information, + example scripts, etc. for this extension at http://www.indexdata.dk/phpyaz/. +

The module hides most of the complexity of Z39.50 so it should be + fairly easy to use. It supports persistent stateless connections very + similar to those offered by the various SQL APIs that are available + for PHP. This means that sessions are stateless but shared amongst + users, thus saving the connect and initialize phase steps in most cases. +

Installation

Compile YAZ and install it. Build PHP with your favourite + modules and add option --with-yaz. Your task is roughly the + following: +


gunzip -c yaz-1.6.tar.gz|tar xf -
+gunzip -c php-4.0.X.tar.gz|tar xf -
+cd yaz-1.6
+./configure --prefix=/usr
+make
+make install
+cd ../php-4.0.X
+./configure --with-yaz=/usr/bin
+make
+make install
+    

+

Example

PHP/YAZ keeps track of connections with targets + (Z-Associations). A positive integer represents the ID of a + particular association. +

The script below demonstrates the parallel searching feature of + the API. When invoked with no arguments it prints a query form; else + (arguments are supplied) it searches the targets as given in in array + host. +

Example 1. YAZ()


$num_hosts = count ($host);
+if (empty($term) || count($host) == 0) {
+    echo '<form method="get">
+    <input type="checkbox"
+    name="host[]" value="bagel.indexdata.dk/gils">
+        GILS test
+    <input type="checkbox"
+    name="host[]" value="localhost:9999/Default">
+        local test
+    <input type="checkbox" checked="1"
+    name="host[]" value="z3950.bell-labs.com/books">
+        BELL Labs Library
+    <br>
+    RPN Query:
+    <input type="text" size="30" name="term">
+    <input type="submit" name="action" value="Search">
+    ';        
+} else {
+    echo 'You searced for ' . htmlspecialchars($term) . '<br>';
+    for ($i = 0; $i < $num_hosts; $i++) {
+        $id[] = yaz_connect($host[$i]);
+        yaz_syntax($id[$i],"sutrs");
+        yaz_search($id[$i],"rpn",$term);
+    }
+    yaz_wait();
+    for ($i = 0; $i < $num_hosts; $i++) {
+        echo '<hr>' . $host[$i] . ":";
+        $error = yaz_error($id[$i]);
+        if (!empty($error)) {
+            echo "Error: $error";
+        } else {
+            $hits = yaz_hits($id[$i]);
+            echo "Result Count $hits";
+        }
+        echo '<dl>';
+        for ($p = 1; $p <= 10; $p++) {
+            $rec = yaz_record($id[$i],$p,"string");
+            if (empty($rec)) continue;
+            echo "<dt><b>$p</b></dt><dd>";
+            echo ereg_replace("\n", "<br>\n",$rec);
+            echo "</dd>";
+        }
+        echo '</dl>';
+    }
+}
+    
+

Table of Contents
yaz_addinfo — Returns additional error information
yaz_close — Closes a YAZ connection
yaz_connect — + Returns a positive association ID on success; zero on failure +
yaz_errno — Returns error number
yaz_error — Returns error description
yaz_hits — Returns number of hits for last search
yaz_range — + Specifies the maximum number of records to retrieve +
yaz_record — Returns a record
yaz_search — Prepares for a search
yaz_syntax — + Specifies the object identifier (OID) for the preferred record syntax + for retrieval. +
yaz_wait — Executes queries

PrevHomeNext
utf8_encodeUpyaz_addinfo
\ No newline at end of file diff --git a/ref.zlib.html b/ref.zlib.html new file mode 100644 index 0000000..39c4aca --- /dev/null +++ b/ref.zlib.html @@ -0,0 +1,341 @@ +Zlib Compression Functions
PHP Manual
PrevNext

LXXIV. Zlib Compression Functions

This module uses the functions of zlib by Jean-loup Gailly and Mark Adler to + transparently read and write gzip (.gz) compressed files. You have + to use a zlib version >= 1.0.9 with this module. +

This module contains versions of most of the filesystem functions which work + with gzip-compressed files (and uncompressed files, too, but not + with sockets). +

Small code example

Opens a temporary file and writes a test string to it, then it + prints out the content of this file twice. +

Example 1. Small Zlib Example


<?php
+
+$filename = tempnam ('/tmp', 'zlibtest').'.gz';
+print "<html>\n<head></head>\n<body>\n<pre>\n";
+$s = "Only a test, test, test, test, test, test, test, test!\n";
+
+// open file for writing with maximum compression
+$zp = gzopen($filename, "w9");
+
+// write string to file
+gzwrite($zp, $s);
+
+// close file
+gzclose($zp);
+
+// open file for reading
+$zp = gzopen($filename, "r");
+
+// read 3 char
+print gzread($zp, 3);
+
+// output until end of the file and close it.
+gzpassthru($zp);
+
+print "\n";
+
+// open file and print content (the 2nd time).
+if (readgzfile($filename) != strlen($s)) {
+        echo "Error with zlib functions!";
+}
+unlink($filename);
+print "</pre>\n</h1></body>\n</html>\n";
+
+?>
+     
Table of Contents
gzclose — Close an open gz-file pointer
gzeof — Test for end-of-file on a gz-file pointer
gzfile — Read entire gz-file into an array
gzgetc — Get character from gz-file pointer
gzgets — Get line from file pointer
gzgetss — + Get line from gz-file pointer and strip HTML tags +
gzopen — Open gz-file
gzpassthru — + Output all remaining data on a gz-file pointer +
gzputs — Write to a gz-file pointer
gzread — Binary-safe gz-file read
gzrewind — Rewind the position of a gz-file pointer
gzseek — Seek on a gz-file pointer
gztell — Tell gz-file pointer read/write position
gzwrite — Binary-safe gz-file write
readgzfile — Output a gz-file
gzcompress — Gz-compress a string
gzuncompress — Uncompress a gz-compressed string

PrevHomeNext
yp_nextUpgzclose
\ No newline at end of file diff --git a/security.apache.html b/security.apache.html new file mode 100644 index 0000000..231a085 --- /dev/null +++ b/security.apache.html @@ -0,0 +1,142 @@ +Apache module
PHP Manual
PrevChapter 4. SecurityNext

Apache module

When PHP is used as an Apache module it inherits Apache's user + permissions (typically those of the "nobody" + user). +


PrevHomeNext
SecurityUpLanguage Reference
\ No newline at end of file diff --git a/security.html b/security.html new file mode 100644 index 0000000..1de0bf6 --- /dev/null +++ b/security.html @@ -0,0 +1,574 @@ +Security
PHP Manual
PrevNext

Chapter 4. Security

Table of Contents
CGI binary
Apache module

PHP is a powerful language and the interpreter, whether included + in a web server as a module or executed as a separate + CGI binary, is able to access files, execute + commands and open network connections on the server. These + properties make anything run on a web server insecure by default. + PHP is designed specifically to be a more secure language for + writing CGI programs than Perl or C, and with correct selection of + compile-time and runtime configuration options it gives you + exactly the combination of freedom and security you need. +

As there are many different ways of utilizing PHP, there are many + configuration options controlling its behaviour. A large + selection of options guarantees you can use PHP for a lot of + purposes, but it also means there are combinations of these + options and server configurations that result in an insecure + setup. This chapter explains the different configuration option + combinations and the situations they can be safely used. +

CGI binary

Possible attacks

Using PHP as a CGI binary is an option for + setups that for some reason do not wish to integrate PHP as a + module into server software (like Apache), or will use PHP with + different kinds of CGI wrappers to create safe chroot and setuid + environments for scripts. This setup usually involves installing + executable PHP binary to the web server cgi-bin directory. CERT + advisory CA-96.11 recommends + against placing any interpreters into cgi-bin. Even if the PHP + binary can be used as a standalone interpreter, PHP is designed + to prevent the attacks this setup makes possible: +

  • Accessing system files: http://my.host/cgi-bin/php?/etc/passwd +

    The query information in a url after the question mark (?) is + passed as command line arguments to the interpreter by the CGI + interface. Usually interpreters open and execute the file + specified as the first argument on the command line. +

    When invoked as a CGI binary, PHP refuses to interpret the + command line arguments. +

  • Accessing any web document on server: http://my.host/cgi-bin/php/secret/doc.html +

    The path information part of the url after the PHP binary name, + /secret/doc.html is + conventionally used to specify the name of the file to be + opened and interpreted by the CGI program. + Usually some web server configuration directives (Apache: + Action) are used to redirect requests to documents like + http://my.host/secret/script.php3 to the + PHP interpreter. With this setup, the web server first checks + the access permissions to the directory /secret, and after that creates the + redirected request http://my.host/cgi-bin/php/secret/script.php3. + Unfortunately, if the request is originally given in this form, + no access checks are made by web server for file /secret/script.php3, but only for the + /cgi-bin/php file. This way + any user able to access /cgi-bin/php is able to access any + protected document on the web server. +

    In PHP, compile-time configuration option --enable-force-cgi-redirect + and runtime configuration directives doc_root and user_dir can be used to prevent + this attack, if the server document tree has any directories + with access restrictions. See below for full the explanation + of the different combinations. +

Case 1: only public files served

If your server does not have any content that is not restricted + by password or ip based access control, there is no need for + these configuration options. If your web server does not allow + you to do redirects, or the server does not have a way to + communicate to the PHP binary that the request is a safely + redirected request, you can specify the option --enable-force-cgi-redirect + to the configure script. You still have to make sure your PHP + scripts do not rely on one or another way of calling the script, + neither by directly http://my.host/cgi-bin/php/dir/script.php3 + nor by redirection http://my.host/dir/script.php3. +

Redirection can be configured in Apache by using AddHandler and + Action directives (see below). +

Case 2: using --enable-force-cgi-redirect

This compile-time option prevents anyone from calling PHP + directly with a url like http://my.host/cgi-bin/php/secretdir/script.php3. + Instead, PHP will only parse in this mode if it has gone through + a web server redirect rule. +

Usually the redirection in the Apache configuration is done with + the following directives: +


Action php3-script /cgi-bin/php
+AddHandler php3-script .php3
+    

This option has only been tested with the Apache web server, and + relies on Apache to set the non-standard CGI environment variable + REDIRECT_STATUS on redirected requests. If your + web server does not support any way of telling if the request is + direct or redirected, you cannot use this option and you must use + one of the other ways of running the CGI version documented + here. +

Case 3: setting doc_root or user_dir

To include active content, like scripts and executables, in the + web server document directories is sometimes consider an insecure + practice. If, because of some configuration mistake, the scripts + are not executed but displayed as regular HTML documents, this + may result in leakage of intellectual property or security + information like passwords. Therefore many sysadmins will prefer + setting up another directory structure for scripts that are + accessible only through the PHP CGI, and therefore always + interpreted and not displayed as such. +

Also if the method for making sure the requests are not + redirected, as described in the previous section, is not + available, it is necessary to set up a script doc_root that is + different from web document root. +

You can set the PHP script document root by the configuration + directive doc_root in the + configuration file, or + you can set the environment variable + PHP_DOCUMENT_ROOT. If it is set, the CGI version + of PHP will always construct the file name to open with this + doc_root and the path information in the + request, so you can be sure no script is executed outside this + directory (except for user_dir + below). +

Another option usable here is user_dir. When user_dir is unset, + only thing controlling the opened file name is + doc_root. Opening an url like http://my.host/~user/doc.php3 does not + result in opening a file under users home directory, but a file + called ~user/doc.php3 under + doc_root (yes, a directory name starting with a tilde + [~]). +

If user_dir is set to for example public_php, a request like http://my.host/~user/doc.php3 will open a + file called doc.php3 under the directory + named public_php under the home + directory of the user. If the home of the user is /home/user, the file executed is + /home/user/public_php/doc.php3. +

user_dir expansion happens regardless of + the doc_root setting, so you can control + the document root and user directory access + separately. +

Case 4: PHP parser outside of web tree

A very secure option is to put the PHP parser binary somewhere + outside of the web tree of files. In /usr/local/bin, for example. The only real + downside to this option is that you will now have to put a line + similar to: +


#!/usr/local/bin/php
+      

+ as the first line of any file containing PHP tags. You will also + need to make the file executable. That is, treat it exactly as + you would treat any other CGI script written in Perl or sh or any + other common scripting language which uses the + #! shell-escape mechanism for launching + itself. +

To get PHP to handle PATH_INFO and + PATH_TRANSLATED information correctly with this + setup, the php parser should be compiled with the --enable-discard-path + configure option. +


PrevHomeNext
ConfigurationUpApache module
\ No newline at end of file diff --git a/types.html b/types.html new file mode 100644 index 0000000..82ff93d --- /dev/null +++ b/types.html @@ -0,0 +1,734 @@ +Types
PHP3 Manual
PrevChapter 5. Syntax and grammarNext

Types

PHP supports the following types: + +

+ +

The type of a variable is usually not set by the programmer; + rather, it is decided at runtime by PHP depending on the context + in which that variable is used. + +

If you would like to force a variable to be converted to a certain + type, you may either cast the variable or use + the settype() function on it. + +

Note that a variable may behave in different manners in certain + situations, depending on what type it is a the time. For more + information, see the section on Type Juggling. + +

Integers

Integers can be specified using any of the following syntaxes: +

$a = 1234; # decimal number
+$a = -123; # a negative number
+$a = 0123; # octal number (equivalent to 83 decimal)
+$a = 0x12; # hexadecimal number (equivalent to 18 decimal)

+ +

Floating point numbers

Floating point numbers ("doubles") can be specified using any + of the following syntaxes: +

$a = 1.234;
+$a = 1.2e3;

+ +

Strings

Strings can be specified using one of two sets of delimiters. +

If the string is enclosed in double-quotes ("), variables + within the string will be expanded (subject to some parsing + limitations). As in C and Perl, the backslash ("\") character + can be used in specifying special characters: +

Table 5-1. Escaped characters

sequencemeaning
\nnewline
\rcarriage
\thorizontal tab
\\backslash
\$dollar sign
\"double-quote
+

You can escape any other character, but a warning will be issued + at the highest warning level. +

The second way to delimit a string uses the single-quote ("'") + character, which does not do any variable expansion or backslash + processing (except for "\\" and "\'" so you can insert backslashes + and single-quotes in a singly-quoted string). + +

Arrays

Arrays actually act like both hash tables (associative arrays) + and indexed arrays (vectors). + +

Single Dimension Arrays

PHP supports both scalar and associative arrays. In fact, there + is no difference between the two. You can create an array using + the list() or array() + functions, or you can explicitly set each array element value. + +

 
+$a[0] = "abc"; 
+$a[1] = "def"; 
+$b["foo"] = 13;
+      

+ +

You can also create an array by simply adding values to + the array. + +

 
+$a[] = "hello"; // $a[2] == "hello"
+$a[] = "world"; // $a[3] == "world" 
+      

+ +

Arrays may be sorted using the asort(), + arsort(), ksort(), + rsort(), sort(), + uasort(), usort(), and + uksort() functions depending on the type of + sort you want. + +

You can count the number of items in an array using the + count() function. + +

You can traverse an array using next() and + prev() functions. Another common way to + traverse an array is to use the each() + function. + +

Multi-Dimensional Arrays

Multi-dimensional arrays are actually pretty simple. For each + dimension of the array, you add another [key] value to the end: + +

 
+$a[1]      = $f;               # one dimensional examples
+$a["foo"]  = $f;   
+
+$a[1][0]     = $f;             # two dimensional
+$a["foo"][2] = $f;             # (you can mix numeric and associative indices)
+$a[3]["bar"] = $f;             # (you can mix numeric and associative indices)
+
+$a["foo"][4]["bar"][0] = $f;   # four dimensional!
+      

+ +

You can "fill up" multi-dimensional arrays in many ways, + but the trickiest one to understand is how to use the + array() command for associative arrays. + These two snippets of code fill up the one-dimensional array in + the same way: + +

 
+# Example 1:
+
+$a["color"]	= "red";
+$a["taste"]	= "sweet";
+$a["shape"]	= "round";
+$a["name"]	= "apple";
+$a[3]		= 4;
+
+
+# Example 2:
+$a = array(
+     "color" => "red",
+     "taste" => "sweet",
+     "shape" => "round",
+     "name"  => "apple",
+     3       => 4
+);
+      

+ +

The array() function can be nested for + multi-dimensional arrays: + +

 
+<?
+$a = array(
+     "apple"  => array(
+          "color"  => "red",
+          "taste"  => "sweet",
+          "shape"  => "round"
+     ),
+     "orange"  => array(
+          "color"  => "orange",
+          "taste"  => "sweet",
+          "shape"  => "round"
+     ),
+     "banana"  => array(
+          "color"  => "yellow",
+          "taste"  => "paste-y",
+          "shape"  => "banana-shaped"
+     )
+);
+
+echo $a["apple"]["taste"];    # will output "sweet"
+?>
+      

+ +

Objects

Object Initialization

To initialize an object, you use the new statement to instantiate + the object to a variable. + +

class foo {
+    function do_foo () { 
+        echo "Doing foo."; 
+    }
+}
+
+$bar = new foo;
+$bar -> do_foo ();
+       

+ +


PrevHomeNext
Syntax and grammarUpVariables
\ No newline at end of file diff --git a/variables.html b/variables.html new file mode 100644 index 0000000..7b6b5ac --- /dev/null +++ b/variables.html @@ -0,0 +1,993 @@ +Variables
PHP3 Manual
PrevChapter 5. Syntax and grammarNext

Variables

Variable scope

The scope of a variable is the context within which it is defined. + For the most part all PHP variables only have a single scope. + However, within user-defined functions a local function scope is + introduced. Any variable used inside a function is by default + limited to the local function scope. For example: + +

 
+$a = 1; /* global scope */ 
+
+Function Test () { 
+    echo $a; /* reference to local scope variable */ 
+} 
+
+Test ();
+     

This script will not produce any output because the echo statement + refers to a local version of the $a variable, and it has not been + assigned a value within this scope. You may notice that this is a + little bit different from the C language in that global variables + in C are automatically available to functions unless specifically + overridden by a local definition. This can cause some problems in + that people may inadvertently change a global variable. In PHP + global variables must be declared global inside a function if they + are going to be used in that function. An example: + +

$a = 1;
+$b = 2;
+
+Function Sum () {
+    global $a, $b;
+
+    $b = $a + $b;
+} 
+
+Sum ();
+echo $b;
+     

The above script will output "3". By declaring $a and + $b global within the function, all references to either variable + will refer to the global version. There is no limit to the number + of global variables that can be manipulated by a function. + +

A second way to access variables from the global scope is to use + the special PHP-defined $GLOBALS array. The previous example can + be rewritten as: + +

$a = 1;
+$b = 2;
+
+Function Sum () {
+    $GLOBALS["b"] = $GLOBALS["a"] + $GLOBALS["b"];
+} 
+
+Sum ();
+echo $b;
+     

The $GLOBALS array is an associative array with the name of the + global variable being the key and the contents of that variable + being the value of the array element. + +

Another important feature of variable scoping is the + static variable. A static variable exists + only in a local function scope, but it does not lose its value + when program execution leaves this scope. Consider the following + example: + +

Function Test () {
+    $a = 0;
+    echo $a;
+    $a++;
+}
+     

This function is quite useless since every time it is called it + sets $a to 0 and prints "0". The $a++ which increments + the variable serves no purpose since as soon as the function exits + the $a variable disappears. To make a useful counting function + which will not lose track of the current count, the $a variable is + declared static: + +

Function Test () {
+    static $a = 0;
+    echo $a;
+    $a++;
+}
+     

Now, every time the Test() function is called it will print the + value of $a and increment it. + +

Static variables are also essential when functions are called + recursively. A recursive function is one which calls itself. + Care must be taken when writing a recursive function because it is + possible to make it recurse indefinitely. You must make sure you + have an adequate way of terminating the recursion. The following + simple function recursively counts to 10: + +

Function Test () {
+    static $count = 0;
+
+    $count++;
+    echo $count;
+    if ($count < 10) {
+        Test ();
+    }
+    $count--;
+}
+     

Variable variables

Sometimes it is convenient to be able to have variable variable + names. That is, a variable name which can be set and used + dynamically. A normal variable is set with a statement such as: + +

$a = "hello";
+     

A variable variable takes the value of a variable and treats that as the + name of a variable. In the above example, hello, can + be used as the name of a variable by using two dollar signs. ie. + +

$$a = "world";
+     

At this point two variables have been defined and stored in the + PHP symbol tree: $a with contents "hello" and $hello with contents + "world". Therefore, this statement: + +

echo "$a ${$a}";
+     

produces the exact same output as: + +

echo "$a $hello";
+     

ie. they both produce: hello world. + +

In order to use variable variables with arrays, you have to + resolve an ambiguity problem. That is, if you write $$a[1] then + the parser needs to know if you meant to use $a[1] as a variable, + or if you wanted $$a as the variable and then the [1] index from + that variable. The syntax for resolving this ambiguity is: + ${$a[1]} for the first case and ${$a}[1] for the second. + +

Variables from outside PHP

HTML Forms (GET and POST)

When a form is submitted to a PHP script, any variables from that + form will be automatically made available to the script by + PHP. For instance, consider the following form: + +

Example 5-2. Simple form variable

<form action="foo.php3" method="post">
+    Name: <input type="text" name="name"><br>
+    <input type="submit">
+</form>
+       
+ +

When submitted, PHP will create the variable + $name, which will will contain + whatever what entered into the Name: field + on the form. + +

PHP also understands arrays in the context of form variables, but + only in one dimension. You may, for example, group related + variables together, or use this feature to retrieve values from a + multiple select input: + +

Example 5-3. More complex form variables

<form action="array.html" method="post">
+    Name: <input type="text" name="personal[name]"><br>
+    Email: <input type="text" name="personal[email]"><br>
+    Beer: <br>
+    <select multiple name="beer[]">
+        <option value="warthog">Warthog
+        <option value="guinness">Guinness
+        </select>
+    <input type="submit">
+</form>
+       
+ +

If PHP's track_vars feature is turned on, either by the track_vars configuration setting + or the <?php_track_vars?> + directive, then variables submitted via the POST or GET methods + will also be found in the global associative arrays + $HTTP_POST_VARS and $HTTP_GET_VARS as appropriate. + +

IMAGE SUBMIT variable names

When submitting a form, it is possible to use an image instead + of the standard submit button with a tag like: + +

<input type=image src="image.gif" name="sub">
+       

When the user clicks somewhere on the image, the accompanying + form will be transmitted to the server with two additional + variables, sub_x and sub_y. These contain the coordinates of + the user click within the image. The experienced may note that + the actual variable names sent by the browser contains a period + rather than an underscore, but PHP converts the period to an + underscore automatically. + +

HTTP Cookies

PHP transparently supports HTTP cookies as defined by Netscape's Spec. Cookies are a + mechanism for storing data in the remote browser and thus + tracking or identifying return users. You can set cookies using + the SetCookie() function. Cookies are part + of the HTTP header, so the SetCookie function must be called + before any output is sent to the browser. This is the same + restriction as for the Header() function. + 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 [] to the cookie name. For example: + +

SetCookie ("MyCookie[]", "Testing", time()+3600);
+      

Note that a cookie will replace a previous cookie by the same + name in your browser unless the path or domain is different. So, + for a shopping cart application you may want to keep a counter + and pass this along. i.e. + +

Example 5-4. SetCookie Example

$Count++;
+SetCookie ("Count", $Count, time()+3600);
+SetCookie ("Cart[$Count]", $item, time()+3600);
+      

Environment variables

PHP automatically makes environment variables available as normal + PHP variables. + +

echo $HOME;  /* Shows the HOME environment variable, if set. */
+      

+ +

Since information coming in via GET, POST and Cookie mechanisms + also automatically create PHP variables, it is sometimes best to + explicitly read a variable from the environment in order to make + sure that you are getting the right version. The + getenv() function can be used for this. You + can also set an environment variable with the + putenv() function. + +

Type juggling

PHP does not require (or support) explicit type definition in + variable declaration; a variable's type is determined by the + context in which that variable is used. That is to say, if you + assign a string value to variable var, + var becomes a string. If you then assign + an integer value to var, it becomes an + integer. + +

An example of PHP's automatic type conversion is the addition + operator '+'. If any of the operands is a double, then all + operands are evaluated as doubles, and the result will be a + double. Otherwise, the operands will be interpreted as integers, + and the result will also be an integer. Note that this does NOT + change the types of the operands themselves; the only change is + in how the operands are evaluated. + +

$foo = "0";  // $foo is string (ASCII 48)
+$foo++;      // $foo is the string "1" (ASCII 49)
+$foo += 1;   // $foo is now an integer (2)
+$foo = $foo + 1.3;  // $foo is now a double (3.3)
+$foo = 5 + "10 Little Piggies"; // $foo is integer (15)
+$foo = 5 + "10 Small Pigs";     // $foo is integer (15)
+     

+ +

If the last two examples above seem odd, see String conversion. + +

If you wish to force a variable to be evaluated as a certain + type, see the section on Type casting. If you + wish to change the type of a variable, see + settype(). + +

Determining variable types

Because PHP determines the types of variables and converts them + (generally) as needed, it is not always obvious what type a given + variable is at any one time. PHP includes several functions + which find out what type a variable is. They are + gettype(), is_long(), + is_double(), is_string(), + is_array(), and + is_object(). + +

Type casting

Type casting in PHP works much as it does in C: the name of the + desired type is written in parentheses before the variable which + is to be cast. + +

$foo = 10;   // $foo is an integer
+$bar = (double) $foo;   // $bar is a double
+      

+ +

The casts allowed are: +

  • (int), (integer) - cast to integer +

  • (real), (double), (float) - cast to double +

  • (string) - cast to string +

  • (array) - cast to array +

  • (object) - cast to object +

+ +

Note that tabs and spaces are allowed inside the parentheses, so + the following are functionally equivalent: + +

$foo = (int) $bar;
+$foo = ( int ) $bar;
+      

+ +

String conversion

When a string is evaluated as a numeric value, the resulting + value and type are determined as follows. + +

The string will evaluate as a double if it contains any of the + characters '.', 'e', or 'E'. Otherwise, it will evaluate as an + integer. + +

The value is given by the initial portion of the string. If the + string starts with valid numeric data, this will be the value + used. Otherwise, the value will be 0 (zero). Valid numeric data + is an optional sign, followed by one or more digits (optionally + containing a decimal point), followed by an optional + exponent. The exponent is an 'e' or 'E' followed by one or more + digits. + +

$foo = 1 + "10.5";      // $foo is double (11.5)
+$foo = 1 + "-1.3e3";    // $foo is double (-1299)
+$foo = 1 + "bob-1.3e3"; // $foo is integer (1)
+$foo = 1 + "bob3";      // $foo is integer (1)
+$foo = 1 + "10 Small Pigs";     // $foo is integer (11)
+$foo = 1 + "10 Little Piggies"; // $foo is integer (11); 
+$foo = "10.0 pigs " + 1;        // $foo is int (11)
+$foo = "10.0 pigs " + 1.0;      // $foo is double (11)     
+      

+ +

The type of the variable depends on the second not on the first + expression, when the first expression is a string. + +

For more information on this conversion, see the Unix manual + page for strtod(3). +


PrevHomeNext
TypesUpConstants
\ No newline at end of file diff --git a/x2176.html b/x2176.html new file mode 100644 index 0000000..6ed8f62 --- /dev/null +++ b/x2176.html @@ -0,0 +1,240 @@ +Alternative syntax for if structures: if(): ... endif;
PHP3 Manual
PrevChapter 10. Control StructuresNext

Alternative syntax for if structures: if(): ... endif;

PHP offers a different way to group statements within an + if statement. This is most commonly used when + you nest HTML blocks inside if statements, but + can be used anywhere. Instead of using curly braces, if + (expr) should be followed + by a colon, the list of one or more statements, and end with + endif;. Consider the following example: + +

 <?php if ($a==5): ?>
+ A = 5
+ <?php endif; ?>
+       

+ +

In the above example, the HTML block "A = 5" is nested within an + if statement written in the alternative syntax. + The HTML block would be displayed only if $a is equal to 5. + +

The alternative syntax applies to else + and elseif as well. The following is an + if structure with elseif + and else in the alternative format: + +

 if ($a == 5):
+     print "a equals 5";
+     print "...";
+ elseif ($a == 6):
+     print "a equals 6";
+     print "!!!";
+ else:
+     print "a is neither 5 nor 6";
+ endif;
+       

+ +


PrevHomeNext
elseifUpwhile
\ No newline at end of file