Jump to content

taith

Members
  • Posts

    1,514
  • Joined

  • Last visited

Everything posted by taith

  1. ohya... WAY over explained lol... 1) php is only EVER processed on the server... it never touches the browser in "any" way shape or form 2) the include() functions are always relative, unless otherwise specified... lol <?php include('bodyCopy/filename.php') ?> should work just fine... 3) if you want to use php variables inside a include() <?php $var='test/'; include($var.'bodyCopy/filename.php') ?> would move the file search into the test/ directory hope that helps some?
  2. actually... i jsut retried ithe getimagesize() and it did work :-P aparently it is flash compatible
  3. maybe not the fastest way of doing this... but... <? $i=1; for($t=0; $t<strlen($string);$t++){ if($t%900==0) $i++; $out[$i].=$string{$t}; } ?> which will break the string up into groups of 900 chars... then you simply foreach the $out to insert the div's :-) <? foreach($out as $k=>$v) $out[$k]='<div id="content_'.$k.'">'.$v.'</div>'; $out=implode('',$out); ?> and presto... $out now contains your text, in groups of 900 chars, seperated into <div>s that are sequentially numbered
  4. i should also mention that $result = mysql_query($query); $result = mysql_query($query) or die(mysql_error()); theres no point in doubleing up that query
  5. oh the wonders of glob()... $files=glob("gallery/$make/C*"); will make an array of all files in the gallery/$make directory that start with a C use that for your loops
  6. firstly... i'd like to say... since when doesnt ie6 have errors? secondly... i would say that php is only active on the server side... so unless you have browser detection software and/or browser specific programming... it shouldnt be a php error thirdly... whats getting outputted into the ie6's source? (right click, view source) if its all there, then its a browser parsing problem... if its not, it may still be a browser problem, but it may also be a php non-outputting problem... try echo 'test'; at the top of your php script... see if anything comes out...
  7. does php have a way of accessing the file data the same/similar way that it does to images? with images you can "list($width, $height)=getimagesize($r);" to get the height/width of the image, but for some reason its not working with flash... is there another flash compatible one?
  8. :-P found my own answer thanks anyways :-) function hex_to_rgb($hex){ if(substr($hex,0,1) == '#') $hex = substr($hex,1) ; if(strlen($hex) == 3) $hex = substr($hex,0,1).substr($hex,0,1).substr($hex,1,1).substr($hex,1,1).substr($hex,2,1).substr($hex,2,1); $rgb['red'] = hexdec(substr($hex,0,2)) ; $rgb['green'] = hexdec(substr($hex,2,2)) ; $rgb['blue'] = hexdec(substr($hex,4,2)) ; return $rgb ; }
  9. is there a way of translating a hex into rgb format for the GD library?
  10. true... however in keeping with good programming practices, and who knows what'll happen when html5 or php6 comes out... going back over code to fix these issues is a pain...
  11. you'd want to name your checkboxes like "ch[]"... then on the submitted page... you... foreach($_POST[ch] as $k=>$v){ if($v=='on') #do your clearing here }
  12. i dunt know for sure... but that looks more like asp then php...
  13. problem is, my ftp cannot see pre-root...
  14. unfortunatly not... the only way i want to see if these files are even there, is via the FTP... chmod would restrict the data, but still achnoledge that it is there...
  15. hey everyone! i know this isnt specifically a php question... i'm looking for a way to restrict access to a folder via .htaccess... i dont want to use a user/pass... i mean inaccessable... so nobody can see/open the folder, or any files within... i was thinking a folder above the root... but php needs to have ability to upload to it, and i cannot manually configure the server to allow that... any ideas?
  16. true... but the data is sent to the first server, then the redirect to the new page... and the post data is not available on the new page... meaning the content does go to the first server... i was just hoping there'd be a way of forcing php to mimic a http request (sending the POST data) from the client side...
  17. ya... curl is for incoming data, not for forcing outgoing data... and yes i know... sessions/cookies wont work... i need a sort of "header("POSTVariable:var='content'");" but it doesnt seem to be created yet :'(
  18. i cannot use $_GET... the remote page does not allow $_GET... only $_POST the page i'd be sending to would be remote, therefore cannot access the session info...
  19. <?php session_start(); if(!isset($_SESSION[var])) $_SESSION[var]='abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890abcdefghijklmnopqrstuvwxyz1234567890'; ?> then on any page you want to access it... just call $_SESSION[var] as you would any other variable...
  20. try this you seem to've had an extra " <?php print "Copy this code into the article form on the creation page<br/>\n"; $defaults = '<a href="photos/misc/bigphotos/'.$bg_file.'"><img class="floatright" src="photos/misc/smallphotos/'.$sm_file.'" /></a>'; print "<form>\n"; ?>
  21. or... just $imgs=glob('imagefolder/*.jpg'); $img=$imgs[array_rand($imgs)];
  22. unfortunatly thats not possible... 1) the redirecting to page is of a different domain(no $_SESSION) 2) $_GET is too unsecure and not supported by the site i'm directing too... 3) i'm directing via header('Location: '); so i cant use <input hidden>
  23. just wondering if its possible (and how) to create a $_POST variable, then header('Location: elsewhere.php'); and have the variable accessable on the next page...?
  24. aggreed... them two are the two prevelant ones out there but i personally prefer tinymce myself
  25. instead of using golives functions, you'd want to write in a way of a form submission, rather then a header redirect... onchange="document.form.submit()" which directs to the same page, and you can carry information over, from past, to present
×
×
  • 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.