Imtay22
Apr 14 2007, 02:13 PM
| | Whoops, guess i forgot the closing tag. I just restarted Apache, so I will try it after i put the closing tag back on there. Thanks!
EDIT- Now it is appearing as nothing! I added the closing tag, restarted Apache, went to http://127.0.0.1/index.php and nothing! |
Comment/Reply (w/o sign-up)
truefusion
Apr 14 2007, 02:25 PM
Well, if you want a complete tutorial on how to install more things along with Apache and PHP, you can check out a tutorial i made on my website. Though, i must admit the section on PHPMyAdmin is a bit out of date, for the newer versions don't require you to edit anything, really.
Also, try this code: CODE <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"> <title>Testing PHP include functions.</title> </head> <body> <a href="?p=idx">Index</a> - <a href="?p=test">Test Page</a> <?php $page=$_GET['p']; switch($page){ case 'idx': include (".../includes/testphpinclude.html"); break; case 'test': echo 'Test!'; break; } ?> </body> </html>
Comment/Reply (w/o sign-up)
shadowx
Apr 14 2007, 02:52 PM
It seems odd that its not working, perhaps just write a very simple php page with just an ECHO in it to see if it works or not. then follow the steps already said about putting it in the right place and such. If it still doesnt work i would suggest trying XAMPP as its very easy to install and use. Uses a simple installer and an even simpler control panel for starting and stopping php, sql, mail servers, and ftp server. You can google the name and normally find it near the top if you wanted to use it. If you want to keep trying with this then i would use just the ECHO command and if it works you will see the text and if not you will get some sort of error. Also if you did not delete the original php files you could find where they are located and make sure your php files are in the same directory. And you might want to try taking down any firewalls you have as some of them might get a little worried about accessing the localhost. Mine gave me lots or alerts when i was using FF to access the localhost address, that was until i made a rule for it so try that too.
Comment/Reply (w/o sign-up)
Imtay22
Apr 14 2007, 04:15 PM
Ahh it works now it was truefusions find, I forgot to add This- }. Now I can't get the include() function to work. Weird.
Comment/Reply (w/o sign-up)
matak
Apr 14 2007, 05:01 PM
i think you have one extra dot in your include code.. CODE include (".../includes/testphpinclude.html"); should be CODE include ("../includes/testphpinclude.html");
Comment/Reply (w/o sign-up)
Imtay22
Apr 14 2007, 05:12 PM
Ahhh ok or could i just put no dots at all? What should be in the include file? the text is- QUOTE Testing the php Include Function! Thank you guys for your help!
Comment/Reply (w/o sign-up)
truefusion
Apr 14 2007, 05:53 PM
QUOTE(Imtay22 @ Apr 14 2007, 01:12 PM)  [. . .] [1]could i just put no dots at all? [2]What should be in the include file? [1]If you have no dots, then the folder "includes" with all of its files in it would have to be located in the DOCUMENTROOT folder (which is probably "htdocs", assuming the file you're testing is located in the same folder; or whatever DOCUMENTROOT is set in the Apache httpd.conf file). Two dots mean "up one folder"; one dot means "current folder". If you have no dots but the path starts with a slash (/), then that means it'll look in the root folder. [2]Whatever you want.
Comment/Reply (w/o sign-up)
Imtay22
Apr 15 2007, 12:25 AM
Okay thanks everyone I hope it works now! I have index.php in the htdocs folder, and the include file in htdocs/includes/testphpinclude.html. It still is not showing anything when I click on Index. Im going to upload it to the trap. EDIT= When I uploaded to to the trap, it wored fine! Check it out here. That was weird..
Comment/Reply (w/o sign-up)
Similar Topics
Keywords : install, php, locally,
- How To Install Gzip ?
(2)
Mysql Adodb Connector, Need Help
where is it or how do I install the adodb connector for mysql? (2) Hello, sorry if its in the wrong post, but I suppose it has something to do with php because its the
language I am going to use to connect to my sql through this connector, if it is available which is
the question I am asking. Is the adodb connector available on trap17 hosting? if so where is it? I
have looked all over for it and I couldnt find it. If its not available, how can I install it? Is
there a way? Thanks in advance for any help. /smile.gif" style="vertical-align:middle" emoid=":)"
border="0" alt="smile.gif" />....
Code To Install Mysql Database Table?
(5) Can anyone show me example code of how to install a database table instead of me having to upload an
file with it in, so i can do it from a php page? Thanks in advance ;-)....
Gtk For Php
Help to Install GTK for PHP (1) Where I can get GTK for PHP and It port on WIN32 ?....
Phpbb Install Error
help w/ phpbb plz.... (2) ok, i type in eveything that phpbbb asked to install, and i use the info i got in the mail and made
a db, but it doesn't work at all.......instaed it says "An error occurred trying to update the
database You have an error in your SQL syntax; check the manual that corresponds to your MySQL
server version for the right syntax to use near ''' at line 1" what does this mean and
how do i fix this and install the forum?? i have tried to install this many times now but it never
works /sad.gif' border='0' style='vertical-align:middle' alt='sad.gif' /> ......
Postnuke Install Problems On Subdomains
(1) I'm trying to install PostNuke on a empty server I allready got PostNuke downloaded and uploaded
the downloaded files to the server but I can't get it to work. I'm trying to do this on 2
servers both are sub-domains and both support php. One of them has a MySQL database and MyAdmin but
I can't find them anywhere on the sub-domain. I'm pretty new to this and any advise would be
more then welcome to me. I tryed looking for a MySQL database to install but when I do I get
something like 30 different versions and don't know whitch one I need I tryed th....
PHP 5.0.0 Released!
Anyone has tried to install PHP5???? (8) Hey everybody, anyone make PHP5 works fine?? I tried but the MySQL dont work :-(....
Looking for install, php, locally,
|
Searching Video's for install, php, locally,
|
advertisement
|
|