A
A
Alexander Ivanov2016-05-31 12:31:48
PHP
Alexander Ivanov, 2016-05-31 12:31:48

How to get the id of the current resource in modx revo using PHP?

I am creating a plugin that will create a folder in a specific directory for it and I need to get the resource id.

<?php
$namepapka = ид_создаваемого_ресурса;
mkdir("..../assets/files/$namepapka", 0700);

PS Changed it a lot:
gaserge.ru/blog/modx-revolution/udobnyij-zagruzchi...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
display: block, 2016-05-31
@cimonlebedev

$modx->resource->get('id');

S
semki096, 2016-05-31
@semki096

maybe something like this
$lastid = mysql_insert_id();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question