|
Ouch! So I've got to look there... but... I have not understood one thing: are they on the back or on the background of the server?
Now being serious... I've never made any single development on web (only the original web page of my company but this was not development... it was like using word in order to get it done), and now I'm trying to get a new page made by some externals... and if you've seen the messages I've left on the lounge you'll understand my sudden interest on the web side of our business...
I wanted to know that, but I think that the most interesting implementation would be that everything would rely on the server and not on the clients, but asking is never too much work if it ensures the result...
Anyway, thank you for your feedback.
|
|
|
|
|
Joan Murt wrote: and if you've seen the messages I've left on the lounge you'll understand my sudden interest on the web side of our business...
Not enough to understand no. However understanding your web "business" is not equal to understanding the "technology" yes?
Joan Murt wrote: I think that the most interesting implementation would be that everything would rely on the server and not on the clients,
Very difficult to answer these questions for people that don't understand technology because the answers are all technical answers in that they require referencing technical items.
Server side code always executes in server processes. Data can be transfered between server and client code and therefore the same data can be used during both server execution and client code execution, but not at the same time of course.
That is probably not very helpful but I thought I should have a go at it.
led mike
|
|
|
|
|
led mike wrote: Not enough to understand no.
I've left three messages in the lounge explaining that I've subcontracted a company to make the web site of our company and those guys have made a really bad job (everything is based on text files, data inconsistency, different web pages for different languages with different problems in each language...). Now I want to make them to solve this, and meanwhile I was making some tests I came across that doubt related to the way the variables are stored. I must celebrate a meeting with them in order to fix all the errors and I wanted to ask a couple of things before...
I'm all day working far away from the web side of the IT industry, I've made only one CGI in order to configure remotely the subversion source control system, and frankly I consider that I don't know anything related to the web development. (this is why I asked this here... )... I suppose that when someone doesn't know anything from a specific topic then wrong formulated questions appear...
Well, anyway at the end, and after a couple of trials I've made a test with different computers with different Internet public IP's and the variable value has maintained the value in all the computers so it must be stored in the server.
Thank you for your answer.
|
|
|
|
|
Some things you have said would indicate you do not have an understanding of how this technology works. That is understandable and very common outside of tech communities. I would at this stage highly recommend hiring a consultant.
Brad
Australian
The PHP MVP
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Joan Murt wrote: re they on the back or on the background of the server?
I'm not sure what you mean by back or background of the server, but if you are using PHP then anytime a page is requested by a browser your PHP code will run from start to finish - any variables that are created will only exist during the lifetime of the page request, and will not exist on the server afterwards.
Basically, every time a page is generated, the server compiles your PHP, runs the code, and then exits, releasing all resources.
|
|
|
|
|
Sorry! I was only following a joke that Led Mike made...
I've been able to test it using different computers with different public IP's and the variable value is maintained in all the different connections so that variable must be stored in the server side.
Thank you for your answer...
|
|
|
|
|
PHP is a server template system that interprets all PHP script inside <?php ?> tags. Since PHP runs on the server, its variables also reside on the server.
If one user sets $Test = 10; in a script, it is not available in another call to the same script. If you want to share the value among multiple calls by the same user, you have to use $_SESSION['Test'] = 10;. Please make sure that you call session_start(); in all PHP script files that you want to access session variables.
To share between all sessions, use global variables. Syntax: $GLOBAL['Test'] = 10;
modified 29-Aug-18 21:01pm.
|
|
|
|
|
|
No problem. Just in case you are writing a PHP based website from scratch, try to do the following:
Organize code such that functions that provide core functions (such as accessing databases) be kept in separate php files. Then, you can use
<?php
require 'core.php'
?>
to include it in any other PHP file.
This way, you can reuse the functions, there will be as little PHP code in the HTML pages. It is much more manageable that way.
I go to another level usually, where PHP scripts corresponding to user actions are kept in another PHP file. Conceptually similar to MVC.
view.php has all the HTML with minimal PHP calls to functions in controller.php. Controller.php is specific to the view.php and contains all the PHP code specific to that page. All reusable functions between multiple pages go into core.php. I use multiple core files to aggregate functions based on functionality. For example: authentication goes into one file.
In the view.php, I just use
--
require 'core.php';
require 'controller.php';
HTML with function calls to controller.php.
--
I hope this helps. All this is just a matter of individual preference. I have found it much better to manage in the long term.
modified 29-Aug-18 21:01pm.
|
|
|
|
|
Thomas George wrote: To share between all sessions, use global variables. Syntax: $GLOBAL['Test'] = 10;
Um... no. This is wrong. You are confusing Sessions with scope.
Brad
Australian
The PHP MVP
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
A variable with global scope is available to all sessions. What is wrong?
modified 29-Aug-18 21:01pm.
|
|
|
|
|
My understanding is that a variable with global scope is available anywhere within the current instance of the script and (depending on your config) in the current user session.
Brad
Australian
The PHP MVP
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
You are right. Thank you for correcting my misconception.
modified 29-Aug-18 21:01pm.
|
|
|
|
|
That's not a problem.
Brad
Australian
The PHP MVP
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Hello
I am wondering if anybody could please assist me in solving this problem.
The problem is as follows:
1) I want a "session - about to expire in x: minutes " message to popup x - minutes before the session comes to an end.
2) I need to be able to register a 'session - refresh' event in a central position, thus not in the Page_Load event of every page. Is there a way to do this.
I am a complete newby to ASP>Net and I would greatly appreciate any help.
Thanking you in advance
ChristiaanS
ChristiaanS
|
|
|
|
|
You would need to do this using a timer in javascript. You could also have all your pages inherit from a base page/master page that would output this script.
|
|
|
|
|
I need to view an rvt file in the html page. I have installed the Revit viewer RAC2009. What coding should I include in html page to view the revit file?
Note: rvt is the extension of revit file.
|
|
|
|
|
Ramya.G wrote: rvt
A quick Internet search reveals that it is an Autodesk file. Does your Autodesk support automation to export to HTML or XML?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Hi,
I want to close the current browser screen, why doesn't the following javascript not work?
<input type="button" id="btnClose" class="button" value="Close" onclick="javascript:window.close();" />
Regards
Brendan
|
|
|
|
|
first of all recheck your question statement...
why doesn't the following javascript not work?
OOPS !
anyways here is the answer to your problem..
<input type="button" id="btnClose" class="button" value="Close" onclick="javascript:window.close(); return false;" />
cheers !
Ashish Sehajpal
|
|
|
|
|
Ashish Sehajpal wrote: return false;"
I don't think it is mandatory unless you are within a function.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
What is the error?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
if u don't know the error then how come you suggest anything to me dear...
check his code
then
mine....and then decide
Ashish Sehajpal
|
|
|
|
|
Watch it.
Brad
Australian
The PHP MVP
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
I am working on a small banking application in which if suppose i have to transfer money from US to UK, I have to retrieve the latest Dollar to Pound conversion rate and the transfer the corresponding pounds to the corresponding account.
Now how do i retrieve these conversion rates in to my application. Can i retrieve these from the existing websites offering these conversion services..? If yes.. How do i do it?
Let me know if there is any other method.. Also suggest me any forums,Sites,Links or articles having info about this. Forgive me if the problem is too basic. . I am novice in this field.
Harsha
|
|
|
|