Search found 60 matches

by thallish
Tue Sep 12, 2006 1:42 pm
Forum: PHP - Code
Topic: Listing all files in a directory
Replies: 5
Views: 1084

Just to share what I just did: Listing all the files in the current directory: if ($handle = opendir('.')) { echo "<label class=\"label\">Filer:</label> <br />"; // loop the directory while (false !== ($file = readdir($handle))) { // if we are looking at a file and it is // not a...
by thallish
Tue Sep 12, 2006 1:36 pm
Forum: PHP - Code
Topic: Listing all files in a directory
Replies: 5
Views: 1084

thx.. just what I need;-)
by thallish
Tue Sep 12, 2006 1:00 pm
Forum: PHP - Code
Topic: Listing all files in a directory
Replies: 5
Views: 1084

Listing all files in a directory

Hi Does anyone know how/or what to use, to get all files in a directory listed. What I'm looking for is just some accesstos which files are in the directory specified, the rest I can do on my own :lol: I have been looking all over for this functionality, and I hope it can be one from a php point a v...
by thallish
Tue Sep 12, 2006 12:35 pm
Forum: General Discussion
Topic: C or C++
Replies: 29
Views: 5336

You could also go with Python while it is not compiled it is very neat :wink:
by thallish
Wed Sep 06, 2006 1:45 am
Forum: PHP - Code
Topic: file comparision
Replies: 4
Views: 329

you can use file() or file_get_contents(), and the compare the arrays or strings

dont know if this is the most effective way though

EDIT: Oren's response is better :lol:
by thallish
Wed Sep 06, 2006 1:36 am
Forum: PHP - Code
Topic: Error on line 14.. Why?
Replies: 4
Views: 407

you need a session_start() in your success.php

EDIT:or in every file you want to use sessions for that matter
by thallish
Wed Sep 06, 2006 1:29 am
Forum: PHP - Code
Topic: Get radio buttons to retain info after failed validation
Replies: 5
Views: 454

Check your $_POST['Which_one_of_the_following_best_describes_you'] value. Whatever it returns is what you chould check.
You have to check each of them, but you can make it easier by writing all the radio buttons in a foreach loop.

And rememberr to

Code: Select all

unset()
the variable afterwards :wink:
by thallish
Wed Sep 06, 2006 1:13 am
Forum: PHP - Code
Topic: Newbie in need of help databas Output not echoing properly??
Replies: 8
Views: 510

well it looks like that whatever comes in 'content' is false somehow, try to echo out your $_POST['content'] to verify that it is valid content, and try to use mysql_real_escape_string() on your $content before inserting into your database. I just spotted another thing. In you INSERT statement you a...
by thallish
Tue Sep 05, 2006 2:30 pm
Forum: PHP - Code
Topic: Newbie in need of help databas Output not echoing properly??
Replies: 8
Views: 510

Hi

just to see what the output of your query is, try to print_r($row) in your while loop

and when your accessing $row by id's anyway take a look at mysql_fetch_assoc()
by thallish
Tue Sep 05, 2006 1:52 pm
Forum: PHP - Code
Topic: chmod behaving inappropriate
Replies: 0
Views: 156

chmod behaving inappropriate

hi I am trying to get chmod to set permissions like chmod 0777, but when I check the actual permissions it is 0700. Can anybody tell me why that is happening? And the same thing happens when I make a directory with mkdir(dirname, 0777) I can easily make a directory and copy files from hither to dith...
by thallish
Sun Aug 27, 2006 9:35 am
Forum: PHP - Code
Topic: document paths
Replies: 6
Views: 400

Oren wrote:Maybe this?

Code: Select all

$pro_root = $_SERVER['DOCUMENT_ROOT'] . '/PIP/';
I'll try that too :lol:
by thallish
Sun Aug 27, 2006 9:16 am
Forum: PHP - Code
Topic: document paths
Replies: 6
Views: 400

thx feyd

ill look into tonight :wink:

(got to go eat now)
by thallish
Sun Aug 27, 2006 9:09 am
Forum: PHP - Code
Topic: document paths
Replies: 6
Views: 400

hi again I mean a method (or a hint in the right direction :D ) that will work from every file, that being the root folder 'PIP' and all subfolders 'PIP/whateverFolderIWant To Use/. The idea is that I am creating new folder that users can put files in, and in these folders I have a standard file tha...
by thallish
Sun Aug 27, 2006 8:48 am
Forum: PHP - Code
Topic: document paths
Replies: 6
Views: 400

document paths

Hi all I have an issue that I can't wrap my head around. I have a file in the folder: PIP/folder/file.php and I need to require a file in PIP/anotherfolder/foldermore/fileToRequire.php . The folder PIP is the root folder of the project. How do I do that? This need to be a generic method, ie no absol...
by thallish
Fri Oct 21, 2005 2:32 am
Forum: Miscellaneous
Topic: [SOLVED]Problem with getting parameter from html with applet
Replies: 5
Views: 1237

Now it all works. ill post my code here. This is my Java class public class RunApplet extends JApplet { FlowLayout flowLayout1 = new FlowLayout(); static int numberOfButtons = 0; public int userId; //Get a parameter value //if null then return default value provided public String getParameter(String...