« first day (676 days earlier)      last day (4272 days later) » 

9:02 AM
Hello @NikiC @FoxMaSk
 
9:17 AM
hi donut
 
hi
what does => mean in below code
function _get_list_table( $class ) {
$core_classes = array(
//Site Admin
'WP_Posts_List_Table' => 'posts',
'WP_Media_List_Table' => 'media',
'WP_Terms_List_Table' => 'terms',
'WP_Users_List_Table' => 'users',
'WP_Comments_List_Table' => 'comments',
'WP_Post_Comments_List_Table' => 'comments',
'WP_Links_List_Table' => 'links',
'WP_Plugin_Install_List_Table' => 'plugin-install',
'WP_Themes_List_Table' => 'themes',
'WP_Theme_Install_List_Table' => array( 'themes', 'theme-install' ),
'WP_Plugins_List_Table' => 'plugins',
its a Wordpress code
 
i'm debugging a very old and in one script i have a require('../ADM/Conn1.php'); the the require is never done. I put echo LINE before and after this call the and second echo is never done ; and in the Conn1.php i did echo FILE . ' ' . __LINE but it's never done too . What's happened ?
 
@DextOr, it's like telling that this KEY has this VALUE (KEY => VALUE)
 
@FoxMaSk Do you have error rerpoting enabled?
352
Q: Reference - What does this symbol mean in PHP?

anonWhat is this? This is a collection of questions that come up every now and then about syntax in PHP. This is also a Community Wiki, so everyone is invited to participate in maintaining this list. Why is this? Stack Overflow does not allow searching for particular characters. As a consequence,...

 
9:26 AM
@PeeHaa thx its Help full
 
yw
 
peehaa unfortunatly ; no ; i'm currently activating every log level to the most verbose one to try to find what's wrong
I found .... missing semi column at the end of the line
 
if i start a php background process on a page, and i restart apache does the background script stop?
echo /usr/bin/php $d/runbg.php >> $d/logbg.txt 2>&1 &
 
no
if this one does not request the HTTP server ; no
 
are you sure? because it seems to be happening
huh?
 
9:35 AM
if you only write script in command line ; apache is not required ;)
 
i request startbg.php via http/apache, startbg.php runs run.php in the background
 
petah what does your script do ?
ok
 
writes the time to a file every second
 
so it's normal that stop
 
so restarting apache does cause runbg.php to stop?
 
9:37 AM
as the runbg is based upon the http service ; yes
 
ok thanks
now how can i avoid this?
 
in a script ; when you restart httpd ; restart your runbg after it
 
obviosly by /usr/bin/php -F 'startbg.php'
 
@webarto how will that make a difference?
@FoxMaSk the command used to start runbg.php is dynamically generated by user input, so i cant restart it at the same time i restart apache
 
am i doing something wrong here ?
$handler = stream_socket_client("tcp://xri.net:80", $errno, $errstr, 30);
if (!$handler) {
    echo "$errstr ($errno)<br />\n";
} else {
    $message  = "HEAD /@fullxri HTTP/1.1\r\n";
    $message .= "Host: xri.net\r\n";
    $message .= "\r\n";
    fwrite($handler, $message);
    while (!feof($handler)) {
        echo fgets($handler, 1024);
    }
    fclose($handler);
}
it takes like 15 seconds to complete
 
9:43 AM
petah so the real question is why / when do you need to restart apache ?
 
@tereško lemme try
 
wrap it in <pre>
 
i restart apache for various reason, such as changing config
 
@tereško Or better yet, call header("Content-type: text/plain"); before it
 
@Petah ok so hmm, you will need to warn the users to restart their batch one you finished to restart apache :/
 
9:45 AM
well .. anyone .. is it just me or this takes 10+ seconds for no obvious reason ?
 
HTTP/1.1 302 Moved Temporarily Server: Apache-Coyote/1.1 Location: fullxri.com Content-Length: 0 Date: Wed, 22 Aug 2012 09:44:40 GMT
~ 10s too
 
@tereško Add benchmarking points to see where the delay is
 
@FoxMaSk thats not practical for my situation, but thanks for helping. ill try and find another way
 
root@debian:~# curl -IL xri.net/@fullxri
HTTP/1.1 302 Moved Temporarily
Server: Apache-Coyote/1.1
Location: fullxri.com
Content-Length: 0
Date: Wed, 22 Aug 2012 09:47:01 GMT

HTTP/1.1 200 OK
Date: Wed, 22 Aug 2012 09:47:02 GMT
Server: Apache/2.2.6 (Fedora)
Set-Cookie: JSESSIONID=442562CCC11408BF8FC8525BA0193E7C; Path=/
Pragma: no-cache
Cache-Control: no-cache, max-age=0, must-revalidate
Content-Language: en-US
Connection: close
Content-Type: text/html;charset=UTF-8
instant...
 
instant
when I run it from CLI
 
9:48 AM
~15 seconds ran from Apache
 
@tereško the server doesn't end the connection after delivering all data
 
fwrite($handler, $message);
echo fread($handler, 8192);
fclose($handler);
 
When I run it from CLI, I see all output perfectly, then it just waits until the connection timeouts
 
any have work in openoffice class ???
i am getting class com error
any one*
 
$message  = "HEAD /@fullxri HTTP/1.1\r\n";
$message .= "Host: xri.net\r\n";
$message .= "Connection: close\r\n";
$message .= "\r\n";
@tereško add a connection close header and that should be it...
root@debian:~# curl -IL tcp://xri.net/@fullxri
curl: (1) Protocol tcp not supported or disabled in libcurl
root@debian:~# curl -IL xri.net/@fullxri
HTTP/1.1 302 Moved Temporarily
Server: Apache-Coyote/1.1
Location: fullxri.com
Content-Length: 0
Date: Wed, 22 Aug 2012 09:47:01 GMT

HTTP/1.1 200 OK
Date: Wed, 22 Aug 2012 09:47:02 GMT
Server: Apache/2.2.6 (Fedora)
Set-Cookie: JSESSIONID=442562CCC11408BF8FC8525BA0193E7C; Path=/
Pragma: no-cache
Cache-Control: no-cache, max-age=0, must-revalidate
 
10:00 AM
<pre><?php

    $handler = stream_socket_client("tcp://xri.net:80", $errno, $errstr, 30);
    if ($handler) {
        $message  = "HEAD /@fullxri HTTP/1.1\r\n";
        $message .= "Host: xri.net\r\n";
        $message .= "\r\n";
        fwrite($handler, $message);
        $line = '';
        while (!feof($handler) && $line !== "\r\n") {
            echo $line = fgets($handler, 1024);
        }
        fclose($handler);
    }

?></pre>
this helped
but it feels like a hack (because that' exactly what it is)
 
yes
HTTP/1.1 302 Moved Temporarily
Server: Apache-Coyote/1.1
Location: fullxri.com
Content-Length: 0
Date: Wed, 22 Aug 2012 10:01:15 GMT
Connection: close
via Apache... with Connection: close specified...
 
@rdlowrey , could you elucidate ?
 
he is working on his tan atm
 
Connection: close does the trick nicely
 
here is my code
if(isset($_REQUEST['submit']))
{
set_time_limit(0);
function MakePropertyValue($name,$value,$osm){
$oStruct = $osm->Bridge_GetStruct("com.sun.star.beans.PropertyValue");
$oStruct->Name = $name;
$oStruct->Value = $value;
return $oStruct;
}
function word2pdf($doc_url, $output_url){
//Invoke the OpenOffice.org service manager
$osm = new COM("com.sun.star.ServiceManager") or die ("Please be sure that OpenOffice.org is installed.\n");
//Set the application to remain hidden to avoid flashing the document onscreen
 
10:05 AM
@Truth , at what point should i set it ?
this socket-thing is confusing to me .. not my area
 
@peta
 
7 mins ago, by webarto
$message  = "HEAD /@fullxri HTTP/1.1\r\n";
$message .= "Host: xri.net\r\n";
$message .= "Connection: close\r\n";
$message .= "\r\n";
 
oh, now i feel stupid
 
@Petah you dont use safe_mode to on ?
 
?
@FoxMaSk no
 
10:08 AM
@petah : ok because i read that if you use backstick with safe_mode to on you need to set safe_mode_exec_dir
 
safe_mode is removed in php 5.4
 
petah i know but you didnt tell that in your question ;)
brb - eating ;)
 
test 123 anyone see my messages...?
 
no
 
@Petah lol
@Petah why i am getting error "COM NOT FOUND"
 
10:16 AM
@tereško nah man, why... you'll catch up with that in few days... I made some semi-crappy methods to help me with the headers... pastebin.com/YNAh2QaZ concat is ugly...
 
@Karan i think its because it cant find your com
 
@petah how to enable com in linux server
 
^ IAP
 
type sudo /etc/init.d/com start
 
@Petah getting command not found error
 
10:21 AM
well it seems you com is not found
perhaps try sudo apt-get install com
 
@petah still getting command not found error
 
does anyone knows how can I place php errors into a div?
 
for sudo? or for apt-get
 
it gets displayed at the top of the page
 
@Petah give up
 
10:24 AM
@petah both
 
@meWantToLearn you will need to use output buffering with an uncaught exception handler and error handler
@Karan what kind of linux are you running
 
@Petah ssh
 
ssh is not linux
 
ssh is not a type of linux...
 
haha, SSH Linux
 
10:25 AM
sorry
 
@Karan which OS?
 
obviously caged SSH
 
centos
 
well sorry, cant help you
im a debain guy
 
aah.. I haven't played with CentOS either
hey @hakra
 
10:28 AM
@Petah currently installing openoffice ...
 
how come pbvmasi has a 'no image found' image as his display pic?
 
nice
 
@Karan how'd you achieve it?
 
@Karan , why would you install openoffice on a server ?
2
 
@Petah thanks but I mean its not an exception error : Warning: call_user_func_array() expects parameter 1 to be a valid callback
 
10:30 AM
@NikiC Something with an array that is yet not part of the core array extension. It would be a pity to code it over and over again ;)
 
same reason hes trying to use com object on a linux box?
 
@ShyamK hi!
hi @all
 
i want it to be in a div so I can color it red
 
@meWantToLearn i said error handler as well
keep in mind not all errors can be caught though
you may also want to consider installing xdebug, as it gives you better error output than standard PHP
 
I want the error to be displayed on the scree, thanks for the link
 
10:32 AM
@ircmaxell well but not exactly a bad thing either. If you need something sugar and water-proof, why not pay Disneyland Paris a visit ;)
 
yes, both suggestions i gave you can achieve your goal
@meWantToLearn this is what my error page looks like dumpt.com/img/viewer.php?file=xk7c61a25jlb2ignacam.png
i achieved that following the suggestions i just gave you
 
damn. power is down at the office :(
 
oh okay
 
@PeeHaa and where are thou? :D
 
im going through the link
 
10:38 AM
Aug 6 at 13:43, by hakre
Super::$tatic works even when you loose electricity.
 
@webarto In the office. I'm running on a UPS and phone tethering Super::$tatic
 
@Petah the issue is I want the error to be displayed on the same page, eror handler cleans the page and displays the error only
 
@PeeHaa sounds like probably you should finish anything important and then shutdown the system until power is back-up.
 
@meWantToLearn what makes you think the error handler cleans the page?
 
Ah, okay, well, with Super::$tatic you do not need to.
 
10:39 AM
:)
 
:)
 
:)
 
:)
 
lol
 
damn you
 
10:39 AM
lol
 
@Petah: Can you open a private chat with @meWantToLearn please? I only see you and it's pretty distracting ;)
 
nah
 
haha
 
i like it when you watch me
 
10:40 AM
figured it out
thanks :)
the code which I got from a link was clearing the page
 
the link you gave worked charmly :)
 
@ShyamK means...?
 
Shhh.. The night train is coming ....
 
@Karan what 'means..?' ????
 
10:42 AM
@ShyamK how'd you achieve it?
 
oh that.. never mind that.... What I meant was how did you overcome the com error that you were getting.. but never mind that now.. forget that I asked that ..
 
tiny avatar people...
 
gold:
21 hours ago, by Greg
Hi all can plz smoene tell my how to program a site like facebook i want to start the web 2.0 business and sell it for money my site will be bigger than facebook and google
 
@PeeHaa ROFL
hi I wanna make money.. pls give me a tutorial to mint money.. :)
 
It's not possible to use child::fun() in php? parent::fun() works though
 
10:48 AM
@KevinDuke obviously.
 
@KevinDuke It is via static:: but that might not be what you're looking for, because it's the child class but not object.
 
I get syntax error with that hakra
 
yes! I haz teh powerz!
 
Some people:
Then try to learn remove down vote and comment what's wrong....best of luck.... — gautamdharmapuri 20 secs ago
...
My answer is right above it :P
 
11:03 AM
I cnt chk bt it will,ofcrse.U can try — gautamdharmapuri 49 mins ago
dat english
 
:P
 
back
 
viper7 down again?
 
looks like a DDoS or while(1){} :P
 
Are there any other 5.4 codepads out there?
 
11:10 AM
this is week of "digging through specs i never heard of before" =/
 
haha like what
 
.. and my browser look like the tab-fairy threw up there
 
lol
@hakra Are you going to write an updated posts about codepads in the future? hakre.wordpress.com/2011/10/05/list-of-online-php-codepads
 
this is the moment to organize the tab vertically such a thread in gmail :D
 
11:16 AM
well .. it looks like this
which is what you get when they groups are collapsed .. but when i expand them ..
 
@PeeHaa why don't we make one :P
 
haha oh boi
 
@tereško i meant horizontally sorry :)
 
yeah .. browser eats almost 1GB ram
 
11:18 AM
@tereško it looks like a keyboard of piano:)
 
@webarto a codepad? no thanks. I would rather spend some more time trying to install gearman on my box so I can just use viper7's :)
 
sometimes i think its all opera;s fault , because they added tab groups
 
@PeeHaa yes, but will it be online? do you need it to be online :)
 
@webarto I started the work to get it working on my VPS so I could built in opcodes myself, but I'm kinda stuck :(
 
yeah, sirius buisness
 
11:24 AM
@tereško you set header("Content-type: text/plain"); where you place any header, before any output is sent (preferably the first statement)
 
in what context was that ?
 
1 hour ago, by tereško
@Truth , at what point should i set it ?
Or did you mean Connection: close?
 
yes .. i did , and question was answer long tome ago
 
$handler = stream_socket_client("tcp://xri.net:80", $errno, $errstr, 30);
if (!$handler) {
    echo "$errstr ($errno)<br />\n";
} else {
    $message  = "HEAD /@fullxri HTTP/1.1\r\n";
    $message .= "Host: xri.net\r\n";
    $message .= "Connection: close\r\n";
    $message .= "\r\n";
    fwrite($handler, $message);
    while (!feof($handler)) {
        echo fgets($handler, 1024);
    }
    fclose($handler);
}
It's another header to send to the socket :)
 
but thanks anyway
 
11:26 AM
Meh, I just came back to the comp and found the message in my notification queue
 
if all gos well , i might put a badly written OpenId lib on github today
with no unittests what so ever =/
 
11:39 AM
who needs unit tests :P
 
they would be nice , do not have them set up for this project
i guess i will make the first version without any , and then rewrite it using TDD
currently it's more of an "i have no idea what i am doing here" stage of implementation
unittests would be even counter productive , i think
 
Guys can I ask something?
 
@Hanan According to the room description you may
 
PHP and mysql..
 
11:49 AM
sure
 
demo / demo
 
@Hanan Eeeeeek. I can download your entire database
 
I have a bids if you can see.. now I want to do 2 rules:
1. If my bid will be the bid #10 on the first page only, the last bid will get a status of "burn"
2. if my big will be bid #4 on the 2nd page and on, the last bid will burn.
 
so do it
 
but I cant figure out how :(
 
11:52 AM
@Hanan First fix the SQL Injection vulnerability in your code before asking help about other stuff
Don't use mysql_* functions for new code. They are no longer maintained and the community has begun the deprecation process. See the red box? Instead you should learn about prepared statements and use either PDO or MySQLi. If you can't decide, this article will help to choose. If you care to learn, here is a good PDO tutorial.
 
@PeeHaa Don't you get tired of telling this? Its like every other day there is a post of this...
 
:\
I did something:
$posqq = mysql_query("SELECT id,member_id,pos,status FROM `bids_list` WHERE `visible`='1' AND `game_id`='{$game}' AND `amount` > '{$amount}' ORDER BY amount DESC LIMIT 50");
while ($posww=mysql_fetch_assoc($posqq)) {
if ($posww['member_id'] == $uid) {
if ($posww['pos'] >= 50) $fourPos++;
else if ($posww['pos'] < 50) $setPos++;
else {
$fourPos=0;
$setPos=0;
}
}
}
if ($setPos >= "9" OR $fourPos >= "3") {
$status = "burn";
$is_burn = 1;
}
but it's working bad.... any advice?
 
3 mins ago, by PeeHaa
Don't use mysql_* functions for new code. They are no longer maintained and the community has begun the deprecation process. See the red box? Instead you should learn about prepared statements and use either PDO or MySQLi. If you can't decide, this article will help to choose. If you care to learn, here is a good PDO tutorial.
 
:D
 
@Hanan As PeeHaa mentioned, you have an SQL injection error, as you inject variables into the SQL code. Fix that first, as it has first priority.
 
11:56 AM
what I need to fix I'm not get it
it's working fine to me
 
A hacker would be able to download/destroy your entire database because of your code, and because you're injecting variables into your code in the mysql_query("SELECT id,member_id,pos,status FROM bids_list` WHERE visible='1' AND game_id='{$game}' AND amount > '{$amount}' ORDER BY amount DESC LIMIT 50"); ` line.
 
not a hacker, a script kiddie
 
@webarto this, basically.
 
how to fix?
 
@PeeHaa Its a good thing that you don't mind telling this over and over again.. I wouldn't (cos I'm lazy)
 
11:59 AM
Guys
 
@Hanan PeeHaa has sent you the same message two times now, with a lot of various links and resources.
 
why pretty much every cloud computing related application advertisements made in animation
 
L O L
 
thank you anyway guys
bye bye
 
didn't you guys understand the simple "write free codez 4 me" question ? what's wrong with you all !?
5
 
I did :D
 
maybe the guy forgot to say please and they got mad at him
 
that must be it
 
 
1 hour later…
1:28 PM
<?php

$xml = <<<XML
<item>
    <title>My Title</title>
    <link>http://www.link.com</link>
    <description>The description</description>
    <author>Blah Blah</author>
    <pubDate>Thu, 26 Jul 2012 10:17:15 -0400</pubDate>
    <media:content url="myimage.jpg">
        <media:title>sdafsd</media:title>
    </media:content>
    <position>1</position>
</item>
XML;

$document = new DOMDocument();
@$document->loadXML($xml);

$author = $document->getElementsByTagName("author")->item(0);
$content = $document->getElementsByTagName("content")->item(0);
Why does the first remove throw an exception? Both elements are found
 
@Truth $author isn't a child node of $document.
 
@salathe Yeah, I noticed :) Thanks
$document = $dom->documentElement; solved it
Used for this answer btw: stackoverflow.com/a/12074293/871050
 
@Truth or just nuke the question :)
 
1:51 PM
Good Morning
 
@ircmaxell Morning
@tereško
$router = new Common\Router(new Common\RouteBuilder);
$router->import(__DIR__ . '/config/routes.json');
Shouldn't the routes file go to the RouteBuilder?
 
builder is a special case of factory
it takes list of parameters and creates object graph
it should not be responsible for parsing a file
 
@tereško So I seem to misunderstand what it's doing
Where does it draw its parameters from?
 
you could actually make a case that you need another class there , which handles the wirk with JSON files
public function import( $filepath )
{
    $this->loadConfig( $filepath );
    $this->createRoutes();
}
protected function loadConfig( $filepath )
{
    if ( !file_exists( $filepath ) )
    {
        throw new \Exception( "File '$filepath' not found!" );
    }

    $json = file_get_contents( $filepath );
    $this->config = json_decode( $json, true );
}
protected function createRoutes()
{
    foreach ( $this->config as $name => $params )
    {
        $route = $this->builder->create( $name, $params );
        $this->pool[ $name ] = $route;
    }
}
 
@tereško Would you care to upload the entire thing to GitHub for review?
 
2:01 PM
if you pay attention , you will actually see flaws in that code above
@Truth nope , it is the first iteration and it here are no unittests for it
 
@tereško What flaws?
 
in this case the $this->config in the second method
 
@tereško It's not returning?
 
everything works , but it has elements of "magic"
 
@tereško Yeah, thought so
@tereško Also, shouldn't it be more appropriately named RouteFactory?
Or because it's not a factory per-se you're not doing it?
 
2:11 PM
factory creates different types of objects ( they might be simple of have complex dependencies .. it does not matter )
 
i dont know if you've already seen this github.com/mageekguy/atoum it's a unit test framework for PHP5.3 at least, because it provide a .phar
 
builder creates on objects of a specific class , which usually has complex dependency graph
 
@tereško Aside from creating routes, is there any use for the config array in Router?
 
nope
that's why i said that it is a flaw ( might be a relic from earlier attempt .. dunno )
 
@tereško In that case, there's no real point of keeping it, isn't it so?
$config = $this->load_config($json_file);
$this->routes = $this->create_routes($config);
Seems like a better solution
 
2:21 PM
so it would , yes
 
Man, Lester just doesn't get it...
 
@ircmaxell Doesn't sound like Lester ;-)
 
I do not mean to rant, but am I the only one that thinks the syntax for declare(ticks = 1); is really strange?
 
2:38 PM
:5039439
 
hey does anyone know if php-gd has something resembling canvas global composite operations or photoshop blend modes?
 
@Alex The answer's 0x45
 
@Christian what are you talking about again?
 
you mean when drawing? I'm actually looking for something like a 'screen' blendmode
 
Imagemagick
 
2:42 PM
Aug 18 at 15:03, by tereško
"main": {
    "notation": "/:action",
    "defaults": {
        "resource"  :   "Authentication",
        "action"    :   "Login"
    },
    "conditions":   {
        ":action"   :   "(login)|(register)"
    }
},
Could you elaborate on that in more detail?
 
@webarto sadly their server just has gd..
no worries I'll keep googling
thanks guys
 
@Truth what exactly you want to know ?
haven't you written routing mechanisms before ?
 
What does "notation" mean? And what does "defaults" mean?
Or rather, why did you call it "defaults"?
I assume that you're redirecting both login and register to the Authentication::Login
 
Levi @LeviMorrison
 
@ircmaxell Yes, yes we can agree on that ;)
 
2:45 PM
no , defaults are values which are used if there are no values set
"main": {
    "notation": "/:action",
    "defaults": {
        "resource"  :   "Authentication",
    },
    "conditions":   {
        ":action"   :   "(login)|(register)"
    }
},
because in the patter the action is mandatory
 
actually it should be:
damn ... something went wrong with sentence order
 
So I don't understand
@tereško What are the "values" to be set?
 
ehh ... now how do i explain
 
@webarto Well, it just looks strange.
 
2:49 PM
got it a split second too late :D
 
Route::set('content', '<lang>/<slug>', array('lang' => '(bs|en)', 'slug' => '.*'))
	->defaults(array(
		'controller' => 'content',
		'action'     => 'index',
	));
:P
 
As in, I don't recall seeing that syntax elsewhere.
 
@Christian I'd agree that it is a rather unnecessary language feature ;)
 
So defaults is if the pattern doesn't match, what happens if it does?
 
it's what you get when chat keeps timeouting
 
2:50 PM
@NikiC Hmm, I suppose there might be something to it.
 
@NikiC :-P
 
(login)|(register) => login|register ? @tereško
 
I was writing some code and remembered about this thing....not that I really used it.
 
@Truth , defaults are values which are used if pattern does match , but not all values has been set
 
But the syntax's strange, compared to the rest of PHP. I understand it's a language construct, but still...
 
2:51 PM
@webarto yaeh
 
@tereško Give me an example for such case please, I don't really understand
 
may I ask you what is the topic of you discussion ? :)
your*
 
@Truth , i have been feeding you code bit by bit ... is is not how you should be doing this
 
@FoxMaSk An MVC framework I'm making (inspired by and helped by @tereško)
 
Route::set('post', 'post/<action>/<id>', array('action' => '(create|update)', 'id' => '\d+'))
	->defaults(array(
		'controller' => 'post',
		'action'     => 'create',
	));
 
2:52 PM
@tereško I'm trying to understand the concept really, before I make my own
 
@Truth so post/create is valid
 
@webarto Did I see a :: there?
 
you will be better off if you look at how routing is implemented elsewhere and try to do your own
 
I'm not adapting all of your code into mine
 
@truth ok
 
2:53 PM
@NikiC s/::/-> :P :P :P
 
@tereško I can easily implement routing by giving straight regex patterns, but I'm trying to understand how you're doing it
 
@webarto , that looks like routing from Kohana
 
@tereško yup, yours is similar?
 
@tereško I think I get it though, it's when you want to /read/blog/{id} but don't get an ID?
When the required parameter for the action method aren't there?
 
yes
 
2:54 PM
Aha
 
[[/:controller]/:action][/:id]
all three parameters are optional , but the order matters
 
@webarto too late :P I know your true self now :P
 
Route::set('index', '(<controller>(/<action>))')
	->defaults(array(
		'controller' => 'index',
		'action'     => 'index',
	));
 
@tereško But then again, I don't see where you define what happens if the parameters are there
 
@NikiC I liked Kohana, but it has lots of :: and instance :D
 
2:56 PM
what ?
 
@tereško Let's say /read/blog/ defaults to home page
 
@webarto , i think the notation was from symfony2
 
Bah, hold on...
 
<action>/<controller>(/<id>) ... action => read, controller => blog
 
@webarto Shouldn't that be the other way around?
<controller>/<action>/<params>?
 
2:58 PM
2 mins ago, by Truth
@tereško Let's say /read/blog/ defaults to home page
 
1 min ago, by Truth
Bah, hold on...
 
:)
 
controller called "read" doesn't really make sense
 

« first day (676 days earlier)      last day (4272 days later) »