Welcome! Log In Create A New Profile

Advanced

Problems in viewing the first PHP page

Posted by rharris 
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
Problems in viewing the first PHP page
July 04, 2008 03:33PM
Hi MAc

Im having a problem viewing my first PHP page . I have saved my testfile in C:program files/xampp/htdocs/RyanPHP/testfile.php and Im using Windows Vista Internet Explorer version 7. This is the error I get (Object not found! ERROR 404

Ryan Harris
Re: Problems in viewing the first PHP page
July 04, 2008 05:20PM
hmm, paste the code here so i can take a look,
or mail me the code craig [at] joomla-host. co .za
Will update the forum for others to catch the same issue if is in the code

also to make sure php is running correctly save a file called phpinfo.php with the following lines of code within it

<?php
phpinfo();
?>

run in browser
http://localhost/phpinfo.php

You should get a full schematic on your php installation, if you get the same error again, then the issue is with the xamp installation.

Craig G Smith
http://www.joomla-host.co.za
Anonymous User
Re: Problems in viewing the first PHP page
July 06, 2008 12:13PM
Hi Ryan,
please take a look at the thread opened by myself (iris.philipp) - there is a blue smiley in the subject line. The instructions in the readme file - in the last post I copied the complete section regarding installation - can perhaps help you.
Hope you will have success.
Regards,
Iris
sad smiley Re: Problems in viewing the first PHP page
July 10, 2008 10:31AM
Good morning Craig please e-mail me your e-mail address so I can email u the codes .my email address is ryan.hrrs@gmail.com . I tried to e-mail u on the address you give on the forum but my mail keeps coming back

Thanks

Ryan Harris
sad smiley Re: Re: Problems in viewing the first PHP page
July 10, 2008 08:52PM
sent you a mail,
you could also grab me on skype: joomlahostsa

Craig G Smith
http://www.joomla-host.co.za
Re: Problems with colorselect .html and book.html exercises
August 01, 2008 08:11AM
This deals with "Apply your knowledge 2-1" (page 18 in study guide) and "Task 2B-1"(page 22 in study guide).

I have written the PHP script for color.php and array.php exactly an indicated in the study guide.

In the case of colorselect.html and book.html a blank screen appears when I select a colour.

When I test array.php I in a browser get the following message: Parse error: parse error, unexpected T_STRING, expecting ']' in C:\xampp\xampp\htdocs\array.php on line 11 but I can see nothing wrong with the code. The code is exactly as in the study guide.

When I test color.php in a browser I get no return message so I assume the code is correct.

I hope there is someone who can assist me smile

Here is eg the code for array.php

<html>
<head><title>Who wrote that book?</title></head>
<body>
<!--INSERT CODE HERE-->

<?php

$books["Romeo and Juliet"] = "William Shakespeare";
$books["Exobiology: An Introduction"] = "Jonathan Drake";
$books["War and peace"] = "Leo Tolstoy";
$books[The Lion, the Witch and the Wardrobe"] = "CS Lewis";
$author = $books[$SelectedBook];
echo "The author of $SelectedBook is $author.";
?>

</body>
</html>


Johan Botha
Re: Problems with colorselect .html and book.html exercises
August 01, 2008 08:23AM
Sorry I left out a " in the code of array, but it still gives only the message "the author is ."

JB
Re: Problems with colorselect .html and book.html exercises
August 01, 2008 08:39AM
even if I use the file for array.php which is provided in "Complete datafiles" in lesson 2 on the CD, I get the same results. Sorry for all the posting but I just cannot get a solution.
JB
avatar
Mac
Re: Problems in viewing the first PHP page
August 01, 2008 10:27AM
> Parse error: parse error, unexpected T_STRING, expecting ']' in
> C:\xampp\xampp\htdocs\array.php on line 11 but I can see nothing wrong with the > code. The code is exactly as in the study guide

Parse error messages always mean that there is a typo somewhere - never trust books....

Post all your pages....
Sorry, only registered users may post in this forum.

Click here to login