Re: [PHP] Re: PHP files in the SRC attribute of an SCRIPT element
Thank you very much. That was the problem, I didn't noticed that I don't use the server path. On 3/17/06, Barry <[EMAIL PROTECTED]> wrote: > > Karl-Heinz Christian Zeck wrote: > > Thank you for your quick reply. > > > > I tried to modify the file. I removed all it's content and wrote only a > > single line: > > alert("test"); > > > > When I refresh the main page, I get the alert message - this means the > file > > was loaded successfuly. > > > > Then I tried this code: alert(""); > > > > This way it doesn't work, no alert message, so the file wasn't loaded. > > > > Any ideas? > > > Thats because you don't load the Javascript file over HTTP and load it > locally. > The webserver doesn't parse it that way. > That way he just reads it and thats why it isnt parsed > > -- > Smileys rule (cX.x)C --o(^_^o) > Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o) > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] Re: PHP files in the SRC attribute of an SCRIPT element
I cannot use such a code, because the file I'm using is added to the element in the html page. The guys from Horde, that created the files say this should work without any problems, but it doesn't. If you have any other suggestions, please let me know. Thank you! On 3/17/06, Jason Gerfen <[EMAIL PROTECTED]> wrote: > > You will want to write PHP code to output the java-script. Because the > java-script (client side scripting) gets executed without communicating > with the server there is no PHP engine that java-script can push the PHP > through on the client machine. > > So you would want to do something like: > > <?PHP > $string = "I want a new pop-up message"; > $javascript = "<script>alert( $string )"; > echo $javascript; > ?> > > Karl-Heinz Christian Zeck wrote: > > >Thank you for your quick reply. > > > >I tried to modify the file. I removed all it's content and wrote only a > >single line: > >alert("test"); > > > >When I refresh the main page, I get the alert message - this means the > file > >was loaded successfuly. > > > >Then I tried this code: alert(""); > > > >This way it doesn't work, no alert message, so the file wasn't loaded. > > > >Any ideas? > > > >Thanks! > > > > > >On 3/17/06, Barry <[EMAIL PROTECTED]> wrote: > > > > > >>Karl-Heinz Christian Zeck wrote: > >> > >> > >>>Hi everybody, > >>> > >>> > >>>Are you allowed to do this? I mean, is the php file parsed by the PHP > >>> > >>> > >>engine > >> > >> > >>>first and a js code is generated that will be used > >>>by the script element? > >>> > >>> > >>> > >>Yes > >> > >> > >>-- > >>Smileys rule (cX.x)C --o(^_^o) > >>Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o) > >> > >>-- > >>PHP General Mailing List (http://www.php.net/) > >>To unsubscribe, visit: http://www.php.net/unsub.php > >> > >> > >> > >> > > > > > > > > > -- > Jason Gerfen > Student Computing Labs, University Of Utah > [EMAIL PROTECTED] > > J. Willard Marriott Library > 295 S 1500 E, Salt Lake City, UT 84112-0860 > 801-585-9810 > > "You will never be ready for me." > ~ Me > >
Re: [PHP] Re: PHP files in the SRC attribute of an SCRIPT element
Thank you for your quick reply. I tried to modify the file. I removed all it's content and wrote only a single line: alert("test"); When I refresh the main page, I get the alert message - this means the file was loaded successfuly. Then I tried this code: alert(""); This way it doesn't work, no alert message, so the file wasn't loaded. Any ideas? Thanks! On 3/17/06, Barry <[EMAIL PROTECTED]> wrote: > > Karl-Heinz Christian Zeck wrote: > > Hi everybody, > > > Are you allowed to do this? I mean, is the php file parsed by the PHP > engine > > first and a js code is generated that will be used > > by the script element? > > > Yes > > > -- > Smileys rule (cX.x)C --o(^_^o) > Dance for me! ^(^_^)o (o^_^)o o(^_^)^ o(^_^o) > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
[PHP] PHP files in the SRC attribute of an SCRIPT element
Hi everybody, Does anybody know if it's possible to specify a php file as the src attribute of an script element in a html page. For example: I've installed the HORDE framework (www.horde.org) and I'm trying to make their AJAX web client work. It seems that this line of code causes problems. The DimpCore.js.php file is a file that has tags between javascript lines. Are you allowed to do this? I mean, is the php file parsed by the PHP engine first and a js code is generated that will be used by the script element? I know this list is only for PHP issues, but I thougt maybe someone had the sameproblem and knows a workaround for this. Any ideas would be appreciated. Thank you! Christi Zeck
[PHP] Creating protected Excel files from PHP
Hi, I would like to know if any from you guys have a solution to my problem. I use PHP and a PEAR class (PEAR::Spreadsheet_Excel_Writer) to generate some reports as Excel files. My problem is that I want these files to be protected with a password (because these reports will be downloaded to the user's computer, and they must be unaccessible to someone else). I know you can set up a password for an excel file, but I don't know if you can accomplish this with PHP. If you know how to do this (or if this can be done) please let me know. Thanks!
Re: [PHP] Restarting windows from php
I don't want to restart windows locally, I want to restart it remotely. I need a php script that restarts the server. Is this possible or not? On 8/10/05, Jay Blanchard <[EMAIL PROTECTED]> wrote: > [snip] > Does anyone have any idea how to restart windows from a php script? > I tried the following: > exec('SHUTDOWN -r -t 01'); > or > exec('SHUTDOWN /r'); > > I received the following warning message: Warning: exec(): Unable to > fork [SHUTDOWN -r -t 01]. > > I never used this kind of functions before. What's wrong? In IIS for > "Execute Permissions" I have "Scripts and Executables". What > permissions should I set for the Internet Guest Account? Or something > else caused the problem, not the permissions? Please help me.:) > [/snip] > > Everyone, repeat after me.. > > PHP is server-side, there's no place like home, > PHP is server-side, there's no place like home, > PHP is server-side, there's no place like home.. > > If you are trying to restart Windows, locally, you have to use something > client-side to affect that. > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Restarting windows from php
Does anyone have any idea how to restart windows from a php script? I tried the following: exec('SHUTDOWN -r -t 01'); or exec('SHUTDOWN /r'); I received the following warning message: Warning: exec(): Unable to fork [SHUTDOWN -r -t 01]. I never used this kind of functions before. What's wrong? In IIS for "Execute Permissions" I have "Scripts and Executables". What permissions should I set for the Internet Guest Account? Or something else caused the problem, not the permissions? Please help me.:) Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php