php-general Digest 27 Nov 2006 19:22:58 -0000 Issue 4483
Topics (messages 245169 through 245190):
Re: PHP and XML
245169 by: Børge Holen
Re: Please hack my app
245170 by: Ivo F.A.C. Fokkema
245171 by: Ivo F.A.C. Fokkema
Re: Storing objects in sessions recursively
245172 by: Dave M G
245173 by: Stut
245174 by: Jochem Maas
245177 by: Jochem Maas
245178 by: Stut
245180 by: Jochem Maas
245181 by: Stut
Running AMP from CD
245175 by: Ryan A
245176 by: Paul Scott
245179 by: Rory Browne
245182 by: Ryan A
245183 by: Alberto Ferrer
245185 by: Ryan A
245187 by: Richard Lynch
245188 by: Paul Scott
Tidy HTML source?
245184 by: Mark Kelly
245186 by: Richard Lynch
mail header questions
245189 by: Chantal Rosmuller
getting around the undefined index
245190 by: Ross
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
php-general@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
so I see... just follow the guidelines on php.net on what NOT to do after a
<?php.
On Monday 27 November 2006 06:22, onewaylife wrote:
> hello all
> I have created a simple xml file address.php i.e
> <?php
> $xmlstr = <<<XML
> <?xml version="1.0" ?>
> <!DOCTYPE AddressBook[
> <!ELEMENT AddressBook (person)+ >
> <!ELEMENT person (group,name,organization, address,email)>
> <!ELEMENT group (#PCDATA)>
> <!ELEMENT name (#PCDATA)>
> <!ELEMENT organization (#PCDATA)>
> <!ELEMENT address (#PCDATA)>
> <!ELEMETN email (#PCDATA)> ]>
>
>
> XML;
>
>
> ?>
> and one simple form: -
> <html>
> <head>
> <title>My Address Book</title>
> </head>
> <body>
> <form action="addNewElement.php" method="post">
> <div>
> Group:<input type="text" size="20"
> name="group"><br>
> Name :<input type="text" size="20"
> name="name"><br>
> organization:<input type="text" size="20"
> name="organization"> <br>
> addresss:<input type="text" size="20"
> name="ation"><br>
> Email Address:<input type="text" size="20"
> name="email">
> </div>
> <input type="submit" value="Submit">
>
>
> </form>
> </body>
> </html>
> But it gives lot of error : -
> Warning: SimpleXMLElement::__construct() [function.--construct]: Entity:
> line 9: parser error : DOCTYPE improperly terminated in
> /home/rakesh/public_html/Tutorials/XML_PHP/XML_PHP_BOOK/addNewElement.php
> on line 5
>
> Warning: SimpleXMLElement::__construct() [function.--construct]: <!ELEMETN
> email (#PCDATA)> ]> in
> /home/rakesh/public_html/Tutorials/XML_PHP/XML_PHP_BOOK/addNewElement.php
> on line 5
>
> Warning: SimpleXMLElement::__construct() [function.--construct]: ^ in
> /home/rakesh/public_html/Tutorials/XML_PHP/XML_PHP_BOOK/addNewElement.php
> on line 5
>
> Warning: SimpleXMLElement::__construct() [function.--construct]: Entity:
> line 9: parser error : Start tag expected, '<' not found in
> /home/rakesh/public_html/Tutorials/XML_PHP/XML_PHP_BOOK/addNewElement.php
> on line 5
>
> Warning: SimpleXMLElement::__construct() [function.--construct]: <!ELEMETN
> email (#PCDATA)> ]> in
> /home/rakesh/public_html/Tutorials/XML_PHP/XML_PHP_BOOK/addNewElement.php
> on line 5
>
> Warning: SimpleXMLElement::__construct() [function.--construct]: ^ in
> /home/rakesh/public_html/Tutorials/XML_PHP/XML_PHP_BOOK/addNewElement.php
> on line 5
>
> Fatal error: Uncaught exception 'Exception' with message 'String could not
> be parsed as XML' in
> /home/rakesh/public_html/Tutorials/XML_PHP/XML_PHP_BOOK/addNewElement.php:5
> Stack trace: #0
> /home/rakesh/public_html/Tutorials/XML_PHP/XML_PHP_BOOK/addNewElement.php(5
>): SimpleXMLElement->__construct('?<?xml version=...') #1 {main} thrown in
> /home/rakesh/public_html/Tutorials/XML_PHP/XML_PHP_BOOK/addNewElement.php
> on line 5
>
> please help me out..
> onewaylife
>
> Edward Kay wrote:
> > In that case you need to do some of your own research. Google is your
> > friend.
> >
> >> Hello Edward
> >> Just i don't now where to start.
> >>
> >> Edward Kay wrote:
> >> > Hello,
> >> >
> >> > You say that you are "unable to store the files in XML". Why is
> >>
> >> this? Are
> >>
> >> > you getting an error message or do you just not know where to start?
> >> >
> >> > Edward
> >> >
> >> >> Dear All
> >> >>
> >> >> I am novice in PHP & XML, while trying I am creating a small
> >>
> >> application
> >>
> >> >> i.e. Address Book.
> >> >> In this I am using Apache2, PHP5 and XML no database is used.
> >>
> >> I have FC5
> >>
> >> >> machines. but I am unable to store the files in XML. If any one
> >> >> share their
> >> >> experience in this by providing Examples or tutorials etc...
> >> >> So far I have found tutorial related to porting the information
> >> >> of data from
> >> >> MySQL to XML and then php with help of DOM.
> >> >>
> >> >> Thanks
> >> >> onewaylife
> >> >> --
> >> >> View this message in context:
> >> >> http://www.nabble.com/PHP-and-XML-tf2692397.html#a7507917
> >> >> Sent from the PHP - General mailing list archive at Nabble.com.
> >> >>
> >> >> --
> >> >> PHP General Mailing List (http://www.php.net/)
> >> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >> >
> >> > --
> >> > PHP General Mailing List (http://www.php.net/)
> >> > To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >> --
> >> View this message in context:
> >
> > http://www.nabble.com/PHP-and-XML-tf2692397.html#a7517770
> > Sent from the PHP - General mailing list archive at Nabble.com.
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> View this message in context:
> http://www.nabble.com/PHP-and-XML-tf2692397.html#a7555006 Sent from the PHP
> - General mailing list archive at Nabble.com.
--
---
Børge
Kennel Arivene
http://www.arivene.net
---
--- End Message ---
--- Begin Message ---
On Wed, 22 Nov 2006 09:57:50 +0100, Ivo F.A.C. Fokkema wrote:
> Hi List,
>
> As this subject may start you wondering what the hell I'm thinking, let me
> clearify:
>
> I've been rewriting an GPL'ed PHP/MySQL app from scratch for the last 12
> months or so. It facilitates storage of DNA mutations and the
> corresponding patient data. Because patient data is involved, privacy is
> very important.
> Now of course I read lots of pages on SQL injection and whatnot, and I
> strongly believe my application is protected from this kind of abuse.
> However, believing is not enough. I've had some comments in the past about
> security (previous version of the software) and although I didn't agree to
> the critic, I want to be able to say the new app went though various forms
> of attacks. This month, I want to release 2.0-alpha-01...
>
> *** THIS IS NOT ABOUT HACKING THE SERVER ***
> But about getting in the application when you're not allowed to!
>
> If you feel like helping me out, it's located at
> http://chromium.liacs.nl/LOVDv.2.0-dev/
>
> 1) Please try to get in. There's one account in the system, a database
> administrator, capable of doing anything. If you get in, you can easily
> create a new user using the setup tab. This will be the prove of you
> breaking my security rules.
>
> 2) Can you manage to view unpublic data? Using the Variants tab, you
> can see there is currently one entry in the database (with two mutations).
> This entry has a hidden column, called 'Patient ID'. There is a
> text-string in that column. If you can tell me what that string is, you
> win :)
>
> 3) Feel free to register as a submitter to see if that gives you any
> rights that you shouldn't have. A submitter is only capable of adding new
> data to the database (Submit tab), but that data will not be published
> immediately.
>
> 4) After a while, I will release login details of a curator account. This
> user is allowed to see non-public data and handle the specific gene, but
> NOT create new users or the like.
>
>
> If you have any questions, please ask. Thank you in advance for using your
> expertise for the good cause :)
In case anyone is interested; I've created a low-level user ('untrusted')
in the system. Password is equal to username. Feel free to try and do
stuff you're not supposed to, like creating a new user or creating a
gene.
Ivo
--- End Message ---
--- Begin Message ---
On Wed, 22 Nov 2006 09:57:50 +0100, Ivo F.A.C. Fokkema wrote:
> Hi List,
>
> As this subject may start you wondering what the hell I'm thinking, let me
> clearify:
>
> I've been rewriting an GPL'ed PHP/MySQL app from scratch for the last 12
> months or so. It facilitates storage of DNA mutations and the
> corresponding patient data. Because patient data is involved, privacy is
> very important.
> Now of course I read lots of pages on SQL injection and whatnot, and I
> strongly believe my application is protected from this kind of abuse.
> However, believing is not enough. I've had some comments in the past about
> security (previous version of the software) and although I didn't agree to
> the critic, I want to be able to say the new app went though various forms
> of attacks. This month, I want to release 2.0-alpha-01...
>
> *** THIS IS NOT ABOUT HACKING THE SERVER ***
> But about getting in the application when you're not allowed to!
>
> If you feel like helping me out, it's located at
> http://chromium.liacs.nl/LOVDv.2.0-dev/
>
> 1) Please try to get in. There's one account in the system, a database
> administrator, capable of doing anything. If you get in, you can easily
> create a new user using the setup tab. This will be the prove of you
> breaking my security rules.
>
> 2) Can you manage to view unpublic data? Using the Variants tab, you
> can see there is currently one entry in the database (with two mutations).
> This entry has a hidden column, called 'Patient ID'. There is a
> text-string in that column. If you can tell me what that string is, you
> win :)
>
> 3) Feel free to register as a submitter to see if that gives you any
> rights that you shouldn't have. A submitter is only capable of adding new
> data to the database (Submit tab), but that data will not be published
> immediately.
>
> 4) After a while, I will release login details of a curator account. This
> user is allowed to see non-public data and handle the specific gene, but
> NOT create new users or the like.
>
>
> If you have any questions, please ask. Thank you in advance for using your
> expertise for the good cause :)
In case anyone is interested; I've created a low-level user ('untrusted')
in the system. Password is equal to username. Feel free to try and do
stuff you're not supposed to, like creating a new user or creating a
gene.
Ivo
--- End Message ---
--- Begin Message ---
Vincent, Jochem,
Thank you for replying.
The issue turned out to be my Article class took arguments in its
constructor, which was unacceptable because the argument could not be
serialized when being passed along during the session.
By adjusting my object so that the constructor takes no arguments, and
then creating a new method on the object to do what the constructor did
previously, the problem was solved.
That explanation may be confusing, but that's because I don't fully
understand serialization myself yet. All I can say for sure is that the
problem was definitely a serialization issue.
--
Dave M G
Community Moderator
--- End Message ---
--- Begin Message ---
Dave M G wrote:
The issue turned out to be my Article class took arguments in its
constructor, which was unacceptable because the argument could not be
serialized when being passed along during the session.
By adjusting my object so that the constructor takes no arguments, and
then creating a new method on the object to do what the constructor
did previously, the problem was solved.
That explanation may be confusing, but that's because I don't fully
understand serialization myself yet. All I can say for sure is that
the problem was definitely a serialization issue.
When objects are unserialised the constructor will be called without
arguments because the values passed to the constructor are not
automatically stored in the object. You can get around that without
having to create a second initialisation method by using default values
for your arguments...
class Foo
{
public __construct($param = null)
{
if (!is_null($param))
{
// Parameter passed, do something with it
}
}
}
-Stut
--- End Message ---
--- Begin Message ---
Dave M G wrote:
> Vincent, Jochem,
>
> Thank you for replying.
>
> The issue turned out to be my Article class took arguments in its
> constructor, which was unacceptable because the argument could not be
> serialized when being passed along during the session.
why would the arguments need to be serialized? unserializing an object is
not the same as constructing a new one.
>
> By adjusting my object so that the constructor takes no arguments, and
> then creating a new method on the object to do what the constructor did
> previously, the problem was solved.
are the Article arguments used to setup a DB connection (or something like
that) per chance?
>
> That explanation may be confusing, but that's because I don't fully
> understand serialization myself yet. All I can say for sure is that the
> problem was definitely a serialization issue.
>
--- End Message ---
--- Begin Message ---
Stut wrote:
> Dave M G wrote:
>> The issue turned out to be my Article class took arguments in its
>> constructor, which was unacceptable because the argument could not be
>> serialized when being passed along during the session.
>>
>> By adjusting my object so that the constructor takes no arguments, and
>> then creating a new method on the object to do what the constructor
>> did previously, the problem was solved.
>>
>> That explanation may be confusing, but that's because I don't fully
>> understand serialization myself yet. All I can say for sure is that
>> the problem was definitely a serialization issue.
>
> When objects are unserialised the constructor will be called without
> arguments because the values passed to the constructor are not
heh Stut,
this is wrong - the ctor is not called at all when unserializing, check this
code snippet:
php -r '
class Test { function __construct() { echo "foo\n"; } }
$t = new Test;
$s = serialize($t);
unset($t);
$u = unserialize($s);
'
this only outputs 'foo' once.
seems like whatever Dave's problem was it's actually down to
missing ctor args.
> automatically stored in the object. You can get around that without
> having to create a second initialisation method by using default values
> for your arguments...
>
> class Foo
> {
> public __construct($param = null)
> {
> if (!is_null($param))
> {
> // Parameter passed, do something with it
> }
> }
> }
>
> -Stut
>
--- End Message ---
--- Begin Message ---
Jochem Maas wrote:
this is wrong - the ctor is not called at all when unserializing, check this
code snippet:
php -r '
class Test { function __construct() { echo "foo\n"; } }
$t = new Test;
$s = serialize($t);
unset($t);
$u = unserialize($s);
'
this only outputs 'foo' once.
seems like whatever Dave's problem was it's actually down to
missing ctor args.
Indeed, my bad. When I think about it it actually doesn't make sense for
it to be called. Seems to me like the OP needs to be using the __wakeup
magic method to re-initialise his objects.
-Stut
--- End Message ---
--- Begin Message ---
Stut wrote:
> Jochem Maas wrote:
>> this is wrong - the ctor is not called at all when unserializing,
>> check this
>> code snippet:
>>
>> php -r '
>> class Test { function __construct() { echo "foo\n"; } }
>> $t = new Test;
>> $s = serialize($t);
>> unset($t);
>> $u = unserialize($s);
>> '
>>
>> this only outputs 'foo' once.
>>
>> seems like whatever Dave's problem was it's actually down to
"it's" should have been "it's not" :-P
>> missing ctor args.
>
> Indeed, my bad. When I think about it it actually doesn't make sense for
> it to be called. Seems to me like the OP needs to be using the __wakeup
> magic method to re-initialise his objects.
yeah, that would probably be the way to go - it's hard to tell without
seeing/knowing what the ctor/init routine was doing.
heck it's monday what you expect ;-) (I have the same excuse for fridays)
>
> -Stut
>
--- End Message ---
--- Begin Message ---
Jochem Maas wrote:
heck it's monday what you expect ;-) (I have the same excuse for fridays)
I use the same excuse Tuesday to Thursday, I find that, on balance, it
works better for me.
-Stut
--- End Message ---
--- Begin Message ---
Hello,
A little while back there was a discussion on running Apache,MySql and PHP from
a CD... I can't seem to find that thread and i cant seem to find the links i
had from that thread, so....
Can anybody suggest/recommend a way to run our project from CD?
Our project is made in PHP 4 with a MySql backend... so far its been running on
Apache..
I have found some commercial alternatives via google(PortableWebAp
,dwebpro,microweb to name a few) but if I remember correctly the solution in
the old thread was a freeware. The commercial solutions offer a lot of bells
and whistles and inter platform compatability but all we need is for AMP to run
on CD and on Windows 2000 onwards.
Any help appreciated, even if its a one line link, thanks in advance!
-Ryan
------
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)
---------------------------------
Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.
--- End Message ---
--- Begin Message ---
On Mon, 2006-11-27 at 03:39 -0800, Ryan A wrote:
> Any help appreciated, even if its a one line link, thanks in advance!
Our team ships our products as an Ubuntu linux Live CD with all the bits
and pieces pre-installed, which also gives the user an option to install
and set up a live server with a single double click. If you are
interested in taking this route, I could set you up with some links, as
well as our ISO that you could modify and re make...
--Paul
All Email originating from UWC is covered by disclaimer
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm
--- End Message ---
--- Begin Message ---
http://www.wellho.net/solutions/general-windows-running-apache-and-mysql-from-a-cd.html
On 11/27/06, Paul Scott <[EMAIL PROTECTED]> wrote:
On Mon, 2006-11-27 at 03:39 -0800, Ryan A wrote:
> Any help appreciated, even if its a one line link, thanks in advance!
Our team ships our products as an Ubuntu linux Live CD with all the bits
and pieces pre-installed, which also gives the user an option to install
and set up a live server with a single double click. If you are
interested in taking this route, I could set you up with some links, as
well as our ISO that you could modify and re make...
--Paul
All Email originating from UWC is covered by disclaimer
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hi Paul,
Sounds good but I dont think its right for this project because we are making
educational pages that are presently online... but will later be distributed
for free to students, mostly young ones at that... 10-15yrs old so it has to be
as simple as possible.... for example:
User gets the cd and loads it into their comp
Then either of these two:
a) they click on clickme.html or clickme.exe etc
or
b)the CD autostarts and opens the browser window with the index of the "site"
Thanks!
R
Paul Scott <[EMAIL PROTECTED]> wrote:
On Mon, 2006-11-27 at 03:39 -0800, Ryan A wrote:
> Any help appreciated, even if its a one line link, thanks in advance!
Our team ships our products as an Ubuntu linux Live CD with all the bits
and pieces pre-installed, which also gives the user an option to install
and set up a live server with a single double click. If you are
interested in taking this route, I could set you up with some links, as
well as our ISO that you could modify and re make...
--Paul
All Email originating from UWC is covered by disclaimer
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
------
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)
---------------------------------
Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.
--- End Message ---
--- Begin Message ---
www.apachefriends.org have a "Lamp" on CD project.
2006/11/27, Ryan A <[EMAIL PROTECTED]>:
Hello,
A little while back there was a discussion on running Apache,MySql and PHP from
a CD... I can't seem to find that thread and i cant seem to find the links i
had from that thread, so....
Can anybody suggest/recommend a way to run our project from CD?
Our project is made in PHP 4 with a MySql backend... so far its been running on
Apache..
I have found some commercial alternatives via google(PortableWebAp
,dwebpro,microweb to name a few) but if I remember correctly the solution in
the old thread was a freeware. The commercial solutions offer a lot of bells
and whistles and inter platform compatability but all we need is for AMP to run
on CD and on Windows 2000 onwards.
Any help appreciated, even if its a one line link, thanks in advance!
-Ryan
------
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)
---------------------------------
Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.
--
bet0x - Barrahome
http://www.barrahome.com.ar
--- End Message ---
--- Begin Message ---
You wouldnt happen to have a direct link to that page would you? coz I cant
find it in their products section...
Thanks!
R
Alberto Ferrer <[EMAIL PROTECTED]> wrote: www.apachefriends.org have a "Lamp"
on CD project.
2006/11/27, Ryan A :
> Hello,
>
> A little while back there was a discussion on running Apache,MySql and PHP
> from a CD... I can't seem to find that thread and i cant seem to find the
> links i had from that thread, so....
>
> Can anybody suggest/recommend a way to run our project from CD?
> Our project is made in PHP 4 with a MySql backend... so far its been running
> on Apache..
>
> I have found some commercial alternatives via google(PortableWebAp
> ,dwebpro,microweb to name a few) but if I remember correctly the solution in
> the old thread was a freeware. The commercial solutions offer a lot of bells
> and whistles and inter platform compatability but all we need is for AMP to
> run on CD and on Windows 2000 onwards.
>
> Any help appreciated, even if its a one line link, thanks in advance!
> -Ryan
>
>
> ------
> - The faulty interface lies between the chair and the keyboard.
> - Creativity is great, but plagiarism is faster!
> - Smile, everyone loves a moron. :-)
>
> ---------------------------------
> Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.
>
--
bet0x - Barrahome
http://www.barrahome.com.ar
------
- The faulty interface lies between the chair and the keyboard.
- Creativity is great, but plagiarism is faster!
- Smile, everyone loves a moron. :-)
---------------------------------
Check out the all-new Yahoo! Mail beta - Fire up a more powerful email and get
things done faster.
--- End Message ---
--- Begin Message ---
Another option might be to use something like wget or htdig to just
rip through the whole site and generate a static site out of it...
I did something like that once for an educational CD, except I just
wrote the generator myself. I'm not sure wget existed back then, and
I'm pretty sure htdig didn't...
Had to put a bit of stuff into JavaScript for the "quiz" portion, but
it worked fairly well.
On Mon, November 27, 2006 10:51 am, Alberto Ferrer wrote:
> www.apachefriends.org have a "Lamp" on CD project.
>
> 2006/11/27, Ryan A <[EMAIL PROTECTED]>:
>> Hello,
>>
>> A little while back there was a discussion on running Apache,MySql
>> and PHP from a CD... I can't seem to find that thread and i cant
>> seem to find the links i had from that thread, so....
>>
>> Can anybody suggest/recommend a way to run our project from CD?
>> Our project is made in PHP 4 with a MySql backend... so far its been
>> running on Apache..
>>
>> I have found some commercial alternatives via google(PortableWebAp
>> ,dwebpro,microweb to name a few) but if I remember correctly the
>> solution in the old thread was a freeware. The commercial solutions
>> offer a lot of bells and whistles and inter platform compatability
>> but all we need is for AMP to run on CD and on Windows 2000 onwards.
>>
>> Any help appreciated, even if its a one line link, thanks in
>> advance!
>> -Ryan
>>
>>
>> ------
>> - The faulty interface lies between the chair and the keyboard.
>> - Creativity is great, but plagiarism is faster!
>> - Smile, everyone loves a moron. :-)
>>
>> ---------------------------------
>> Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.
>>
>
>
> --
> bet0x - Barrahome
> http://www.barrahome.com.ar
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?
--- End Message ---
--- Begin Message ---
On Mon, 2006-11-27 at 08:42 -0800, Ryan A wrote:
> Sounds good but I dont think its right for this project because we are
> making educational pages that are presently online... but will later
> be distributed for free to students, mostly young ones at that...
> 10-15yrs old so it has to be as simple as possible.... for example:
>
Well, you are in luck then. Our system happens to be a fully fledged
e-learning system that does exactly that! :)
> User gets the cd and loads it into their comp
> Then either of these two:
> a) they click on clickme.html or clickme.exe etc
> or
Firefox launches on CD start and the elearning system is there and ready
to go in the context (course) of your choosing.
Check out http://elearn.uwc.ac.za/ as one of our e-learning site, and
http://avoir.uwc.ac.za for project details as well as mailing lists.
On an aside, we also are building a site of downloadable free
courseware, http://freecourseware.uwc.ac.za and if you are releasing the
courses as free, I would really like to add it in there, as well as make
it a demo downloadable course. A lot of our African partners (16
countries) roll out in primary schools, and I think that your stuff
could be really useful to them.
--Paul
All Email originating from UWC is covered by disclaimer
http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm
--- End Message ---
--- Begin Message ---
Hi.
In the stuff I do almost all the HTML is generated with PHP as basically
none of it is static (lots of tabular data, state-sensitive links, stuff
like that).
Am I crazy to make an extra effort in my code to make the generated HTML
pretty? By this I mean linebreaks, indentation etc. - stuff that is aimed
at readability rather than correctness. This is obviously above and beyond
simply making sure it validates. It's not a huge burden by any means, but
it *is* extra effort.
What do you guys do?
Looking forward to your replies.
--- End Message ---
--- Begin Message ---
On Mon, November 27, 2006 11:10 am, Mark Kelly wrote:
> In the stuff I do almost all the HTML is generated with PHP as
> basically
> none of it is static (lots of tabular data, state-sensitive links,
> stuff
> like that).
>
> Am I crazy to make an extra effort in my code to make the generated
> HTML
> pretty? By this I mean linebreaks, indentation etc. - stuff that is
> aimed
> at readability rather than correctness. This is obviously above and
> beyond
> simply making sure it validates. It's not a huge burden by any means,
> but
> it *is* extra effort.
>
> What do you guys do?
If you are laying out your PHP and HTML correctly, decent readability
is not that difficult.
I don't sweat it when PHP "eats" a newline or tab for the first/last
element in a series (LI or TR or TD or...)
But I'd go *nuts* if "View Source" was all wonky.
Just because it validates doesn't mean you actually have the
layout/content that you want. :-)
And not being able to read your own HTML source will bite you in the
butt eventually.
I do wish that I had more control over the various "pretty" printing
tools for "View Source" so I could get the HTML to be indented the way
I want it...
A simple "diff" between actual HTML output and prettied up HTML from,
say, Tidy, would be pretty nifty -- I probably could have saved myself
10 hours a month, on average, in the past 10 years if I had that...
:-)
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?
--- End Message ---
--- Begin Message ---
Hi everyone,
I'm working on a mailform and it's kind of working but I still have 2
problems:
1) I can't get the From header right, when I receive the test mail the sender
is apache
2) The BCC headers (there's more then one) are not stripped.
Here's my script:
/* haal de gegevens op */
$to=$_POST['to'];
$bcc=$_POST['bcc'];
$subject=$_POST['subject'];
$bericht=$_POST['bericht'];
/* maak van de bcctjes een array en bouw hier de bcc headers van */
$bcc_array = explode (",", $bcc);
for ($n = 0; $n < count($bcc_array); $n++)
{
$bcclist=each($bcc_array);
$bccheaders = $bccheaders . "bcc:" . $bcclist[value] . "\r\n";
}
/*Nu gaan we een aantal headers bekijken en toevoegen.*/
$headers .= "To: $to \r\n";
/* from adres */
$headers .= "From: $mainmail \r\n";
/*Deze twee headers zorgen ervoor dat je een bericht met HTML kan
toevoegen*/
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
/*Deze header zorgt ervoor dat als er een fout is ontstaan bij het
versturen
van een mailtje, dat je kan aangeven naar welke e-mailadres de fout/error
gestuurd wordt.*/
$headers .= "Return-Path: $mainmail\r\n";
/*Deze header zorgt ervoor dat als ontvangers een reply terug willen
sturen
naar jou, dat hun reactie naar dit adres wordt terug gestuurd.*/
$headers .= "Reply-To: $mainmail\r\n";
$headers .= "X-Mailer: PHP" . phpversion() ."\r\n";
$headers = $headers . $bccheaders;
mail($to, $subject, $bericht, $headers);
echo "Mail met onderwerp $subject is verstuurd naar $bcc en
$mainmail";
Thanks
--- End Message ---
--- Begin Message ---
I have not found a satisfactory way of doing this yet!!!!
$text = $_REQUEST['text_size'];
if ($text) {
echo $text;
}
I send the $text_size variable to the browser with lines like...
<a href="<? $_SERVER['PHP_SELF']; ?>?text_size=small" class="size1"
id="one">A</a>
When the page initially loads I get a undefined index error as it does not
exist but is there a way of wrapping in in a switch statement or funtion so
the variable is only used when $_REQUEST['text_size']; actually exists.
Ross
--- End Message ---