Page 1 of 2

Images not shown in MOZILLA from PHP CODE

Posted: Wed Dec 13, 2006 6:09 am
by eshban
I am facing little problem in PHP in MOZILLA BROWSER. IN IE there is no problem

Code: Select all

readfile("C:\\phpdev\\www\\bill\\webpages\\editor\\test_check.html");
i am just reading the file. In mozilla it does not show me images, but in IE it displays as well.

In file test_check.html, i use following syntax, but nonoe of them is working

Code: Select all


<img src="C:\\phpdev\\www\\test\\Water_lilies.jpg" width="100" height="100">
<img src=C:\phpdev\www\test\Winter.jpg width="100" height="100">

Plz guide that how can i fixed this problem in FIREFOX

Regards,
Eshban

Posted: Wed Dec 13, 2006 6:34 am
by CoderGoblin
If I were you I woud use a URL pathname, not a system pathname.

Posted: Wed Dec 13, 2006 6:38 am
by eshban
i am just running it offline. so [s]plz[/s]please tell me according to that

Re: Images not shown in MOZILLA from PHP CODE

Posted: Wed Dec 13, 2006 10:26 am
by neel_basu
eshban wrote:

Code: Select all

<img src="C:\\phpdev\\www\\test\\Water_lilies.jpg" width="100" height="100">
<img src=C:\phpdev\www\test\Winter.jpg width="100" height="100">
Hey I didn't Understand
Why You Are Using It Like This C:\\phpdev\\www\\test\\Water_lilies.jpg
Instead Of C:\phpdev\www\test\Water_lilies.jpg
When You Are Using It In HTML

Posted: Wed Dec 13, 2006 10:28 am
by neel_basu
eshban wrote:i am just running it offline. so [s]plz[/s]please tell me according to that
I Would Also Aggre To eshban
To Use Url Path Name You Doesn't Require To Go Online For testing Purpouse

Posted: Wed Dec 13, 2006 11:23 am
by Ollie Saunders
file://C:/phpdev/www/test/Water_lilies.jpg is probably safest. btw there is a client side forum for this kind of stuff.

Posted: Wed Dec 13, 2006 11:24 am
by John Cartwright
ole wrote:btw there is a client side forum for this kind of stuff.
Indeed.

Posted: Wed Dec 13, 2006 12:42 pm
by eshban
but still i did not find solution from the reply.
I tested my code with

Code: Select all

C:/a/pic.jpg
but it does not work in mozilla.

plz help

Posted: Wed Dec 13, 2006 1:31 pm
by Ollie Saunders
did you use file:// ? Because you probably should :)

Posted: Wed Dec 13, 2006 1:32 pm
by feyd
eshban, stop using aolspeak. I've asked in private messages, now I'm telling you in the forum.

As ole has said, file:// is the proper way to address the local file system.

Posted: Wed Dec 13, 2006 10:52 pm
by eshban
i am sorry sir, i will take care in future.

Posted: Wed Dec 13, 2006 11:00 pm
by eshban
unable to use file:// with readfile function.

i have do in this way.

Code: Select all

readfile("file://C://phpdev//www//bill//webpages//editor//test_beta2.html");
please correct its syntax, and help.

thanks

Posted: Wed Dec 13, 2006 11:09 pm
by feyd
You don't normally need file:// with readfile() it interacts with the file system directly. You need file:// for items referenced in the browser.

Posted: Wed Dec 13, 2006 11:30 pm
by eshban
sir, see my question, that what is my problem and what i want

Posted: Wed Dec 13, 2006 11:33 pm
by feyd
Why do you insist on using file system references? It's far more simple to get the web server to handle them.