FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » PHP variable holding path string will not render remotely
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
PHP variable holding path string will not render remotely [message #173727] Mon, 02 May 2011 00:16 Go to next message
goldtech is currently offline  goldtech
Messages: 5
Registered: September 2010
Karma: 0
Junior Member
Hi,

As I learn about PHP I encounter a problem. I have a test server on my
laptop and am serving flv Flash files. On my localhost laptop it's all
OK. I serve a local flv file and watch the video. So I figure I'd go
on a desktop in my local home network, dial in the ip of my laptop,
and watch a video from the desktop. Everything works OK except this,
(note: $vrelpath is the path to an flv file on my laptop), so:

Given the code:

echo "vrelpath: ". $vrelpath;
$vv = 'ttttt';
echo '<br>'.$vv;

and I see on the local laptop web page:

vrelpath: ./uploaded_vids/File28_final.flv
ttttt

But it renders on the "remote" desktop as:

vrelpath:
ttttt

The $vrelpath string is not getting to the desktop, but another string
$vv is getting to it. So what's going on here?


BTW, If I hard code a link on my laptop with something like this and
serve it to the desktop it works OK:

<a href="./flowplayer/example/Food/tofu_video_preview.flv"
style="display:block;width:520px;height:330px" id="player"> </a>

and the desktop user will get a nice flash video w/control bars...

There's something about that $vrelpath when it holds that path
string(?) Note: if a stick 'zzzz' into $vrelpath it renders on the
desktop OK.

What is the issue? Thanks appreciate the help.

Lee G.
Re: PHP variable holding path string will not render remotely [message #173728 is a reply to message #173727] Mon, 02 May 2011 00:49 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 5/1/2011 8:16 PM, goldtech wrote:
> Hi,
>
> As I learn about PHP I encounter a problem. I have a test server on my
> laptop and am serving flv Flash files. On my localhost laptop it's all
> OK. I serve a local flv file and watch the video. So I figure I'd go
> on a desktop in my local home network, dial in the ip of my laptop,
> and watch a video from the desktop. Everything works OK except this,
> (note: $vrelpath is the path to an flv file on my laptop), so:
>
> Given the code:
>
> echo "vrelpath: ". $vrelpath;
> $vv = 'ttttt';
> echo '<br>'.$vv;
>
> and I see on the local laptop web page:
>
> vrelpath: ./uploaded_vids/File28_final.flv
> ttttt
>
> But it renders on the "remote" desktop as:
>
> vrelpath:
> ttttt
>
> The $vrelpath string is not getting to the desktop, but another string
> $vv is getting to it. So what's going on here?
>
>
> BTW, If I hard code a link on my laptop with something like this and
> serve it to the desktop it works OK:
>
> <a href="./flowplayer/example/Food/tofu_video_preview.flv"
> style="display:block;width:520px;height:330px" id="player"> </a>
>
> and the desktop user will get a nice flash video w/control bars...
>
> There's something about that $vrelpath when it holds that path
> string(?) Note: if a stick 'zzzz' into $vrelpath it renders on the
> desktop OK.
>
> What is the issue? Thanks appreciate the help.
>
> Lee G.
>

Sorry, my crystal ball is in the shop, and since you didn't show us how
you set $vrelpath (or how you "dial into your laptop"), it's impossible
to say for sure.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: PHP variable holding path string will not render remotely [message #173730 is a reply to message #173727] Mon, 02 May 2011 07:26 Go to previous messageGo to next message
alvaro.NOSPAMTHANX is currently offline  alvaro.NOSPAMTHANX
Messages: 277
Registered: September 2010
Karma: 0
Senior Member
El 02/05/2011 2:16, goldtech escribió/wrote:
> As I learn about PHP I encounter a problem. I have a test server on my
> laptop and am serving flv Flash files. On my localhost laptop it's all
> OK. I serve a local flv file and watch the video. So I figure I'd go
> on a desktop in my local home network, dial in the ip of my laptop,
> and watch a video from the desktop. Everything works OK except this,
> (note: $vrelpath is the path to an flv file on my laptop), so:
>
> Given the code:
>
> echo "vrelpath: ". $vrelpath;

And $vrelpath comes from?


> $vv = 'ttttt';
> echo '<br>'.$vv;
>
> and I see on the local laptop web page:
>
> vrelpath: ./uploaded_vids/File28_final.flv
> ttttt
>
> But it renders on the "remote" desktop as:
>
> vrelpath:
> ttttt
>
> The $vrelpath string is not getting to the desktop, but another string
> $vv is getting to it. So what's going on here?
>
>
> BTW, If I hard code a link on my laptop with something like this and
> serve it to the desktop it works OK:
>
> <a href="./flowplayer/example/Food/tofu_video_preview.flv"
> style="display:block;width:520px;height:330px" id="player"> </a>
>
> and the desktop user will get a nice flash video w/control bars...
>
> There's something about that $vrelpath when it holds that path
> string(?) Note: if a stick 'zzzz' into $vrelpath it renders on the
> desktop OK.
>
> What is the issue? Thanks appreciate the help.

PHP is way simpler than you appear to think. All that happens is that
the $vrelpath variable is NULL, not set or contains an empty string. If
you don't use $vrelpath, its value won't matter at all.

Have at look at http://php.net/var_dump


--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://borrame.com
-- Mi web de humor satinado: http://www.demogracia.com
--
Re: PHP variable holding path string will not render remotely [message #173740 is a reply to message #173728] Mon, 02 May 2011 16:14 Go to previous messageGo to next message
Twayne is currently offline  Twayne
Messages: 135
Registered: September 2010
Karma: 0
Senior Member
In news:ipkv38$hph$1(at)dont-email(dot)me,
Jerry Stuckle <jstucklex(at)attglobal(dot)net> typed:
> On 5/1/2011 8:16 PM, goldtech wrote:
>> Hi,
>>
>> As I learn about PHP I encounter a problem. I have a
>> test server on my laptop and am serving flv Flash files.
>> On my localhost laptop it's all OK. I serve a local flv
>> file and watch the video. So I figure I'd go on a
>> desktop in my local home network, dial in the ip of my
>> laptop, and watch a video from the desktop. Everything
>> works OK except this, (note: $vrelpath is the path to an
>> flv file on my laptop), so: Given the code:
>>
>> echo "vrelpath: ". $vrelpath;
>> $vv = 'ttttt';
>> echo '<br>'.$vv;
>>
>> and I see on the local laptop web page:
>>
>> vrelpath: ./uploaded_vids/File28_final.flv
>> ttttt
>>
>> But it renders on the "remote" desktop as:
>>
>> vrelpath:
>> ttttt
>>
>> The $vrelpath string is not getting to the desktop, but
>> another string $vv is getting to it. So what's going on
>> here? BTW, If I hard code a link on my laptop with something
>> like this and serve it to the desktop it works OK:
>>
>> <a
>> href="./flowplayer/example/Food/tofu_video_preview.flv"
>> style="display:block;width:520px;height:330px"
>> id="player"> </a> and the desktop user will get a nice flash video
>> w/control bars... There's something about that $vrelpath when it holds
>> that path string(?) Note: if a stick 'zzzz' into
>> $vrelpath it renders on the desktop OK.
>>
>> What is the issue? Thanks appreciate the help.
>>
>> Lee G.
>>
>
> Sorry, my crystal ball is in the shop, and since you
> didn't show us how you set $vrelpath (or how you "dial
> into your laptop"), it's impossible to say for sure.

Then; WHAT is the purpose of your reply? Just to spam?
Re: PHP variable holding path string will not render remotely [message #173745 is a reply to message #173740] Mon, 02 May 2011 18:12 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 5/2/2011 12:14 PM, Twayne wrote:
> In news:ipkv38$hph$1(at)dont-email(dot)me,
> Jerry Stuckle<jstucklex(at)attglobal(dot)net> typed:
>> On 5/1/2011 8:16 PM, goldtech wrote:
>>> Hi,
>>>
>>> As I learn about PHP I encounter a problem. I have a
>>> test server on my laptop and am serving flv Flash files.
>>> On my localhost laptop it's all OK. I serve a local flv
>>> file and watch the video. So I figure I'd go on a
>>> desktop in my local home network, dial in the ip of my
>>> laptop, and watch a video from the desktop. Everything
>>> works OK except this, (note: $vrelpath is the path to an
>>> flv file on my laptop), so: Given the code:
>>>
>>> echo "vrelpath: ". $vrelpath;
>>> $vv = 'ttttt';
>>> echo '<br>'.$vv;
>>>
>>> and I see on the local laptop web page:
>>>
>>> vrelpath: ./uploaded_vids/File28_final.flv
>>> ttttt
>>>
>>> But it renders on the "remote" desktop as:
>>>
>>> vrelpath:
>>> ttttt
>>>
>>> The $vrelpath string is not getting to the desktop, but
>>> another string $vv is getting to it. So what's going on
>>> here? BTW, If I hard code a link on my laptop with something
>>> like this and serve it to the desktop it works OK:
>>>
>>> <a
>>> href="./flowplayer/example/Food/tofu_video_preview.flv"
>>> style="display:block;width:520px;height:330px"
>>> id="player"> </a> and the desktop user will get a nice flash video
>>> w/control bars... There's something about that $vrelpath when it holds
>>> that path string(?) Note: if a stick 'zzzz' into
>>> $vrelpath it renders on the desktop OK.
>>>
>>> What is the issue? Thanks appreciate the help.
>>>
>>> Lee G.
>>>
>>
>> Sorry, my crystal ball is in the shop, and since you
>> didn't show us how you set $vrelpath (or how you "dial
>> into your laptop"), it's impossible to say for sure.
>
> Then; WHAT is the purpose of your reply? Just to spam?
>
>

To tell him he has insufficient information to diagnose his problem.

But then you wouldn't understand that, troll. Yet you have to add a
completely worthless post anyway - which is the only kind of post you
can make.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: PHP variable holding path string will not render remotely [message #173749 is a reply to message #173745] Mon, 02 May 2011 23:27 Go to previous messageGo to next message
goldtech is currently offline  goldtech
Messages: 5
Registered: September 2010
Karma: 0
Junior Member
snip...

Hi,

I totally agree much more info is necessary to begin to get help. I
was dazed and confused and ripping hair from my scalp when I posted -
so sorry. I was trying to narrow the problem down when I saw what was
going wrong and fixed it...still don't know all the intricacies of it
- but it works.

I was trying to, when a user clicks on a thumb (an image) it works as
a submit button and also does a POST or GET to send data to the target
page. It was working locally on my localhost test laptop but when
tried on a "remote" PC the POST was not working. I incorrectly thought
that a PHP variable's content sent by the POST was getting stripped
clean. I realized when I switched from a POST to a GET and saw nothing
was being sent by the GET and the variable was just going to a default
value in the target page. For some reason the HTML code I was trying
was not working on remote PCs, that bad code is deleted and forgotten.
Below is what worked:
...
echo '<form action="detail.php" method="get">';
echo '<button type="submit" name="n" value="'.$recnum.'"> <img
src="'.$trelpath.'" WIDTH=320 HEIGHT=240/> </button>';
echo '</form>';
...

Lee G.
Re: PHP variable holding path string will not render remotely [message #173750 is a reply to message #173749] Tue, 03 May 2011 00:54 Go to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 5/2/2011 7:27 PM, goldtech wrote:
> snip...
>
> Hi,
>
> I totally agree much more info is necessary to begin to get help. I
> was dazed and confused and ripping hair from my scalp when I posted -
> so sorry. I was trying to narrow the problem down when I saw what was
> going wrong and fixed it...still don't know all the intricacies of it
> - but it works.
>
> I was trying to, when a user clicks on a thumb (an image) it works as
> a submit button and also does a POST or GET to send data to the target
> page. It was working locally on my localhost test laptop but when
> tried on a "remote" PC the POST was not working. I incorrectly thought
> that a PHP variable's content sent by the POST was getting stripped
> clean. I realized when I switched from a POST to a GET and saw nothing
> was being sent by the GET and the variable was just going to a default
> value in the target page. For some reason the HTML code I was trying
> was not working on remote PCs, that bad code is deleted and forgotten.
> Below is what worked:
> ...
> echo '<form action="detail.php" method="get">';
> echo '<button type="submit" name="n" value="'.$recnum.'"> <img
> src="'.$trelpath.'" WIDTH=320 HEIGHT=240/> </button>';
> echo '</form>';
> ...
>
> Lee G.
>
>

Glad you got it fixed, Lee.

One of the worst things to have happen is to ask a question and no one
responds - not even with "we need more information".

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: PHP developer needed in Minneapolis!
Next Topic: Please Help Me
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Nov 25 23:05:47 GMT 2024

Total time taken to generate the page: 0.02888 seconds