User Profile

Collapse

Profile Sidebar

Collapse
cooldht
cooldht
Last Activity: Aug 21 '07, 05:48 AM
Joined: Jul 8 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • cooldht
    replied to file_exists() function doesn't return a value
    in PHP
    Thanks again PB. That could be very awesome. If that function works right for me, I could very well find myself doing some re-design on various websites as I think it could be a useful little gadget!

    Thanks,

    CT
    See more | Go to post

    Leave a comment:


  • cooldht
    replied to file_exists() function doesn't return a value
    in PHP
    Hi guys,

    I selectively forgot to mention that I had tried the old ../ trick right off the bat, and didn't seem to do it. However, the DOCUMENT_ROOT trick seems to work ok. Thanks PB! I think I can make due doing it this way. Although, I'm a little surprised this worked, but the ../ trick didn't. Oh well, live and learn! Thanks for all the help!

    CT
    See more | Go to post

    Leave a comment:


  • cooldht
    replied to file_exists() function doesn't return a value
    in PHP
    Thanks for the reply.

    Ok, this is what was returned this time around....

    string(17) "/images/roses.gif"
    bool(false)

    Warning: Wrong parameter count for fread() in /home/httpd/vhosts/httpdocs/pictures.php on line 61

    Any ideas?

    Thanks!

    CT
    See more | Go to post

    Leave a comment:


  • cooldht
    replied to file_exists() function doesn't return a value
    in PHP
    Hi PB,

    I received the following when trying the code mentioned:

    bool(false)

    Warning: Wrong parameter count for fread() in /home/httpd/vhosts/httpdocs/pictures.php on line 59


    The funny thing is, if I put the page in the same directory as where the file exists, it finds the file ok by making $filename equal to roses.gif only, instead of specifying /images/roses.gif.

    Thanks,...
    See more | Go to post

    Leave a comment:


  • cooldht
    replied to file_exists() function doesn't return a value
    in PHP
    I'm not the main person that deals with the server side of things, so forgive me if I don't answer correctly. I can access the server, so I can view certain statistics. I can see the OS running says Linux 2.6.8-022stab070.9-enterprise. Is that what you are looking for?

    Thanks,

    ct
    See more | Go to post

    Leave a comment:


  • cooldht
    replied to file_exists() function doesn't return a value
    in PHP
    Sorry again,

    I forgot to mention that I have the debugging on in the page, and didn't receive any error messages.

    Thanks,

    ct
    See more | Go to post

    Leave a comment:


  • cooldht
    replied to file_exists() function doesn't return a value
    in PHP
    Hi PB,

    Sorry about leaving out the tags. I'm assuming you wanted to know the PHP version on the server. That is 4.3.8-1.1. Just in case, the MYSQL version is 3.23.58-4.

    Thanks!

    cooldht
    See more | Go to post

    Leave a comment:


  • cooldht
    started a topic file_exists() function doesn't return a value
    in PHP

    file_exists() function doesn't return a value

    Hi all,

    I ran into a cool function in a google search, called file_exists that would do exactly what I need it to do. Unfortunately, I think something is wrong with the logic I'm using, because it returns a value of null instead of true or false. It seems to work great if I check for something in the base directory, but when I try something outside of the root, it fails. The check file code looks like this:
    [code=php]if (file_exists($f ilename))...
    See more | Go to post

  • cooldht
    replied to Fast MYSQL table lookup in a large table
    in PHP
    Thanks for the responses. I was wanting to do something similar, but was having problems with the LEFT JOIN logic and on how the middle man table should work. I think it makes sense now, and think that's the way I'll proceed. Thanks again!
    See more | Go to post

    Leave a comment:


  • cooldht
    replied to Fast MYSQL table lookup in a large table
    in PHP
    Thanks for your reply!

    Actually, believe it or not, the code that's in there now is SELECT count(*) FROM restaurants WHERE cuisine1 LIKE '%italian%' and city = 'Los Angeles'. And that is painfully slow. To get past the problem at hand, I think I can add a numeric field for every cuisine to the cities table, which is the total number of it's kind in that city. Then when building the page, I can just go through the cities and display...
    See more | Go to post

    Leave a comment:


  • cooldht
    replied to Fast MYSQL table lookup in a large table
    in PHP
    Hi MW, thanks for the advice! I'll put that on the list of possibilities for the re-design.

    PB, I guess there is a limit. I receive the error "#1069 - Too many keys specified. Max 32 keys allowed". There are somewhere around 90 cuisine fields unfortunately.

    Thanks!
    See more | Go to post

    Leave a comment:


  • cooldht
    started a topic Fast MYSQL table lookup in a large table
    in PHP

    Fast MYSQL table lookup in a large table

    Hi all,

    I'm still trying to learn the ins and outs of MYSQL. I have a large database of restaurants sitting on our server, and I want to be able to cross reference the cuisines and display a page that says there are 15 Italian restaurants in Los Angeles California, 12 Mexican places in L.A., for example. the cuisine fields are character. For example, the restaurant name might be Charlie's Pizzeria, and the cuisine field could have...
    See more | Go to post
No activity results to display
Show More
Working...