Jump to content

scottieclark

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

About scottieclark

  • Birthday 10/02/1973

Contact Methods

  • Website URL
    http://www.doublecream.co.uk

Profile Information

  • Gender
    Male
  • Location
    Florence, Italy

scottieclark's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. beautiful! they sure do sound good... i'm not sure i even care if there's any element of fact to them...might just go with that however, in the interests of getting the site working... I use a php file for css as it lets me dynamically update variables within the css, which is pretty cool. works well in other sites i've built. **STOP PRESS** just checked the php file i'm using for the css and in this case i'm not replacing anything dynamically so no need for php there! tried a css file instead and bingo!..problem gone! Thanks man! so... now i'm wondering why? will investigate... if i find anything i'll update this thread... thanks again! over n out
  2. Hi, this, i think, is a 'php in firefox' issue despite me mentioning css in the title so please read on!.. please have a look, using firefox, at http://www.laureleroch.com/gallery.php... As you can see, when choosing different images via clicking on the thumbnails the page reloads and there's an amount of time where we see the page loaded without css applied..., however doesn't seem to be happening in IE9, opera, chrome, or safari. It IS happening in firefox on W7 and OSX. the file gallery.php has... <?php session_start(); ob_start(); include("scripts/php/gallery_display.php"); include("scripts/php/file_reader.php"); ...as its start...and... </body> </html> <?php ob_flush() ?> ..at its end. I can post all the code from the includes if required. I'd say there's a fair bit of processing done by these includes but really, not THAT much, plus other browsers seem to be doing ok with it. Also, the background images are big. That's a fact. The site will be in this way and I plan to use a preloader once I get the main build sorted...nearly there. One other thing...I really am a coding newbie. I've been toying with it for years, first with actionscript in flash, then html/css and now I'm getting really into php, however I'm sure my coding is pretty inefficient here and there thru nothing other than pure, undiluted ignorance...good, eh?! so, if anyone got some pointers that would be really brilliant... any other info required - please shout. cheers, Scott
  3. Hi... thanks to you all for the help - great support! OOP...that was it...worked like a charm! Funny eh?..such a little thing, but if you don't know...you just don't know!!! Great - I can get on now... Cheers, S
  4. Hi. I'm sure this is a really simple problem!..but my inexperience is really showing me up! The problem is with defining the file that the function should read into $lines array. $lines = file('http://www.nickalm.com/rebuild/scripts/oil.txt'); With a string as the definition it works fine but with a variable (which I need) - no joy! Here's some code that works just fine... <?php function get_value_of($name){ $lines = file('http://www.nickalm.com/rebuild/scripts/oil.txt'); // this is the troublesome little devil here foreach (array_values($lines) as $line) { list($key, $val) = explode('=', trim($line) ); if (trim($key) == $name) { return $val; iconv( "UTF-8", "ISO-1252//TRANSLIT", $val ); } } return false; } ?> ...however...this just doesn't: $title_path = 'http://www.nickalm.com/rebuild/scripts/'.$gallery.'.txt'; function get_value_of($name) { $lines = file($GLOBALS['$title_path']); // this is the troublesome little devil here foreach (array_values($lines) as $line) { list($key, $val) = explode('=', trim($line) ); if (trim($key) == $name) { return $val; iconv( "UTF-8", "ISO-1252//TRANSLIT", $val ); } } return false; } I've tried it every which way I can think of, firstly using just $title_path, then $GLOBALS['$title_path'] when I thought it was a scope issue, but no luck so far! Any tips or pointers MUCH appreciated! Thanks. Scott
  5. hi... thanks for the replies... at the moment the text file looks like this: I thought I'd be able to use a function to load variables into an array, then at other points in the page code (html) echo any given variable, importantly, within a <div> tag somewhere in the page layout. Is it possible to put the function code in <head> of an html page, then call for specific variable values to be echoed where I want them? The end goal is to create a site where all the text for each page is loaded in this way. The amount of text involved is minimal so I thought it'd be alright. Any advice? Many thanks for the help! S
  6. Hi... Firstly, I have to declare...I have no idea what I'm doing! The goal: --------------------------------------------------------------------------------- To load text in html div tags dynamically, loaded from a .txt file. --------------------------------------------------------------------------------- So far... I've spent a couple of days trawling the net to find examples of how to do this. I've read much about delimited files, fread functions, etc., but really need a clear dummie's guide of what code to put where... I've tried putting this code into the <head> section of my page... <?php function get_value_of($name) { $lines = file('titles.txt'); foreach (array_values($lines) AS $line) { list($key, $val) = explode('=', trim($line) ); if (trim($key) == $name) { return $val; } } return false; } ?> ...and then this in the <div> tag... <?php echo get_value_of($title1); ?> my txt file is called titles.txt Would really appreciate any help I can get! Thanks in advance.... Scott
  7. Hi... My name's Scott. I've joined phpfreaks in an effort to learn some task-led php...i'm building a couple of sites in html, and need to make some of the content dynamic. I've used actionscript in flash quite a lot in the past, but that's about the total of any programming experience I have! So, please look out for me in the forums as I have absolutely no idea what I'm doing...hurrah! Nice to be here...have a good one! S
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.