http://localhost/file.php

This is a discussion on "http://localhost/file.php" within the PHP Forum section. This forum, and the thread "http://localhost/file.php are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Jul 11th, 2007, 09:16
Junior Member
Join Date: Jul 2007
Location: England
Age: 22
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Question http://localhost/file.php

okay, this will probably sound quite foolish, but once you've created your php files, and their opening up fine in http://localhost how do you get them to open up from a different source, and still read your php code? for example if i save the php file in My documents?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Jul 11th, 2007, 09:48
Up'n'Coming Member
Join Date: Jul 2007
Location: France
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Re: http://localhost/file.php

What are you using as a local server? Is it XAMPP (LAMPP)?

If it's XAMPP, open up as normal and click on parent directory at the top. That will take you to the Welcome page, from where you can view the manual for setting up file locations - at least it does all this in XAMPP for Linux.

Normally the default location is something like public_html or html_docs. Personally, I'd be inclined to use the default as a separate development folder, and leave My Docs out of it.

Hope that helps.

Last edited by matelot; Jul 11th, 2007 at 09:49. Reason: Typo
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Jul 11th, 2007, 09:50
Highly Reputable Member
Join Date: Apr 2007
Location: Willich, Germany
Age: 20
Posts: 593
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: http://localhost/file.php

No, they have to stay in that folder for the PHP code to be parsed. Unless you change your PHP server settings, but I'm not sure how to do that.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Jul 11th, 2007, 09:57
Junior Member
Join Date: Jul 2007
Location: England
Age: 22
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Re: http://localhost/file.php

so then, how do i publish a website with php?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Jul 11th, 2007, 10:00
Most Reputable Member
Join Date: May 2006
Location: North West, UK
Age: 22
Posts: 1,173
Thanks: 0
Thanked 0 Times in 0 Posts
Re: http://localhost/file.php

As long as php is installed on your server just put the files and they should work.

Pete.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Jul 11th, 2007, 10:08
Junior Member
Join Date: Jul 2007
Location: England
Age: 22
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Re: http://localhost/file.php

hmm.. i have windows and WAMP5.. it does have a welcome page but i can't find any info at the moment.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Jul 11th, 2007, 10:16
Up'n'Coming Member
Join Date: Jul 2007
Location: France
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Re: http://localhost/file.php

Have you tried looking here? http://www.wampserver.com/en/presentation.php
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Jul 11th, 2007, 10:19
Junior Member
Join Date: Jul 2007
Location: England
Age: 22
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Re: http://localhost/file.php

wamp came with php, mySQL and apache. so they are all installed.
I want to be able to create a php file anywhere on my computer and to be able to open it up as a webpage with the php still being parsed even though it is not stored on the server. is that possible?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Jul 11th, 2007, 10:23
Most Reputable Member
Join Date: May 2006
Location: North West, UK
Age: 22
Posts: 1,173
Thanks: 0
Thanked 0 Times in 0 Posts
Re: http://localhost/file.php

It need to be within a certain folder on your pc (this folder should be named in the readme or manual). Just create a new folder and put all you sites withing that. Alternatively you can change the settings but I'm, not sure how you do that. I've never bothered. The documentation should tell you how its done.

Pete.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old Jul 11th, 2007, 10:24
Up'n'Coming Member
Join Date: Jul 2007
Location: France
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Re: http://localhost/file.php

Probably not, because you need to set a path for the local server to find the file. That's why these progs have a default directory. They are designed for development on your local computer before uploading. It's not a substitute operating system per se.

Although someone may know a way to do it...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #11  
Old Jul 11th, 2007, 10:29
Most Reputable Member
Join Date: May 2006
Location: North West, UK
Age: 22
Posts: 1,173
Thanks: 0
Thanked 0 Times in 0 Posts
Re: http://localhost/file.php

These installation packages are no good for an actual site, only development. You can use them for non-dev stuff but they are totally open, insecure. I think you'd need to do some jiggery pokery to make it safe for deployment, as it were.

Pete.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12  
Old Jul 11th, 2007, 10:37
Junior Member
Join Date: Jul 2007
Location: England
Age: 22
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Re: http://localhost/file.php

Quote:
Originally Posted by pa007 View Post
These installation packages are no good for an actual site, only development.
alright, thanks pete. so do you know which package i need for a site?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13  
Old Jul 11th, 2007, 10:50
Most Reputable Member
Join Date: May 2006
Location: North West, UK
Age: 22
Posts: 1,173
Thanks: 0
Thanked 0 Times in 0 Posts
Re: http://localhost/file.php

You'd be best actually doing it all individually as opposed to from a package. If you get a hosting deal then all of this stuff will be installed. Its pretty complicated installing all three on a server from scratch and then getting everything working properly. Also making sure things are safe and stable. I certainly want to attempt anything like this.

Your best bet is to go over to php.net, mysql.com and apache.org. Then have a look at the documentation, they will tell you the best way to install them. I don't think its a small job though.

Pete.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14  
Old Jul 11th, 2007, 22:01
Most Reputable Member
Join Date: Dec 2006
Location: San Francisco
Age: 57
Posts: 1,567
Blog Entries: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Re: http://localhost/file.php

Quote:
Your best bet is to go over to php.net, mysql.com and apache.org.
It's not. That's what I did originally and although I finally got them all working...most of my hair was gone.
So I went searching and discovered XAMPP..... It may be cheating but I like having all three integrated into one package. My personal opinion, but I am no longer bald.
Last Blog Entry: More Sara Blogging (Nov 29th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #15  
Old Jul 11th, 2007, 22:27
Most Reputable Member
Join Date: May 2006
Location: North West, UK
Age: 22
Posts: 1,173
Thanks: 0
Thanked 0 Times in 0 Posts
Re: http://localhost/file.php

These sorts of installation packages aren't ideal. They're just easier than installing each one individually by hand. Often these installation packages don't contain these latest versions and azilaka was asking about using it to host his/her site and XAMP et al are only meant for development due to security issues. The XAMP people point this out in their documentation.

Pete.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #16  
Old Jul 11th, 2007, 22:28
Most Reputable Member
Join Date: May 2006
Location: North West, UK
Age: 22
Posts: 1,173
Thanks: 0
Thanked 0 Times in 0 Posts
Re: http://localhost/file.php

Though you can make changes to the XAMP thingy afterwards to make it secure, apparently.

Pete.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #17  
Old Jul 13th, 2007, 21:56
Most Reputable Member
Join Date: Dec 2006
Location: San Francisco
Age: 57
Posts: 1,567
Blog Entries: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Re: http://localhost/file.php

Quote:
Though you can make changes to the XAMP thingy afterwards to make it secure, apparently.
yes, you can.

I just have xampp on my computer to test my site as I am working on it. It has been a great help seeing how things look.
Last Blog Entry: More Sara Blogging (Nov 29th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
localhost

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
http post xml string and binary file in multipart message pezkel Classic ASP 0 Jun 10th, 2007 08:12
Passing an XML file from Localhost to Server... JustinStudios Classic ASP 1 Apr 13th, 2007 21:27
how to send xml file through http post or get camarun20 Other Programming Languages 5 Aug 10th, 2006 15:22


All times are GMT. The time now is 03:43.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved