JavaScript and client side scripting.
Moderator: General Moderators
eshban
Forum Contributor
Posts: 184 Joined: Mon Sep 05, 2005 1:38 am
Post
by eshban » Wed Dec 13, 2006 6:09 am
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
CoderGoblin
DevNet Resident
Posts: 1425 Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany
Post
by CoderGoblin » Wed Dec 13, 2006 6:34 am
If I were you I woud use a URL pathname, not a system pathname.
eshban
Forum Contributor
Posts: 184 Joined: Mon Sep 05, 2005 1:38 am
Post
by eshban » Wed Dec 13, 2006 6:38 am
i am just running it offline. so [s]plz[/s]please tell me according to that
neel_basu
Forum Contributor
Posts: 454 Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India
Post
by neel_basu » Wed Dec 13, 2006 10:26 am
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
neel_basu
Forum Contributor
Posts: 454 Joined: Wed Dec 06, 2006 9:33 am
Location: Picnic Garden, Kolkata, India
Post
by neel_basu » Wed Dec 13, 2006 10:28 am
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
Ollie Saunders
DevNet Master
Posts: 3179 Joined: Tue May 24, 2005 6:01 pm
Location: UK
Post
by Ollie Saunders » Wed Dec 13, 2006 11:23 am
file://C:/phpdev/www/test/Water_lilies.jpg is probably safest. btw there is a client side forum for this kind of stuff.
John Cartwright
Site Admin
Posts: 11470 Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:
Post
by John Cartwright » Wed Dec 13, 2006 11:24 am
ole wrote: btw there is a client side forum for this kind of stuff.
Indeed.
eshban
Forum Contributor
Posts: 184 Joined: Mon Sep 05, 2005 1:38 am
Post
by eshban » Wed Dec 13, 2006 12:42 pm
but still i did not find solution from the reply.
I tested my code with
but it does not work in mozilla.
plz help
Ollie Saunders
DevNet Master
Posts: 3179 Joined: Tue May 24, 2005 6:01 pm
Location: UK
Post
by Ollie Saunders » Wed Dec 13, 2006 1:31 pm
did you use file:// ? Because you probably should
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Wed Dec 13, 2006 1:32 pm
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.
eshban
Forum Contributor
Posts: 184 Joined: Mon Sep 05, 2005 1:38 am
Post
by eshban » Wed Dec 13, 2006 10:52 pm
i am sorry sir, i will take care in future.
eshban
Forum Contributor
Posts: 184 Joined: Mon Sep 05, 2005 1:38 am
Post
by eshban » Wed Dec 13, 2006 11:00 pm
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
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Wed Dec 13, 2006 11:09 pm
You don't normally need file:// with readfile() it interacts with the file system directly. You need file:// for items referenced in the browser.
eshban
Forum Contributor
Posts: 184 Joined: Mon Sep 05, 2005 1:38 am
Post
by eshban » Wed Dec 13, 2006 11:30 pm
sir, see my question, that what is my problem and what i want
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Wed Dec 13, 2006 11:33 pm
Why do you insist on using file system references? It's far more simple to get the web server to handle them.