Ask a Question related to Dreamweaver AppDev, Design and Development.

  1. #1

    Default php help


    Hello,

    I am Dipesh from BG Broadband, India.. I have configured freetds with php
    as well as apache.

    I am also able to connect to the sql server 2000 server through the tsql
    utility of the freetds. But when I am connecting with the php script by the
    mssql_connect or sybase_connect function then the error log shows that the
    connection is refused or the user is denied permission.

    The same thing done manually works but via php doesn't

    Can u help me

    Thanx in advance

    Regards,
    Dipesh

    Dipesh Khacharia Guest

  2. #2

    Default php help

    I created a sql database in phpMyAdmin. my pictures tables include fields of
    pic & pId (blob field w/ mime type of image/jpeg: inline). Once I create the
    recordset in Dreamweaver, how can I get the pictures to display, because right
    now I'm only seeing the binary code???

    Thanks for the help . . .

    eddo32 Guest

  3. #3

    Default Re: php help

    eddo32 wrote:
    > I created a sql database in phpMyAdmin. my pictures tables include fields of
    > pic & pId (blob field w/ mime type of image/jpeg: inline). Once I create the
    > recordset in Dreamweaver, how can I get the pictures to display, because right
    > now I'm only seeing the binary code???
    Storing your images in a database is *not* a good idea (as you've just
    discovered). The most practical way to handle images and databases is to
    store the images in a normal filesystem, and to store the location of
    the image in the database. In other words, put your images in a folder
    called "images" (or whatever), and store names like "mayflower.jpg" in
    the database. You then just put the image name as the src attribute iin
    an img tag in your pages. Much simpler.

    If you do want to do things the hard way, though, there's an article
    about it here:

    [url]http://www.onlamp.com/pub/a/onlamp/2002/05/09/webdb2.html[/url]

    --
    David Powers
    Author, "Foundation PHP 5 for Flash" (friends of ED)
    Co-author "PHP Web Development with DW MX 2004" (Apress)
    [url]http://computerbookshelf.com[/url]
    David Powers Guest

  4. #4

    Default Re: php help

    David,

    Thanks for the suggestion. After I do this, is there a way to realte the image path to display the actual image through a recordset??
    eddo32 Guest

  5. #5

    Default Re: php help

    eddo32 wrote:
    > David,
    >
    > Thanks for the suggestion. After I do this,
    After you do what? If you want to put the images in a database, you'll
    have to follow the instructions in the article. If you do things the
    sensible way, you just store the filename in the database, and use the
    Bindings panel to insert the filename into the src attribute of an <img>
    tag. Let's say all your files are in a folder called images, your code
    would look like this:

    <img src="images/<?php echo $row['image']; ?>" alt="...

    --
    David Powers
    Author, "Foundation PHP 5 for Flash" (friends of ED)
    Co-author "PHP Web Development with DW MX 2004" (Apress)
    [url]http://computerbookshelf.com[/url]
    David Powers Guest

  6. #6

    Default php help

    i made a couple of test pages for my website using php. when i preview them in
    dreamweaver, they display fine, but when i try typing the url in or click on a
    link to this page, it comes back with:

    Warning: main(Connections/davis.php): failed to open stream: No such file or
    directory in /home/davisfur/public_html/staff.php on line 1

    Fatal error: main(): Failed opening required 'Connections/davis.php'
    (include_path='.:/usr/lib/php:/usr/local/lib/php') in
    /home/davisfur/public_html/staff.php on line 1

    does anyone have any ideas?

    thanks . . .


    eddo32 Guest

  7. #7

    Default Re: php help

    never mind, i figured it out.
    eddo32 Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139