Jump to content

wildteen88

Staff Alumni
  • Posts

    10,480
  • Joined

  • Last visited

    Never

Everything posted by wildteen88

  1. Thjs has been asked many times before. Please search the forum for the answer. thread closed
  2. No problem! I'll mark this as solved.
  3. Yes that is correct.
  4. Yeah it looks like php is using thw rong ini file. Where id your php.ini file located? Move it to C:\Windows also if you are using Apache2 you should be able to add this into the httpd.conf file: [code]PHPIniDir "C:/WINDOWS"[/code]
  5. If you are using variables that are outside of a function you will need to make them global in order for the function to use those variables. Like so [code]function sql_connect_real($database) {     global $skin;[/code]
  6. How are you testing GD? To test whether GD is loaded run the following code: [code]<?php var_dump(gd_info()); ?>[/code] It should produce something like this: [code]array(12) { ["GD Version"]=> string(27) "bundled (2.0.28 compatible)" ["FreeType Support"]=> bool(true) ["FreeType Linkage"]=> string(13) "with freetype" ["T1Lib Support"]=> bool(true) ["GIF Read Support"]=> bool(true) ["GIF Create Support"]=> bool(true) ["JPG Support"]=> bool(true) ["PNG Support"]=> bool(true) ["WBMP Support"]=> bool(true) ["XPM Support"]=> bool(false) ["XBM Support"]=> bool(true) ["JIS-mapped Japanese Font Support"]=> bool(false) } [/code] if it something like above then it is enabled. Also make sure PHP is using the correct php.ini by running the phpinfo function check that "[i]Configuration File (php.ini) Path[/i]" is the correct path to the php.ini Also a good tip is to turn on "display_startup_errors" in the php.ini incase an error occurs during startup.
  7. Dont move any bloody files from the extension folder, its not needed!. If you have configured the extension_dir directive correctly in the php.ini, PHP should be able to access the extensions folder. Once you have configured the extension_dir directive you need to uncomment the extension in the php.ini file in order for PHP to load that extension. Now when you make any changes to the php.ini file you need to restart your server in order for the new PHP configuration settings to be loaded into memory.
  8. No its nothing to do with frames! You dont need to echo anything either with echo! ie: [b]links.html[/b] [code]<a href="index.php">Home</a><br /> <a href="tutorials.php">Tutorials</a><br /> <a href="porfolio.pgp">Portfolio</a><br /> .. more links here ..[/code] Now in your page you do this: [code]<?php //some code here include 'links.html'; ?>[/code] Now when PHP goes to parse your code it'll basically get the contents of links.html and copy 'n' paste it where include was stated No need for frames or anythink! Just try it out.
  9. No, you only use localhost if it your mysql server is setup on the same server your site is. If your mysql server is not then you'll need to use the mysql servers IP address instead, but 90% localhost works. Also if you are including dbconnect.php make sure you have the correct path to the file, otherwise PHP will not be able to locate your file, which is most probably the case if you you are getting a blank page. dbconnect.php should be in the same directory as the file you are inlcuding it in unless you state the path to the file. Check your servers error log which may have an error which states that PHP cannot find dbconnect.php. The code in dbconnect.php is fine and I have a feeling that PHP is having trouble including it.
  10. Prehaps [a href=\"http://uk.php.net/manual/en/function.str-word-count.php\" target=\"_blank\"]str_word_count[/a] may be what you're looking for?
  11. exit will stop PHP from ruinning any code past the point you place the exit function, therefor nothing is outputted when you echo "a is empty".
  12. You can create file and called it links.html which will store all your links then where ever you want you links to display you use this code: [code]<?php include 'links.html'; ?>[/code] And your links will appear where ever you place the include. Therefore you can just edit the links.html file to edit your links or to add in links and it'll be reflected instantly throughout your site.
  13. The way google has done it is by having a td cell with a 1px border with 5 pix padding then in side that cell is a table whcih has the ligh blue background. So here is how they have done it: [code]<style type="text/css"> #outer {   border: 1px solid #E8EEFA;   padding: 5px;   width: 225px; } #inner {   padding: 10px;   background-color: #E8EEFA; } #inner h1 {   margin: 0px;   padding: 0px;   padding-bottom: 10px;   font-size: 24p; } </style> <div id="outer">   <div id="inner">     <h1>Header</h1>     through a top-down, proactive approach we can remain customer focused and goal-directed,     innovate and be an inside-out organization which facilitates sticky web-readiness     transforming turnkey eyeballs   </div> </div>[/code]
  14. wildteen88

    PCRE

    The best placed to go if you dont understand a meaning of something is to head over to wikipedia! Anyway PCRE stands for [b]P[/b]erl [b]C[/b]ompatible [b]R[/b]egular [b]E[/b]xpressions Here is an [a href=\"http://en.wikipedia.org/wiki/PCRE\" target=\"_blank\"]an explanation too[/a] Also I swer php.net mentions what PCRE stands for. yeah I thought so, [a href=\"http://uk2.php.net/manual/en/ref.pcre.php\" target=\"_blank\"]php.net explains it here[/a]
  15. Yes you can javascript for all of what you want to do. But to keep the clock counting down you'll probably want to have a frameset so one frame has the counter and the other has the game. Or just have the game in an iframe.
  16. [b]Q:[/b] What do the following operators do: -> and => ?> [b]A:[/b] [size=3][b]The -> Operator[/b][/size] The -> opertator is used in Object Oriented Programming (OOP for short) to call methods/variables from within an object for example you have this class: [code]<?php class foobar {     function foo() {         echo "Foo initiated";     }     function bar() {         echo "Bar initiated";     } }[/code] To call the foo function you first need to create the object by doing this: [code]$obj = new foobar;[/code] Now you need use the -> operator to call the method within the object: [code]$obj->foo(); // the same for calling bar() too: $obj->bar();[/code] [size=3][b]The => Operator[/b][/size] But the  => operator is used when dealing with arrays. It is used to define the key for an item within an array. For example [code]$person = array("name" => "John", "age" => 24);[/code] So with that code you are you are creating two keys, the first one is 'name' which stores 'John' and a secound key called 'age' which stores the number '24' Now that you have defined the key for each item in the array you can use this code: [code]echo $person['name']; //yields "John" echo $person['age']; //yeilds 24[/code] If you didn't define a key in your array you'll have to get the value from the array like so [code]echo $person[0]; //yields "John" echo $person[1]; //yields 24[/code] => can also be used in foreach loops, but it used to get the value of the key rather than assing the key, you may use this when debugging POST'd data for example: [code]foreach($_POST as $k => $v) {     echo "'" . $k . "' = " . $v; }[/code]
  17. You might want to look into [a href=\"http://uk.php.net/manual/en/function.preg-match.php\" target=\"_blank\"]preg_match[/a] it will be more accurate.
  18. Yeah its only affects a few functions dont know which ones though but the way to fool the security script is to place a space before the opening parenthesis like so: [code]phpinfo (); fopen (); fclose ();[/code] Now you'll be able to post your code here or you can paste your code over at pastebin.com as I mentioned about.
  19. Everyone uses those all the time in their scripts! These variables are called [a href=\"http://uk2.php.net/variables.predefined\" target=\"_blank\"]Super Globals[/a]. There are also other prefined variables too in PHP.
  20. If you ar eposting code then you tend to get that message withg certain PHP functions in your code such as if you have fopen in your code then you'll get that message because of a security script that is running. If you post your code over at [a href=\"http://pastebin.com\" target=\"_blank\"]pastebin.com[/a] and then post the link here to your code tne you'll be able to post.
  21. Search for [a href=\"http://www.google.co.uk/search?hs=uTX&hl=en&client=firefox-a&rls=org.mozilla%3Aen-GB%3Aofficial_s&q=PHP%3A+pagination&btnG=Search&meta=\" target=\"_blank\"]Pagination[/a] There are plenty of tutorials out there for this.
  22. Oh crap I'm such a dumb-butt! I was supposed to type [b]scrollTo[/b] not srollTo So yeah the function is: [code]scrollTo(x position, y position);[/code] Also you are using it on textarea (< textarea></textarea>) and not a text input field?
  23. Umm.. could you translate that into english?
  24. There is two type of while loop do-while loop and while loop they are same apart from do-while is like this: [code]do { } while($i <= 998);[/code] I prefer to use just while whithout the do bit.
  25. Try [a href=\"http://127.0.0.1\" target=\"_blank\"]http://127.0.0.1[/a] instead of [a href=\"http://localhost/\" target=\"_blank\"]http://localhost/[/a] Web browsers should recognise these as internal address and should not be requesting you to access the internet, you do have Apache running and setup to use port 80 (defualt port)? and that (windows) firewall is allowing access to port 80 (if enabled). I have never came across this before, however my old PC has Apache, PHP and MySQL setup on it and is not connected to the net at all yet I am able to access [a href=\"http://localhost/\" target=\"_blank\"]http://localhost/[/a] with no problems. Also to change your homepage in IE go to Tools -> Internet Options -> and change the address in the home page box to something else, such as [a href=\"http://localhost/\" target=\"_blank\"]http://localhost/[/a]
×
×
  • 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.