|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
editpage errorhi,
I just added some code to the MonoBook.php. function updateBox() { ?> <div id="p-update" class="portlet"> <h5><label for="updateInput"><?php $this->msg('update') ?></label></h5> <div id="updateBody" class="pBody"> <form action="..\includes\update\update.php" method="post" id="updateform"><div> <input type='submit' name="update" class="updatehButton" id="updateButton" value="<?php $this->msg('dataupdate') ?>" /> </div></form> </div> </div> <?php } This can add a button to the sidebar,but when i clicked the button,it can't link to the update.php. It shows error instead"You can not access the specified web page!". update.php just has the content of <?php echo "hello"; Why do these things happen? If I want to do the right thing that when I click the button then there'll link to the page that has the same page performance as wiki. What should I do? Hlep me ! Thanks a lot. vanessa lee _______________________________________________ Wikitech-l mailing list Wikitech-l@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l |
|
|
Re: editpage error2009/11/9 李琴 <qli@...>:
> <form action="..\includes\update\update.php" method="post" > id="updateform"><div> * Replace the backslashes by forward slashes * Verify that ../includes/update/update.php is the correct relative path to update.php * Verify that Apache isn't configured to deny access to the includes/ directory Roan Kattouw (Catrope) _______________________________________________ Wikitech-l mailing list Wikitech-l@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l |
|
|
Re: editpage errorRoan Kattouw wrote:
> 2009/11/9 李琴 <qli@...>: >> <form action="..\includes\update\update.php" method="post" >> id="updateform"><div> > * Replace the backslashes by forward slashes > * Verify that ../includes/update/update.php is the correct relative > path to update.php Being for the sidebar, it won't be. The .. is very likely wrong (path is relative to the entry point). And using tiny urls, it will break with articles like [[Foo/bar]]. Use $wgScriptPath/includes/update/update.php Or better yet, $wgScriptPath/extensions/update/update.php instead of touching includes folder. _______________________________________________ Wikitech-l mailing list Wikitech-l@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l |
|
|
Re: editpage errorIf I verify the "..\includes\update\update.php" to
"$wgScriptPath/extensions/update/update.php" and move update file to extensions.The address bar will show that http://localhost/mediawiki/index.php/$wgScriptPath/extensions/update/update.php I don't think this is right. -----Original Message----- From: Platonides <Platonides@...> To: wikitech-l@... Date: Tue, 10 Nov 2009 00:10:07 +0100 Subject: Re: [Wikitech-l] editpage error Roan Kattouw wrote: > 2009/11/9 李琴 <qli@...>: >> <form action="..\includes\update\update.php" method="post" >> id="updateform"><div> > * Replace the backslashes by forward slashes > * Verify that ../includes/update/update.php is the correct relative > path to update.php Being for the sidebar, it won't be. The .. is very likely wrong (path is relative to the entry point). And using tiny urls, it will break with articles like [[Foo/bar]]. Use $wgScriptPath/includes/update/update.php Or better yet, $wgScriptPath/extensions/update/update.php instead of touching includes folder. _______________________________________________ Wikitech-l mailing list Wikitech-l@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l _______________________________________________ Wikitech-l mailing list Wikitech-l@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l |
|
|
Re: editpage errorDo windows xp not using a backslash ?Apahe's conf is right.
-----Original Message----- From: Roan Kattouw <roan.kattouw@...> To: Wikimedia developers <wikitech-l@...> Date: Mon, 9 Nov 2009 19:23:21 +0100 Subject: Re: [Wikitech-l] editpage error 2009/11/9 李琴 <qli@...>: > <form action="..\includes\update\update.php" method="post" > id="updateform"><div> * Replace the backslashes by forward slashes * Verify that ../includes/update/update.php is the correct relative path to update.php * Verify that Apache isn't configured to deny access to the includes/ directory Roan Kattouw (Catrope) _______________________________________________ Wikitech-l mailing list Wikitech-l@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l _______________________________________________ Wikitech-l mailing list Wikitech-l@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l |
|
|
Re: editpage errorOn Tue, Nov 10, 2009 at 7:57 AM, 李琴 <qli@...> wrote:
> Do windows xp not using a backslash ?Apahe's conf is right. I don't get the context here, but do not use backslashes in paths. All remotely recent versions of Windows (certainly Windows XP) will accept a forward slash in path names as equivalent to a backslash. On the other hand, backslashes not only don't work on Unix-likes, they also require escaping in string literals for Windows. _______________________________________________ Wikitech-l mailing list Wikitech-l@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l |
|
|
Re: editpage error* Aryeh Gregor <Simetrical+wikilist@...> [Tue, 10 Nov 2009
10:54:38 -0500]: > On Tue, Nov 10, 2009 at 7:57 AM, 李琴 <qli@...> wrote: > > Do windows xp not using a backslash ?Apahe's conf is right. > > I don't get the context here, but do not use backslashes in paths. > All remotely recent versions of Windows (certainly Windows XP) will > accept a forward slash in path names as equivalent to a backslash. On > the other hand, backslashes not only don't work on Unix-likes, they > also require escaping in string literals for Windows. > Backslashes are twice bad, because sometimes larger pathes are produced by concatenation of shorted "subpathes", and when one shorter subpath uses slashes and another one backslashes, the concatenated path is invalid even in Windows. For example, some MediaWiki extension failed in Windows because it used slashes and dirname() or getcwd() returned backslashes. That's why my extension uses: str_replace( "\\", "/", dirname(__FILE__) ) Dmitriy _______________________________________________ Wikitech-l mailing list Wikitech-l@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l |
|
|
Re: editpage error"Dmitriy Sintsov" <questpc@...> wrote in message
news:1113144093.1257880032.161549468.45290@...... > Backslashes are twice bad, because sometimes larger pathes are produced > by concatenation of shorted "subpathes", and when one shorter subpath > uses slashes and another one backslashes, the concatenated path is > invalid even in Windows. For example, some MediaWiki extension failed in > Windows because it used slashes and dirname() or getcwd() returned > backslashes. > That's why my extension uses: > str_replace( "\\", "/", dirname(__FILE__) ) > Dmitriy That's not my experience. I have been using PHP for quite some time on both Linux and Windows, and will often use something like include(dirname(__FILE__) . "/../foo.php"); The path on a Windows box may therefore end up as something like: C:\some path\to\script/../foo.php but this mixture of path separators has always worked fine for me, and others[1]. (Mixing separators won't work on *nix boxes of course, but that's not a problem in this case as dirname() returns paths in the local format). The trick is to always use forward slashes, and it should work fine on all systems, even if it displays a bit funny in some situations. The point about having to double-escape is true though. - Mark Clements (HappyDog) [1] http://us2.php.net/manual/en/ref.filesystem.php#73954 _______________________________________________ Wikitech-l mailing list Wikitech-l@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l |
|
|
Re: editpage error李琴 wrote:
> If I verify the "..\includes\update\update.php" to > "$wgScriptPath/extensions/update/update.php" > and move update file to extensions.The address bar will show that > http://localhost/mediawiki/index.php/$wgScriptPath/extensions/update/update.php > > I don't think this is right. You're outside the PHP section, so $wgScriptPath isn't being replaced. You would do something like: <form action="<?php echo "$wgScriptPath/extensions/update/update.php"; ?>" method="post" id="updateform"> and move update.php to a folder called update on extension folder. _______________________________________________ Wikitech-l mailing list Wikitech-l@... https://lists.wikimedia.org/mailman/listinfo/wikitech-l |
| Free embeddable forum powered by Nabble | Forum Help |