[PHP] XSLT
I'm wondering if there is a way to include a query string parameter in an xsl stylesheet. I have a script that does this: xslt_process($xsltprocessor,$xml,$xsl); I'd like to include the value of a variable passed to this script via a query string (eg. xmlscript.php?p=3 ), whereby the value '3' is passed to the xsl stylesheet somehow. The xsl stylesheet should then only process section 3 of the xml document. I've played about with extra arguments to xslt_process and to no avail. Hope this is clear enough. TIA Mick MICHAEL HALL Web Development Officer Batchelor Institute of Indigenous Tertiary Education W: [EMAIL PROTECTED](08) 8951 8352 H: [EMAIL PROTECTED](08) 8953 1442 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] session in class problem
Try enclosing the function code in brackets: function Check_Session() { code goes here } Mick Quoting Mark Colvin <[EMAIL PROTECTED]>: > I have the following .php script and .inc file which doesn't work: > > = .php file = > >// Include function files > require_once "includefiles/session_functions.inc"; > > // Create instances of the required class > $sess = new Sessions; > > // chech for valid session > $sess->Check_Session(); > > phpinfo(); > ?> > > > > Untitled > > > > admin > > > > > > = .inc file = > > class Sessions > { > >function Check_Session() > > session_start(); >if (!session_is_registered("SESSION")) >{ > header("Location: http://???.???.??.?/index.php?logintext=Please > login."); > exit(); >} > > } > > The session was created in a previous login script. When I enter the > .php > script I get the following error: > > Parse error: parse error, expecting `'{'' in > /var/www/html/includefiles/session_functions.inc on line 7 > > Fatal error: Cannot instantiate non-existent class: sessions in > /var/www/html/adminoutput.php on line 8 > However, if I copy the code from the function in the .inc file and place > it > at the top of my php script, and delete the class code in the php > script > everything works OK. Why is this happening? I also tried placing > session_start() in the php script before calling the class method > Check_Session but this had no effect. > > Thanks in advance > > > Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] thumbnail problems
I've searched the archives on this and, while I have turned up some tips, they don't seem to solve my problem. I an building a website for an indigenous organisation where jpg images are uploaded, resized to a standard format, and thumbnails also generated at the same time (so that is two resizes for each image). Most of the time this works OK, but there are a lot of pages where many thumbnails are just blacked out, eg: http://waru.org/arakuwaritja.php?p=63 On some pages, all images are blacked out, eg: http://waru.org/arakuwaritja.php?p=36 whereas on others they're all OK, eg: http://waru.org/arakuwaritja.php?p=43 The people in the field taking and uploading the photos insist that the format, color depth, etc, is not changing from photo to photo, and I can't discern any differences. Yet some work, some don't. I read somewhere that memory limitations could cause this, but still, it only happens sometimes and not others. We are on a crowded shared server I think. I'm use ImageCreateTrueColor() after checking with ImageIsTrueColor(), otherwise just ImageCreate(). The initial resizes almost always work (down from 640x480 to 400x300), with the thumbnails it is looking like a 50% failure rate. Thanks in advance for any assistance. Michael Hall -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php