Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need a little php help
#1
Ok basically what the script does is gets a files name and then show it as a picture. That part works. What I'm trying to do is run a inc file that has the same name as the jpg but also has the .inc added onto the end of it so that I can put a caption under the picture that matches the image without having to put it in manually.

The slight problem I am having is that it gets the name of the jpg and adds it to the .inc but for some reason it puts a space inbetween the name and the .inc.

Here is the code, I will post the full code in the another message...

Code:
$inc_ext = ".inc";                           //Puts the .inc at the end of the quote file name
$quote_folder = "potd/potd_quote/";           //Image Quote

The above code was used to setup the folder

The code below is one of the pieces of code I have tried.  When I used the echo line I would get potd/potd_quote/post-5-1088106344.jpg .inc

$quote_potd = $quote_folder.$photo[$qc]."$inc_ext";
# echo $quote_potd;
include ("$quote_potd");

I get the error messages...

Warning: main(potd/potd_quote/post-5-1088106344.jpg .inc): failed to open stream: No such file or directory in /srv/www/vadavaka/test.php on line 203

Warning: main(): Failed opening 'potd/potd_quote/post-5-1088106344.jpg .inc' for inclusion (include_path='.:/usr/share/php') in /srv/www/vadavaka/test.php on line 203

heck I even created the files with the space in it and I still get those error message. The line that the error is on is off because have lots of other code above this.
Reply


Messages In This Thread
Need a little php help - by Gwarsbane - 08-13-2004, 05:46 PM
Need a little php help - by Gwarsbane - 08-13-2004, 05:46 PM
Need a little php help - by Gwarsbane - 08-13-2004, 07:31 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)