Welcome Guest, Not a member yet? Register   Sign In
localhost
#1

[eluser]-spy-[/eluser]
im just a beginner, and have no experience yet in web development(OOP), im really eager to learn this, my question is very simple.. im running my project in localhost, but im not using the base url, i don't know how to include this when you are running in localhost.. i want to try the base url, is it possible?
#2

[eluser]ejangi[/eluser]
Sure is, just set the "base_url" variable in your config file. You should find in /application/config/config.php a line that goes like this:
Code:
$config['base_url']    = "";

Just put the localhost url in there:
Code:
$config['base_url']    = "http://localhost/myapplication/";
#3

[eluser]-spy-[/eluser]
I've tried that already, but it's not working, instead of using the base url, im using the folder name...like this:
http://localhost/Foldername/index.php

i want to run my project like this:

http://localhost/your-site.com/index.php
#4

[eluser]Phil Sturgeon[/eluser]
Not sure what your trying to achieve here. Baseurl needs to be set for general CI functions to work properly (like form_open, redirect, site_url, anchor, etc). If you are worried about online and offline baseurls then just use the code...

Code:
if($_SERVER['SERVER_NAME'] == 'localhost'):
$config['base_url']    = "http://localhost/sitename/";
else:
$config['base_url'] = "http://www.sitename.com/";
endif;
#5

[eluser]eggshape[/eluser]
Besides what thepyromaniac wrote, if you are using a Mac or Linux box, you need to alter config.php to something like this:

Code:
config['base_url'] = 'http://localhost/~youracct/sitename/';
#6

[eluser]Phil Sturgeon[/eluser]
Dont forget to add any port numbers too. For example, MAMP by default is:

Code:
$config['base_url'] = 'http://localhost:8888/sitename/';
#7

[eluser]-spy-[/eluser]
im using XAMPP..
#8

[eluser]maadmac[/eluser]
[quote author="-spy-" date="1197544384"]im using XAMPP..[/quote]

Then all you need is:

Code:
config['base_url'] = 'http://localhost/{path_to_your_CI_folder}/';
#9

[eluser]JunglistPerfection[/eluser]
I'm using EasyPHP 1.8 for my offline site and I having a hard time getting my pages to show. My welcome page is fine, but I can't seem to get my other pages to work.

I read the user_guide and followed instructions, but no success.

Can someone help me with this?
#10

[eluser]gtech[/eluser]
check out the trouble shooting section of the documentation, and also check this link out that i've just posted to earlier on this evening:
[url="http://ellislab.com/forums/viewthread/79914/"]http://ellislab.com/forums/viewthread/79914/[/url] it could be related as what you are seeing is the same, ie only the default controller loads.




Theme © iAndrew 2016 - Forum software by © MyBB