wildteen88
Staff Alumni-
Posts
10,480 -
Joined
-
Last visited
Never
Everything posted by wildteen88
-
Any page that uses sessions must have session_start() at the beginning of the script.
-
Using $this when not in object context [HELP]
wildteen88 replied to Vellor's topic in PHP Coding Help
I just search for any instance of min_pass_length, max_pass_length and chars and nothing was found. it appears these are not needed for the script to work and do not have any relevance. -
If you have a spare video card, insert that. If your computer boots up fine then its your video card at fault. If doesn't then it could be your mobo. Also check that all your (power) connections are seating correctly
-
You can host multiple sites of off Apache 2.0.x using virtual hosts. There is no need to upgrade to 2.2.x, however you can if you so wish to.
-
I think you mean 'message' => '> topic:' . $gettopic3['title'] , Not 'message' => '> topic:' echo $gettopic3['title'] , You use the . to concatenate strings together.
-
Using $this when not in object context [HELP]
wildteen88 replied to Vellor's topic in PHP Coding Help
$this can only be used within an object. It cannot be used outside of it. The following portion of code is incorrect $this->min_pass_length=8; $this->max_pass_length=12; $this->chars='abcdefghijklmnopqrstuvwxyz0123456789'; What are you trying to do here? -
To unhide a file/folder. First do what ratcateme said so hidden files/folders are visiable. Next find the file/folder you want to unhide and right click on it, select Properties from the menu. Now uncheck the Hidden checkbox.
-
Where are you echoing it out to. You dont need to do anything special to output HTML within PHP.
-
Look into http://uk.php.net/array_rand
-
That should work. Have you tested it?
-
shuffle doesn't return anythink, accept true (or 1). The way you use suffle is $arr = range(0, 100); echo 'Before<pre>' . print_r($arr, true) .'</pre>'; shuffle($arr); echo 'After<pre>' . print_r($arr, true) .'</pre>';
-
As in if(condition) { line 1 line 2 line 3 } else { line 1 line 2 line 3 }
-
That OP code can be converted to a ternary operator. <?php echo ($getthreads3['forumlock'] == 1) ? '1' : '2'; ?>
-
Is it too hard to look at the forum index? I though there was already a sticky in this board redirecting to the FAQ/Code Snippet Repository... umm seems to have disappeared
-
Post your code here. Make sure the parent file (the one that is including your .html file is a .php file). All the suggestions posted here should work for you.
-
We already have a place setup for this which is the FAQ/Code Snippet Repository. Unfortunately allot of people over look that board.
-
What are you asking for? Do you want use to recommend you a news script other than cutenews?
-
rmdir does just that removeds the directory. If you only want to remove the directory contents then there isn't a built in function for this. You'll have to piece together your own function, such as this. Alternatively just use rmdir to remove the directory completely then mkdir to recreate it.
-
Change while(($file = readdir($dir)) != false) { if(($file != '.') && ($file != '..')) { $file_list .= "<a class=\"subnav\" href=\"$webdirname/$file\">$file</a>"; } } to // list files to ignore $ignore = array( '.', '..', 'index.php'); while(($file = readdir($dir)) != false) { // check that the current file is not within the $ignore list // and that it is not a directory if(!in_array($file, $ignore) && !is_dir($file)) { // add the file to the list $file_list .= "<a class=\"subnav\" href=\"$webdirname/$file\">$file</a>"; } }
-
Try leaving of the the port number. I think you're confusing MySQL with your http server. HTTP servers (such as Apache or IIS) usually run on port 80 and sometimes port 8080. MySQL on the other hand runs on port 3306. When leaving of the port PHP will by default try port 3306.
-
PHP will parse any PHP code within any file that is being included, Provided you place all PHP code within PHP tags. So if your .html file is this: <table width="<?php echo $width; ?>"> And you're using the the following code to include your .html file <?php $width = 55; include 'myfile.html'; ?> The output will be <table width="55"> You do not need to use output buffering/eval to parse the contents of an .html file that is being included.
-
Doesn't the EeePC come with Linux? If so Linux cannot run win32 code, unless you're running some form of emulator such as Wine.
-
PHPv5.0.5 upgrade to PHPv5.2.6
wildteen88 replied to Dominika's topic in PHP Installation and Configuration
Correct. -
can you use an image background to define the dimensions of a div?
wildteen88 replied to Darkmatter5's topic in CSS Help
You can only have text over background images. Why do you want to the div to automatically adjust to your background image? Cant you hard code the width/height of the div? #my_div { background-image: ('my_background.gif'); background-repeat: no-repeat; width: 700px; height: 100px; }