Welcome! Log In Create A New Profile

Advanced

Topic 3B

Posted by Anonymous User 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Anonymous User
Topic 3B
January 16, 2006 08:21AM
This is the thread for problems/comments related to Topic 3B.
Re: Topic 3B
March 07, 2006 10:45PM
I have successfully completed this topic.
Re: Topic 3B
March 13, 2006 05:15PM
why does the counter increase 2 at a time ie 2, 4,6,8 etc
when I test it in the designer's debug function, but when I test it using localhost it works correctly ie 1,2,3,4 etc?
Re: Topic 3B
March 13, 2006 05:53PM
no the text is not written to the text file

where are the variable $firstname etc actually assigned?

the <br><b> etc is actually written but not the variable text


Re: Topic 3B
March 13, 2006 08:48PM
I have completed the hit counter part of this task and it works fine, but I'm not clear about this line:
$currenthits = fread($fp, 20);

How do you know how many bytes to put done here. I can see that with this script that the number of hits is the only content of the file, but with a more complex file, how do you ascertain what the bytes should be?
avatar
Mac
Re: Topic 3B
March 15, 2006 09:25AM
How many bytes are required is not really an issue = you can use 1024 and that would be good enough for most of what you do.

If you really want to know, use

$size=filesize("./hits.txt"winking smiley;

If you echo $size you'll get 2, so you can use 2 if you want to.
Re: Topic 3B
March 15, 2006 12:47PM
I was right

the masterskill book did not give us the code to assign the variable
once I got this in it worked fine

I am still having trouble with 3B-2 which currently only displays foreward slashes
avatar
Mac
Re: Topic 3B
March 15, 2006 12:53PM
Angus you're a bit vague here... post your code and the error you receive to make things easier
Re: Topic 3B
March 15, 2006 01:53PM
Hi Mac

well it seems I do not know the difference between
$ and S ie one of the variables was not declaired correctly

so now I see the content of the studentPHP folder

when I selct a file this opens fine, and I can see the content.

if I select the Test folder
I get the standard page cannot be found

If I change the http://localhost/studentPHP/dir=./Network

to http://localhost/studentPHP/Network

then I get
Forbidden
You don't have permission to access /studentPHP/Network/ on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request


Re: Topic 3B
March 15, 2006 01:58PM
the above did not display as I had hoped it only shows the localhost

should actually read
if I change the content of the address bar "from http://localhost/studentPHP/dir=./Network";

"to http://localhost/studentPHP/Network/";

if this does not work then just place the cursor over the blue printed localhost and see the actual content in the bottom left of the screen
Sorry, you do not have permission to post/reply in this forum.