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.
|
|
|
|
|
![]() |
||
http://localhost/file.php
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
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?
|
|
|
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
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.
Last Blog Entry: 10 Reasons Why My Laptop Is Better Than Your Girlfriend (Dec 15th, 2007)
|
|
#4
|
|||
|
|||
|
Re: http://localhost/file.php
so then, how do i publish a website with php?
|
|
#5
|
|||
|
|||
|
Re: http://localhost/file.php
As long as php is installed on your server just put the files and they should work.
Pete. |
|
#6
|
|||
|
|||
|
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.
|
|
#7
|
|||
|
|||
|
Re: http://localhost/file.php
Have you tried looking here? http://www.wampserver.com/en/presentation.php
|
|
#8
|
|||
|
|||
|
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? |
|
#9
|
|||
|
|||
|
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. |
|
#10
|
|||
|
|||
|
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... |
|
#11
|
|||
|
|||
|
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. |
|
#12
|
|||
|
|||
|
Re: http://localhost/file.php
alright, thanks pete. so do you know which package i need for a site?
|
|
#13
|
|||
|
|||
|
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. |
|
#14
|
|||
|
|||
|
Re: http://localhost/file.php
Quote:
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)
|
|
#15
|
|||
|
|||
|
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. |
|
#16
|
|||
|
|||
|
Re: http://localhost/file.php
Though you can make changes to the XAMP thingy afterwards to make it secure, apparently.
Pete. |
|
#17
|
|||
|
|||
|
Re: http://localhost/file.php
Quote:
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)
|
![]() |
| Tags |
| localhost |
| Thread Tools | |
|
|
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 |