SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 33 of 33
  1. #26
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Alluvian View Post
    Anytime I try to do something like <img src="/images/pict.jpg"> the stupid thing gives me a broken link in the preview because it is looking for "c:\images\pict.jpg" GAH.
    Are you not accessing this page through a web server?

  2. #27
    SitePoint Evangelist Alluvian's Avatar
    Join Date
    Jan 2007
    Location
    Orlando, FL
    Posts
    417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Grossman View Post
    Are you not accessing this page through a web server?
    I don't understand the question...


    Maybe I was unclear?
    In my html I might have the following location typed into the html and/or css style sheet "/images/pic.jpg" This works fine online and retrieves "http://www.domainname.com/images/pic.jpg".

    I obviously want to use the same code locally and don't want to retype all my links and file locations before I upload a file. But the pic.jpg link looks for the picture at c:\images\pic.jpg instead of c:\website\domainname\images\pic.jpg where I want it to look. Basically I want that first \ to set me to my project root directory when working offline and not my hard drive root.

    Am I missing something? Is there some different way I should write that link in the html? I suppose I could write my links to be relative and have my css file point to "../images/pic.jpg" (my css are in a css folder off the root), but then I have to deal with different directories for the same file depending on what file I am editing, it makes the html far less re-usable. If I ever move that .css file somewhere else, all my links in it break as well.

  3. #28
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I mean, are you viewing the page you're developing by opening a browser and opening "c:\website\domain\page.html" or are you actually running a web server and accessing it at "http://localhost/page.html"?

  4. #29
    SitePoint Enthusiast
    Join Date
    Jan 2007
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Alluvian View Post
    I don't understand the question...

    Maybe I was unclear?
    In my html I might have the following location typed into the html and/or css style sheet "/images/pic.jpg" This works fine online and retrieves "http://www.domainname.com/images/pic.jpg".

    I obviously want to use the same code locally and don't want to retype all my links and file locations before I upload a file. But the pic.jpg link looks for the picture at c:\images\pic.jpg instead of c:\website\domainname\images\pic.jpg where I want it to look. Basically I want that first \ to set me to my project root directory when working offline and not my hard drive root.
    I develop on Windows (WAMP) and use Dreamweaver 8. If you use its Site functionality (and why wouldn't you?) it allows you to map any folder on your drive as a "HOME" or "public_html" directory.

    So if your files live at C:\webroot\site1\index.php just create a new Site in Dreamweaver and map the SiteRoot to C:\webroot\site1\ You can then use <img src="/images/img1.jpg"> which will work as C:\webroot\site1\images\img1.jpg on your drive. Then if you're running a local Apache, and assume your DocumentRoot is C:\webroot\ you could access your site locally at http://localhost/site1/

    Works the same if you define a Site in Zend, and probably others.

    As per on-topic, I have tried Zend Studio but hate the color-formatting and font style. I've used Dreamweaver for years and have come highly accustomed to its PHP syntax coloring. I can only get similar colors in Zend and it still isn't as customizable as Dreamweaver. I'll pop a script open real quick if it has an error and use the debugger, but stick to DW for all my coding...

    Although how I long for the great code-completion Zend offers in a future edition of Dreamweaver... I think I'll try out Eclipse thanks to the recommendations in this thread.

  5. #30
    SitePoint Evangelist Alluvian's Avatar
    Join Date
    Jan 2007
    Location
    Orlando, FL
    Posts
    417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Dan Grossman View Post
    I mean, are you viewing the page you're developing by opening a browser and opening "c:\website\domain\page.html" or are you actually running a web server and accessing it at "http://localhost/page.html"?
    I am trying to do both of course.

    I have a site, the site is live, and it works fine on the server. Locally, the files are all broken links because I can't figure out how to define a new local root, home, public_html directory or whatever I should call it with my present software.

    I am currently using coffeecup html editor (came free with the site hosting), and php designer pro 2007. For all the features of the latter I am SHOCKED that I cannot set a root or home directory. I probably can but for the life of me I cannot figure out how. The help file is just an adobe pdf and everyone is asleep at the wheel at their forums.

    apinomus touched on exactly what I am looking for, but I cannot afford dreamweaver unless the site starts actually bringing in money.

  6. #31
    SitePoint Wizard TheRedDevil's Avatar
    Join Date
    Sep 2004
    Location
    Norway
    Posts
    1,198
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)
    Setup a local php server (for example apache), and put the files under the htdocs (or update apache to set a new document path).

    Then you will have no problems with your path settings when accessing the pages in a browser.

  7. #32
    SitePoint Evangelist Alluvian's Avatar
    Join Date
    Jan 2007
    Location
    Orlando, FL
    Posts
    417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TheRedDevil View Post
    Setup a local php server (for example apache), and put the files under the htdocs (or update apache to set a new document path).

    Then you will have no problems with your path settings when accessing the pages in a browser.
    That is probably quite true, but I am a newb, and my attempts at doing so have all ended in various errors. I have enough of a hard time learning the languages and how to get the already installed server apps doing what I want.

    It just does not seem like a difficult feature to have in software that is supposedly designed to make this whole process easier.

  8. #33
    SitePoint Enthusiast FSan's Avatar
    Join Date
    Dec 2005
    Location
    San Martin de los Andes, Patagonia Argentina
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Alluvian View Post
    That is probably quite true, but I am a newb, and my attempts at doing so have all ended in various errors. I have enough of a hard time learning the languages and how to get the already installed server apps doing what I want.

    It just does not seem like a difficult feature to have in software that is supposedly designed to make this whole process easier.
    Get this:

    http://www.uniformserver.com/

    Good 'n easy.

    I won't say more. It's all in the site.

    I remember when I first relized I had to set-up a local virtual server for testing purposes. Geez

    Good luck


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •